src/Db/Pgsql/Schema.php
public function insert($table, $columns, $connection = null)
    {
        $command = $this->db->createCommand()->insertAndReturn($table, $columns);
        if (isset($connection)) {
            $command->setConnection($connection);
        }
        return $command->queryOne();
    }
public function insert($table, $columns, $connection = null)
    {
        $command = $this->db->createCommand()->insertAndReturn($table, $columns);
        if (isset($connection)) {
            $command->setConnection($connection);
        }
        return $command->queryOne();
    }
Executes the INSERT command, returning primary key values.
@param string                   $table the table that new rows will be inserted into.
@param array                    $columns the column data (name => value) to be inserted into the table.
@param ConnectionInterface|null $connection
@return ExtendedPromiseInterface with array|false primary key values or false if the command fails