Inserts new row in urlalias_ml table.

@param array $values

@return mixed
433132
public function insertRow(array $values)
    {
        // @todo remove after testing
        if (
            !isset($values['text']) ||
            !isset($values['text_md5']) ||
            !isset($values['action']) ||
            !isset($values['parent']) ||
            !isset($values['lang_mask'])) {
            throw new \Exception('value set is incomplete: ' . var_export($values, true) . ", can't execute insert");
        }
        if (!isset($values['id'])) {
            $values['id'] = $this->getNextId();
        }
        if (!isset($values['link'])) {
            $values['link'] = $values['id'];
        }
        if (!isset($values['is_original'])) {
            $values['is_original'] = ($values['id'] == $values['link'] ? 1 : 0);
        }
        if (!isset($values['is_alias'])) {
            $values['is_alias'] = 0;
        }
        if (!isset($values['alias_redirects'])) {
            $values['alias_redirects'] = 0;
        }
        if (!isset($values['action_type'])) {
            if (preg_match('#^(.+):.*#', $values['action'], $matches)) {
                $values['action_type'] = $matches[1];
            }
        }
        if ($values['is_alias']) {
            $values['is_original'] = 1;
        }
        if ($values['action'] === 'nop:') {
            $values['is_original'] = 0;
        }

        /** @var $query \eZ\Publish\Core\Persistence\Database\InsertQuery */
        $query = $this->dbHandler->createInsertQuery();
        $query->insertInto($this->dbHandler->quoteTable($this->table));
        $this->setQueryValues($query, $values);
        $query->prepare()->execute();

        return $values['id'];
    }
1054060
public function insert($table, $values)
    {
        $keys = array();
        $params = array();
        $placeholders = array();
        foreach ($values as $k => $v) {
            $keys[] = $this->db->quoteColumn($k);
            $params[':' . $k] = $v;
            $placeholders[] = ':' . $k;
        }
        $sql = "INSERT INTO " . $this->db->quoteTable($table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(',', $placeholders) . ')';
        $result = $this->setSql($sql)->execute($params);
        if (!$result) {
            return false;
        }

        return $this->db->lastInsertId();
    }
731178
public function upsert(array $values)
    {
        if (empty($values)) {
            return true;
        }
        $values = $this->detectValues($values);
        $bindings = [];
        foreach ($values as $record) {
            foreach ($record as $key => $value) {
                $bindings[$key] = $value;
            }
        }

        $sql = $this->grammar->compileUpsert($this, $values);

        return $this->connection->upsert($sql, $bindings);
    }
213847
public function addValues(array $values)
    {
        $valueReferences = [];

        foreach ($values as $value) {
            $valueReferences[] = $this->getReferences()->createReference($value);
        }

        $this->values[] = $valueReferences;

        return $this;
    }
212200
public function insert($table, array $values = null)
    {
        $builder         = new Insert($this->driver);
        $this->lastQuery = $builder;

        if ($values) {
            $builder->values($values);
        }

        return $builder->into($table);
    }
1248906
public function insert($table, $values)
    {
        if ( !is_array(reset($values)) ) { // is this an array of arrays? if not lets make it one
            $values = [$values];
        }

        $keys = array_keys(reset($values));
        $keynames = "`" . implode("`,`",$keys) . "`";

        $qvals = $allvars = [];
        foreach( $values as $pos => $subval ) {
            if ( array_keys($subval) != $keys ) {
                throw new \Exception("Value set at position $pos has non-matching keys!!");
            }
            $questionmarks = [];
            foreach ( $subval as $value ) {
                $allvars[] = $value;
                $questionmarks[] = "?";
            }
            $qvals[] = "(" . implode(",", $questionmarks) . ")";
        }

        $qvstring = implode( ",", $qvals );
        $query = "INSERT INTO `$table` ($keynames) VALUES $qvstring";

        return $this->query( $query, $allvars );
    }
32448
public function insertGetId(array $values, $sequence = null)
    {
        $this->compileWheres();
        $result = $this->query->insert($values);

        if (0 == (int) $result['errors']) {
            if (isset($values['id'])) {
                return $values['id'];
            }

            // Return id
            return current($result['generated_keys']);
        }
    }
710171
public function addValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->addValue($key, $value);
        }
        return $this;
    }
1296936
public function insertGetId(array $values, $sequence = null)
    {
        foreach(event(new QueryInsert($this, $values)) as $attributes){

            $values = array_merge($values, $attributes);

        }

        return parent::insertGetid($values, $sequence);
    }
99523
public function insert(array $values) : int
    {
        $fields = $this->fields;
        array_shift($fields);

        $sql = 'INSERT INTO `' . $this->table . '` (' . implode(', ', $fields) . ') VALUES (:' . implode(', :', $fields) . ')';
        $query = $this->pdo->prepare($sql);
        foreach ($values as $key => &$value) {
            $query->bindParam(':' . $fields[$key], $value);
        }
        $query->execute();

        return $this->pdo->lastInsertId();
    }
287788
public function addRows(array $rows): Insert
    {
        foreach ($rows as $index => $row) {
            $this->add($row);
        }
        return $this;
    }
1059979
public function insert(array $values)
    {
        if (empty($values)) {
            return true;
        }
        $values = $this->detectValues($values);
        $bindings = [];
        foreach ($values as $record) {
            foreach ($record as $key => $value) {
                $bindings[$key] = $value;
            }
        }

        $sql = $this->grammar->compileInsert($this, $values);

        return $this->connection->insert($sql, $bindings);
    }
579896
public static function createFromValues(array $values)
    {
        if (\array_key_exists('keys', $values) && \is_array($values['keys'])) {
            return JWKSet::createFromKeyData($values);
        }

        return JWK::create($values);
    }
731441
public function insert($table, $values){
		$statement = Statement::createInsert($this->connection, $table, $values);
		foreach($this->observers as $observer){
			$statement->attachObserver($observer, $this->observers->getInfo());
		}
		return $statement;
	}
1293599
protected function insert(array $values, array $place_holders = [], $table = ''){
        if( empty($table) ){
            extract($this->get_default_values($values, $table, $place_holders));
        }
        return $this->db->insert($table, $values, $place_holders);
    }
1151619
public function insert($table, array $values){
        try{
            //Armo y preparo la consulta
            $query= $this->prepareInsert($table, $values);
            //Ejecuto la consulta
            $query->execute($values);
            //Retorno si salio todo bien o no
            return $this->isOk($query);
        } catch (\PDOException $e) {
            throw $e;
        }
    }
1026864
public static function upsert(array $values, array $updateColumns = null)
    {

        if (empty($values))
            return true;

        if (! is_array(reset($values))) {

            $values = [$values];

        } else {

            foreach ($values as $key => $value) {

                ksort($value);
                $values[$key] = $value;
            }
        }

        $model = self::getModel();

        $sql = static::compileUpsert(
            $model->getConnection()->getQueryGrammar(), $values, $updateColumns);

        $values = static::inLineArray($values);

        return $model->getConnection()->affectingStatement($sql, $values);
    }