SQLExpression
abstract class SQLExpression (View source)
Abstract base class for an object representing an SQL query.
The various parts of the SQL query can be manipulated individually.
Methods
replaceText(string $old, string $new)
Swap some text in the SQL query with another.
string
__toString()
Return the generated SQL string for this query
renameTable(string $old, string $new)
Swap the use of one table with another.
bool
isEmpty()
Determine if this query is empty, and thus cannot be executed
string
sql(array $parameters = array())
Generate the SQL statement for this query.
Details
replaceText(string $old, string $new)
Swap some text in the SQL query with another.
Note that values in parameters will not be replaced
string
__toString()
Return the generated SQL string for this query
renameTable(string $old, string $new)
Swap the use of one table with another.
abstract bool
isEmpty()
Determine if this query is empty, and thus cannot be executed
string
sql(array $parameters = array())
Generate the SQL statement for this query.
Query
execute()
Execute this query.