Prado\Data\DataGateway\TDataGatewayCommand::insert PHP Метод

insert() публичный Метод

Inserts a new record into the table. Each array key must correspond to a column name in the table unless a null value is permitted.
public insert ( $data ) : mixed
Результат mixed last insert id if one column contains a serial or sequence, otherwise true if command executes successfully and affected 1 or more rows.
    public function insert($data)
    {
        $command = $this->getBuilder()->createInsertCommand($data);
        $this->onCreateCommand($command, new TSqlCriteria(null, $data));
        $command->prepare();
        if ($this->onExecuteCommand($command, $command->execute()) > 0) {
            $value = $this->getLastInsertId();
            return $value !== null ? $value : true;
        }
        return false;
    }