public function insert(array $set)
    {
        if (empty($set)) {
            return null;
        }
        if ($this->accum !== null) {
            $this->accum[] = $set;
            if (count($this->accum) >= $this->sizeAccum) {
                $this->multiInsert($this->accum, true);
                $this->accum = array();
            }
            $this->lastIdAccum++;
            return $this->lastIdAccum;
        }
        if ($this->map) {
            $set = $this->map->set($set);
        }
        if ($this->fake) {
            return $this->fake->insert($set);
        }
        $pattern = 'INSERT INTO ?t (?cols) VALUES (?ln)';
        $data = array($this->name, array_keys($set), array_values($set));
        return $this->db->query($pattern, $data)->id();
    }