class SQLExpression

Abstract base class for an object representing an SQL query.

The various parts of the SQL query can be manipulated individually.

Methods

__get($field) deprecated

No description

__set($field, $value) deprecated

No description

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.

execute()

Execute this query.

Details

at line 29
__get($field) deprecated

deprecated since version 4.0

Parameters

$field

at line 37
__set($field, $value) deprecated

deprecated since version 4.0

Parameters

$field
$value

at line 52
replaceText(string $old, string $new)

Swap some text in the SQL query with another.

Note that values in parameters will not be replaced

Parameters

string $old The old text (escaped)
string $new The new text (escaped)

at line 64
string __toString()

Return the generated SQL string for this query

Return Value

string

at line 82
renameTable(string $old, string $new)

Swap the use of one table with another.

Parameters

string $old Name of the old table (unquoted, escaped)
string $new Name of the new table (unquoted, escaped)

at line 93
abstract bool isEmpty()

Determine if this query is empty, and thus cannot be executed

Return Value

bool Flag indicating that this query is empty

at line 101
string sql(array $parameters = array())

Generate the SQL statement for this query.

Parameters

array $parameters Out variable for parameters required for this query

Return Value

string The completed SQL query

at line 119
SS_Query execute()

Execute this query.

Return Value

SS_Query