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.
Properties
protected | array | $replacementsOld | Keep an internal register of find/replace pairs to execute when it's time to actually get the query SQL. |
|
protected | array | $replacementsNew | Keep an internal register of find/replace pairs to execute when it's time to actually get the query SQL. |
Methods
Copies the query parameters contained in this object to another SQLExpression
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 = [])
Generate the SQL statement for this query.
Query
execute()
Execute this query.
protected
copyTo(SQLExpression $object)
Copies the query parameters contained in this object to another SQLExpression