Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
cbde22af
Commit
cbde22af
authored
Jun 01, 2013
by
Gevik Babakhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Savepoint WIP QueryBuilder!
parent
04ebd122
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
QueryBuilder.php
framework/yii/db/pgsql/QueryBuilder.php
+48
-0
No files found.
framework/yii/db/pgsql/QueryBuilder.php
0 → 100644
View file @
cbde22af
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace
yii\db\pgsql
;
use
yii\db\Exception
;
use
yii\base\InvalidParamException
;
/**
* QueryBuilder is the query builder for PostgreSQL databases.
*
* @author Gevik Babakhani <gevikb@gmail.com>
* @since 2.0
*/
class
QueryBuilder
extends
\yii\db\QueryBuilder
{
/**
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'bigserial not null primary key'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
Schema
::
TYPE_INTEGER
=>
'integer'
,
Schema
::
TYPE_BIGINT
=>
'bigint'
,
Schema
::
TYPE_FLOAT
=>
'real'
,
Schema
::
TYPE_DECIMAL
=>
'decimal'
,
Schema
::
TYPE_DATETIME
=>
'timestamp'
,
Schema
::
TYPE_TIMESTAMP
=>
'timestamp'
,
Schema
::
TYPE_TIME
=>
'time'
,
Schema
::
TYPE_DATE
=>
'date'
,
Schema
::
TYPE_BINARY
=>
'bytea'
,
Schema
::
TYPE_BOOLEAN
=>
'boolean'
,
Schema
::
TYPE_MONEY
=>
'numeric(19,4)'
,
);
public
function
insert
(
$table
,
$columns
,
&
$params
)
{
$sql
=
parent
::
insert
(
$table
,
$columns
,
$params
);
return
$sql
.
' RETURNING *'
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment