for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of Aura for PHP.
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
namespace Aura\SqlQuery\Pgsql;
use Aura\SqlQuery\Common;
* An object for PgSQL INSERT queries.
* @package Aura.SqlQuery
class Insert extends Common\Insert implements ReturningInterface
{
use ReturningTrait;
protected function build()
return parent::build()
. $this->builder->buildReturning($this->returning);
builder
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* Returns the proper name for passing to `PDO::lastInsertId()`.
* @param string $col The last insert ID column.
* @return string The sequence name "{$into_table}_{$col}_seq", or the
* value from `$last_insert_id_names`.
public function getLastInsertIdName($col)
$name = parent::getLastInsertIdName($col);
if (! $name) {
$name = "{$this->into_raw}_{$col}_seq";
return $name;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: