Implementation of a query, specific to the MySQLi driver.
Methods
Default constructor.
__construct(\WebLab_Data_Adapter $adapter)
Inherited
Sets the optional database adapter if supplied.
| inherited_from |
\WebLab_Data_Query::__construct() |
Parameters
Add multiple tables to the query.
addTables() : \WebLab_Data_Query
Inherited
This equals the FROM statement.
| see |
\addTable() |
| inherited_from |
\WebLab_Data_Query::addTables() |
Returns
Remove limit from query.
clearLimit()
Inherited
| inherited_from |
\WebLab_Data_Query::clearLimit() |
Force query to calcuate the length of the result without a limit.
countLimitless(boolean $count)
Inherited
Special option, might not work in every implementation.
| inherited_from |
\WebLab_Data_Query::countLimitless() |
Parameters
$count
boolean
Performs a DELETE query on the underlying database.
delete() : \WebLab_Data_MySQLi_Result
The query is created using a QueryBuilder that converts this
query object into a statement.
Returns
Get the database adapter currently in use.
getAdapter() : \WebLab_Data_Adapter
Inherited
| inherited_from |
\WebLab_Data_Query::getAdapter() |
Returns
Returns if this query is forced to load the entire length.
getCountLimitless() : boolean
Inherited
Exceptions
Returns
boolean
Gets the criteriachain for this query.
getCriteria() : \WebLab_Data_CriteriaChain
Inherited
Criteria chain equals the WHERE statement in a query.
| inherited_from |
\WebLab_Data_Query::getCriteria() |
Returns
Gets the criteriachain for this query.
getCriteriaChain() : \WebLab_Data_CriteriaChain
Inherited
Criteria chain equals the WHERE statement in a query.
| see |
\getCriteria() |
| inherited_from |
\WebLab_Data_Query::getCriteriaChain() |
Returns
Gets the criteriachain for this query.
getHaving() : \WebLab_Data_CriteriaChain
Inherited
Criteria chain equals the HAVING statement in a query.
| inherited_from |
\WebLab_Data_Query::getHaving() |
Returns
Get the limit that has been set on this query.
getLimit() : mixed
Inherited
| inherited_from |
\WebLab_Data_Query::getLimit() |
Returns
mixedAn object with keys count and start.
Get a table instance by it's name.
getTable(String $table) : \WebLab_Data_Table
Inherited
| inherited_from |
\WebLab_Data_Query::getTable() |
Parameters
$table
String
Returns
Get all table instances in this query.
getTables() : \WebLab_Data_Table[]
Inherited
| inherited_from |
\WebLab_Data_Query::getTables() |
Returns
Performs an INSERT query on the underlying database.
insert(boolean $update, mixed $ignoreInUpdate) : \WebLab_Data_MySQLi_Result
The query is created using a QueryBuilder that converts this
query object into a statement.
Parameters
$update
booleanShould the record be updated if it already exists. ( uses ON DUPLICATE KEY syntax )
$ignoreInUpdate
mixedFields not to update if $update is set to true.
Returns
Performs a SELECT query on the underlying database.
select() : \WebLab_Data_MySQLi_Result
The query is created using a QueryBuilder that converts this
query object into a statement.
Returns
Set the database adapter to use.
setAdapter(\WebLab_Data_Adapter $adapter)
Inherited
| inherited_from |
\WebLab_Data_Query::setAdapter() |
Parameters
Set a limit on the query.
setLimit(int $count, int $start)
Inherited
| inherited_from |
\WebLab_Data_Query::setLimit() |
Parameters
$count
int
$start
int
Exceptions
Performs an UPDATE query on the underlying database.
update() : \WebLab_Data_MySQLi_Result
The query is created using a QueryBuilder that converts this
query object into a statement.
Returns
Check if the query has access to an active database connection.
_isConnected() : boolean
Inherited
| inherited_from |
\WebLab_Data_Query::_isConnected() |
Exceptions
Returns
boolean
Properties
$_last_query : string
Inherited
| inherited_from |
\WebLab_Data_Query::$$_last_query |
$_count_limitless : boolean
Inherited
| inherited_from |
\WebLab_Data_Query::$$_count_limitless |
$_criteriaChain : \WebLab_Data_CriteriaChain
Inherited
This is used to build the WHERE statement.
| inherited_from |
\WebLab_Data_Query::$$_criteriaChain |
$_havingChain : \WebLab_Data_CriteriaChain
Inherited
This is used to build the HAVING statement.
| inherited_from |
\WebLab_Data_Query::$$_havingChain |
$_limit : object
Inherited
| inherited_from |
\WebLab_Data_Query::$$_limit |