Query.
Object that represents a query in the MySource 4 system.
- Since
- 4.0.0
Definition at line 22 of file Query.inc.
__construct |
( |
|
$queryid = '' , |
|
|
array |
$arrayRepresentation = array() , |
|
|
|
$sqlString = '' |
|
) |
| |
Creates a new query object with the data provided.
- Parameters
-
string | $queryid | The ID of the query to bake out. |
array | $arrayRepresentation | The structured array representation of the query. |
string | $sqlString | The SQL of the query. |
- Since
- 4.0.0
- Exceptions
-
Definition at line 124 of file Query.inc.
bind |
( |
|
$name, |
|
|
|
$value, |
|
|
|
$dataType = NULL |
|
) |
| |
Add binding to the query.
If value is an array then use arraySplit. If value is another Query then use merge.
- Parameters
-
string | $name | The name of the bind variable. |
mixed | $value | The value to set the variable to. |
integer | $dataType | The type to bind the value with. |
- Since
- 4.0.0
- Returns
- void
Definition at line 458 of file Query.inc.
getArrayRepresentation |
( |
| ) |
|
Returns the array representation.
- Since
- 4.0.0
- Returns
- string
Definition at line 157 of file Query.inc.
Returns list of bind variables.
- Since
- 4.0.0
- Returns
- array
Definition at line 316 of file Query.inc.
Returns the execution method.
For example: executeAssoc
- Since
- 4.0.0
- Returns
- string
Definition at line 438 of file Query.inc.
Returns the array representaion of this Query.
- Since
- 4.0.0
- Returns
- array
Definition at line 329 of file Query.inc.
Returns this query's id.
- Since
- 4.0.0
- Returns
- string
Definition at line 303 of file Query.inc.
Returns the type of execution this method has specified.
- Since
- 4.0.0
- Returns
- string
Definition at line 144 of file Query.inc.
getSql |
( |
|
$convert = FALSE | ) |
|
Returns the SQL string representaion of this Query.
- Parameters
-
boolean | $convert | If TRUE will perform conversion of the query into SQL before returning, otherwise the SQL is returned in its' current form. |
- Since
- 4.0.0
- Returns
- array
Definition at line 346 of file Query.inc.
keywords |
( |
array |
$keywords | ) |
|
Add keywords to the query.
array('keyword' => value)
- Parameters
-
array | $keywords | Array of keywords to add. |
- Since
- 4.0.0
- Returns
- void
Definition at line 583 of file Query.inc.
merge |
( |
|
$bindName, |
|
|
Query |
$query |
|
) |
| |
Merge a query into this one.
- Parameters
-
string | $bindName | The bind variable the query will replace. |
Query | $query | The query to merge as part of this one. |
- Since
- 4.0.0
- Returns
- boolean
Definition at line 173 of file Query.inc.
Prepare the query for execution and returns the PDOStatement.
- Since
- 4.0.0
- Returns
- PDOStatement
Definition at line 366 of file Query.inc.
Releases any OCI8 CLOB objects that may have been created here
- Since
- 4.0.0
- Returns
- array
Definition at line 596 of file Query.inc.
replaceBindVarName |
( |
|
$oldName, |
|
|
|
$newName |
|
) |
| |
Replaces the given bind varibale name with a new name in SQL string.
- Parameters
-
string | $oldName | Old name of the bind variable. |
string | $newName | New name of the bind variable. |
- Since
- 4.0.0
- Returns
- void
Definition at line 290 of file Query.inc.
Set the execution method.
For example: executeAssoc.
- Parameters
-
string | $method | The method to set for the query. |
- Since
- 4.0.0
- Returns
- void
Definition at line 423 of file Query.inc.
subQueries |
( |
|
$subQueryid, |
|
|
array |
$queries |
|
) |
| |
Adds sub queries (hooks) to the current query.
- Parameters
-
string | $subQueryid | The sub hookid to merge. |
array | $queries | The queries to add. |
- Since
- 4.0.0
- Returns
- void
Definition at line 559 of file Query.inc.
The documentation for this class was generated from the following file:
- /Users/webmaster/Desktop/squiz_matrix/core/lib/DAL/Query.inc