PostgreSQLQueryBuilder
class PostgreSQLQueryBuilder extends DBQueryBuilder (View source)
Constants
MAX_TABLE |
Max table length. Aliases longer than this will be re-written |
Methods
Returns the SELECT clauses ready for inserting into a query.
Return the DELETE clause ready for inserting into a query.
Return the UPDATE clause ready for inserting into a query.
Return the FROM clause ready for inserting into a query.
Returns the WHERE clauses ready for inserting into a query.
Returns the ORDER BY clauses ready for inserting into a query.
Returns the GROUP BY clauses ready for inserting into a query.
Returns the HAVING clauses ready for inserting into a query.
Return the LIMIT clause ready for inserting into a query.
Find and generate table aliases necessary in the given query
Rewrite all AS "Identifier"
with strlen(Identifier) > 63
Details
string
getSeparator()
Determines the line separator to use.
string
buildSQL(SQLExpression $query, array $parameters)
Builds a sql query with the specified connection
protected string
buildSelectQuery(SQLSelect $query, array $parameters)
Builds a query from a SQLSelect expression
protected string
buildDeleteQuery(SQLDelete $query, array $parameters)
Builds a query from a SQLDelete expression
protected string
buildInsertQuery(SQLInsert $query, array $parameters)
Builds a query from a SQLInsert expression
protected string
buildUpdateQuery(SQLUpdate $query, array $parameters)
Builds a query from a SQLUpdate expression
protected string
buildSelectFragment(SQLSelect $query, array $parameters)
Returns the SELECT clauses ready for inserting into a query.
string
buildDeleteFragment(SQLDelete $query, array $parameters)
Return the DELETE clause ready for inserting into a query.
string
buildUpdateFragment(SQLUpdate $query, array $parameters)
Return the UPDATE clause ready for inserting into a query.
string
buildFromFragment(SQLConditionalExpression $query, array $parameters)
Return the FROM clause ready for inserting into a query.
string
buildWhereFragment(SQLConditionalExpression $query, array $parameters)
Returns the WHERE clauses ready for inserting into a query.
string
buildOrderByFragment(SQLSelect $query, array $parameters)
Returns the ORDER BY clauses ready for inserting into a query.
string
buildGroupByFragment(SQLSelect $query, array $parameters)
Returns the GROUP BY clauses ready for inserting into a query.
string
buildHavingFragment(SQLSelect $query, array $parameters)
Returns the HAVING clauses ready for inserting into a query.
string
buildLimitFragment(SQLSelect $query, array $parameters)
Return the LIMIT clause ready for inserting into a query.
protected array
findRewrites(SQLConditionalExpression $query)
Find and generate table aliases necessary in the given query
protected string
rewriteLongIdentifiers(SQLExpression $query, string $sql)
Rewrite all AS "Identifier"
with strlen(Identifier) > 63