Insert a new record and get the value of the primary key

@param  mixed[]  $values

@return  int
436420
public function insertGetId(array $values): int {
    $this->coerceDataTypesToDatabase($values);
    return $this->builder->insertGetId($values);
  }
71781
public function saveRole(array $values): int
    {
        $result = $this->generalSave($values, $this->tableRole);
        $this->cache->clean([Cache::TAGS => ['DibiDriver']]);
        return $result;
    }
742539
public function addValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->addValues($_values);});
	}
630674
public function values(array $values)
    {
        $this->sqlParts['values'] = is_array(current($values)) ? $values : [$values];

        return $this;
    }
994671
protected function insertExecute(string $statement, array $values): ?array {
		
		// our insert method should return either a single ID or a list of created IDs.
		// we can use the ExtendedPdo's fetchAffected method to determine how many were
		// inserted and then use that to determine our return value.  if nothing at all
		// was inserted, we return null.
		
		$affected = $this->dbConn->fetchAffected($statement, array_values($values));
		
		if ($affected === 0) {
			return null;
		}
		
		if ($affected === 1) {
			return [$this->getInsertedId()];
		}
		
		// if we haven't returned, then we inserted more than 1 row.  we can construct a
		// list of the IDs that were created by using the last ID and range as follows.
		// to identify our first ID, it would seem like $lastId - $affected would be enough,
		// but if we inserted 5 rows ending at 10, 10 - 5 = 5 and we don't want a range to
		// be [10,9,8,7,6,5] because that's six IDs.  so, we want to do 10 - (5 - 1) which
		// would result in [10,9,8,7,6] which is the correct response.
		
		$lastId = $this->getInsertedId();
		$firstId = $lastId - ($affected - 1);
		return range($lastId, $firstId);
	}
26573
public function insertGetId(array $values, $sequence = null)
    {
        $result = parent::insertGetId($values, $sequence);

        $this->handler->setBuilder($this)
            ->invalidateQuery(Reflector::QUERY_TYPE_INSERT, $values);

        return $result;
    }
213847
public function addValues(array $values)
    {
        $valueReferences = [];

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

        $this->values[] = $valueReferences;

        return $this;
    }
904968
protected function addUpdatedAtColumn(array $values)
    {
        if (! $this->model->usesTimestamps()) return $values;

        $column = $this->model->getUpdatedAtColumn();

        return array_add($values, $column, $this->model->freshTimestampString());
    }
198006
public function insert(array $values = []): bool
	{
		$query = $this->compiler->insert($values);

		return $this->connection->query($query['sql'], $query['params']);
	}
515010
protected function insertWithValues(array $values): string
	{
		$sql  = 'INSERT INTO ';
		$sql .= $this->escapeTable($this->query->getTable());
		$sql .= ' (' . implode(', ', $this->escapeIdentifiers(array_keys($values))) . ')';
		$sql .= ' VALUES';
		$sql .= ' (' . $this->params($values) . ')';

		return $sql;
	}
791633
public function insertRow(array $values)
    {
        try {
            return $this->innerGateway->insertRow($values);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
683942
public function update(array $values)
    {
        $sql = $this->grammar->compileUpdate($this, $values);

        return $this->connection->update($sql, $this->cleanBindings(
            $this->grammar->prepareBindingsForUpdate($this->bindings, $values)
        ));
    }
840178
public function update(array $values)
    {
        $count = 0;

        foreach ($this->getModels() as $model) {
            $model->fill($values);
            $count += $model->save() ? 1 : 0;
        }

        return 0;
    }
1241397
public function insert(array $values): bool {
    $this->coerceDataTypesToDatabase($values);
    return $this->builder->insert($values);
  }
297371
public function insert($values)
    {
        try {
            if (func_num_args() > 0 && !is_array($values)) {
                $this->values = array_merge($this->values, self::sanitizeAV(func_get_args()));
            } else if (is_array($values)) {
                $this->values = self::sanitize($values);
            } else {
                static::$response["status"] = "error";
                static::$response["response"] = "unrecognized parameter options in the insert values";
                static::$response["code"] = 7004;
                return static::terminate(static::$response);
            }
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response["code"] = $e->getCode();
           return static::terminate(static::$response);
        }

        return $this;
    }
423563
public function savePrivilege(array $values): int
    {
        $result = $this->generalSave($values, $this->tablePrivilege);
        $this->cache->clean([Cache::TAGS => ['DibiDriver']]);
        return $result;
    }
213590
public function update(array $values)
	{
		$bindings = array_values(array_merge($values, $this->bindings));

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

		return $this->connection->update($sql, $this->cleanBindings($bindings));
	}