Prado\Data\SqlMap\Statements\TMappedStatement::executeInsert PHP Method

executeInsert() public method

Execute an insert statement. Fill the parameter object with the ouput parameters if any, also could return the insert generated key.
public executeInsert ( $connection, $parameter ) : string
return string the insert generated key.
    public function executeInsert($connection, $parameter)
    {
        $generatedKey = $this->getPreGeneratedSelectKey($connection, $parameter);
        $command = $this->_command->create($this->_manager, $connection, $this->_statement, $parameter);
        //		var_dump($command,$parameter);
        $result = $command->execute();
        if ($generatedKey === null) {
            $generatedKey = $this->getPostGeneratedSelectKey($connection, $parameter);
        }
        $this->executePostSelect($connection);
        $this->onExecuteQuery($command);
        return $generatedKey;
    }