class MySQLQueryBuilder extends DBQueryBuilder (View source)

Builds a SQL query string from a SQLExpression object

Constants

MAX_ROWS

Max number of rows allowed in MySQL

Methods

string
getSeparator()

Determines the line separator to use.

string
buildSQL(SQLExpression $query, array $parameters)

Builds a sql query with the specified connection

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.

Details

string getSeparator()

Determines the line separator to use.

Return Value

string

Non-empty whitespace character

string buildSQL(SQLExpression $query, array $parameters)

Builds a sql query with the specified connection

Parameters

SQLExpression $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

The resulting SQL as a string

string buildDeleteFragment(SQLDelete $query, array $parameters)

Return the DELETE clause ready for inserting into a query.

Parameters

SQLDelete $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed delete part of statement

string buildUpdateFragment(SQLUpdate $query, array $parameters)

Return the UPDATE clause ready for inserting into a query.

Parameters

SQLUpdate $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed from part of statement

string buildFromFragment(SQLConditionalExpression $query, array $parameters)

Return the FROM clause ready for inserting into a query.

Parameters

SQLConditionalExpression $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed from part of statement

string buildWhereFragment(SQLConditionalExpression $query, array $parameters)

Returns the WHERE clauses ready for inserting into a query.

Parameters

SQLConditionalExpression $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed where condition

string buildOrderByFragment(SQLSelect $query, array $parameters)

Returns the ORDER BY clauses ready for inserting into a query.

Parameters

SQLSelect $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed order by part of statement

string buildGroupByFragment(SQLSelect $query, array $parameters)

Returns the GROUP BY clauses ready for inserting into a query.

Parameters

SQLSelect $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

Completed group part of statement

string buildHavingFragment(SQLSelect $query, array $parameters)

Returns the HAVING clauses ready for inserting into a query.

Parameters

SQLSelect $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

string buildLimitFragment(SQLSelect $query, array $parameters)

Return the LIMIT clause ready for inserting into a query.

Parameters

SQLSelect $query

The expression object to build from

array $parameters

Out parameter for the resulting query parameters

Return Value

string

The finalised limit SQL fragment