添加一批记录

@param string $table  表名
@param array  $values 格式: array( array(key=>val, ..), ..)

@return bool
357871
public function inserts($table, $rows)
	{
        if (!$rows) {
            return false;
        }

		$holds = array();

		$feilds = array_keys(reset($rows));

        $hold = '('.implode(',', array_fill(0, count($feilds), '?')).')';
		$holds = implode(",\n", array_fill(0, count($rows), $hold));
		$feilds = implode("`,`", $feilds);

        $vals = [];
        foreach ($rows as $row) {
            $vals = array_merge($vals, array_values($row));
        }

		$sql = "INSERT INTO `{$table}` (`{$feilds}`)\n VALUES {$holds}";

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($vals) : false;
	}
630674
public function values(array $values)
    {
        $this->sqlParts['values'] = is_array(current($values)) ? $values : [$values];

        return $this;
    }
1211280
public function setValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->setValues($_values);});
	}
158414
public function store(array $values)
    {
        foreach ($values as $key=>$value)
        {
            // Ensure proper type
            $value = $this->forceTypes($value);

            // Json to save
            $jsonValue = json_encode($value);

            // Update
            $this->database->statement("INSERT INTO system_registries ( `key`, `value` ) VALUES ( ?, ? )
										ON DUPLICATE KEY UPDATE `key` = ?, `value` = ?",
                array($key, $jsonValue, $key, $jsonValue));

            $this->cache->add($key, $value);
        }

        return true;
    }
505826
public function insert(array $values)
    {
        // get version values & values
        $versionValues = $this->getVersionValues($values);
        $values = $this->getValues($values);

        // set version, ref_id and latest_version
        $values[$this->model->getLatestVersionColumn()] = 1;

        // insert main table record
        if (! $id = $this->query->insertGetId($values)) {
            return false;
        }

        $versionValues[$this->model->getVersionKeyName()] = $id;
        $versionValues[$this->model->getVersionColumn()] = 1;

        // insert version table record
        $db = $this->model->getConnection();
        return $db->table($this->model->getVersionTable())->insert($versionValues);
    }
206304
public function insert($table, $row)
	{
		$keys = implode('`, `', array_keys($row));
        $holds = implode(',', array_fill(0, count($row), '?'));
		$vals = array_values($row);

		$sql = "INSERT INTO `{$table}` (`{$keys}`) VALUES({$holds})";

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($vals) : false;
	}
1013622
public function update(string $table = null, array $values = null): Query\Update
    {
        return new Query\Update($table, $values, $this->getConfigKey());
    }
1094084
public function insert(array $values)
    {
        $result = $this->getBuilder()->insert($values);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
253430
public function attachKeyValuePair(array $values)
    {

        foreach ($values as $key => $value) {
            $this->addKeyValuePair($key, $value);
        }
        return true;
    }
451182
public function addProperties(array $values)
    {
        foreach ($values as $key => $value) {
            $this->add($key, $value);
        }

        return $this;
    }
780797
public function markValueArray(array $values): array
    {
        // 对数组中的每一项,逐个加定界符
        foreach ($values as $k => $v) {
            $values[$k] = self::markValue($v);
        }
        return $values;
    }
243125
public function setValues(array $values)
    {
        $this->values = array();
        foreach ($values as $value) {
            $this->addValue($value);
        }
        return $this;
    }
20563
public function addRow($values=array()) {
		$row=$this->getBody()->addRow($this->_colCount);
		$row->setValues(\array_values($values));
		return $this;
	}
754816
private function doInsert(array $values) {
        $db       = $this->db();
        $mapping  = $this->dao()->getMapping();
        $table    = $mapping['table'];
        $idColumn = $mapping['identity']['column'];
        $id       = null;
        if  (isset($values[$idColumn])) $id = $values[$idColumn];
        else unset($values[$idColumn]);

        // translate column values
        foreach ($values as &$value) {
            $value = $db->escapeLiteral($value);
        }; unset($value);

        // create SQL statement
        $sql = 'insert into '.$table.' ('.join(', ', \array_keys($values)).')
                   values ('.join(', ', $values).')';

        // execute SQL statement
        if ($id) {
            $db->execute($sql);
        }
        else if ($db->supportsInsertReturn()) {
            $id = $db->query($sql.' returning '.$idColumn)->fetchInt();
        }
        else {
            $id = $db->execute($sql)->lastInsertId();
        }
        return $id;
    }
347533
public function in(array $values): bool
    {
        foreach ($values as $value) {
            if ($this->is($value)) {
                return true;
            }
        }

        return false;
    }
761481
public function insert(array $values)
    {
        $query = new Query\InsertQuery();

        if ($this->pdo) {
            $query->setPDO($this->pdo);
        }

        return $query->values($values);
    }
717257
public static function insert( $table, $values = array(), $handler = null ) 
	{
		return Query::insert( $table, $values, $handler );
	}