refactoring for dependency injection and testability.
This commit is contained in:
19
laravel/database/query/compiler/postgres.php
Normal file
19
laravel/database/query/compiler/postgres.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php namespace Laravel\Database\Query\Compiler;
|
||||
|
||||
use Laravel\Database\Query\Compiler;
|
||||
|
||||
class Postgres extends Compiler {
|
||||
|
||||
/**
|
||||
* Compile a SQL INSERT statment that returns an auto-incrementing ID from a Query instance.
|
||||
*
|
||||
* @param Query $query
|
||||
* @param array $values
|
||||
* @return string
|
||||
*/
|
||||
public function insert_get_id(Query $query, $values)
|
||||
{
|
||||
return $this->insert($query, $values).' RETURNING '.$this->wrap('id');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user