LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Generic query object
Aggregates operations in an array of clauses, where the first element describes the clause type, and the next element describes the criteria.

__call(
string $name, mixed $args
)
:
\Zend_Cloud_DocumentService_Query
Generic clause
You can use any clause by doing $query->foo('bar') but concrete adapters should be able to recognise it
The call will be iterpreted as clause 'foo' with argument 'bar'
Name | Type | Description |
---|---|---|
$name | string | Clause/method name |
$args | mixed |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

assemble(
)
:
array
"Assemble" the query
Simply returns the clauses present.
Type | Description |
---|---|
array |

from(
string $name
)
:
\Zend_Cloud_DocumentService_Query
FROM clause
Name | Type | Description |
---|---|---|
$name | string | Field names |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

getClauses(
)
:
array
Return query clauses as an array
Type | Description |
---|---|
array | Clauses in the query |

limit(
int $limit
)
:
\Zend_Cloud_DocumentService_Query
LIMIT clause (how many items to return)
Name | Type | Description |
---|---|---|
$limit | int |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

order(
string|int|array $sort, string $direction
=
'asc'
)
:
\Zend_Cloud_DocumentService_Query
ORDER clause; field or fields to sort by, and direction to sort
Name | Type | Description |
---|---|---|
$sort | string|int|array | |
$direction | string |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

select(
null|string|array $select
)
:
\Zend_Cloud_DocumentService_Query
SELECT clause (fields to be selected)
Name | Type | Description |
---|---|---|
$select | null|string|array |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

where(
string $cond, $value
=
null, string $op
=
'and'
)
:
\Zend_Cloud_DocumentService_Query
WHERE query
Name | Type | Description |
---|---|---|
$cond | string | Condition |
$value | ||
$op | string | relation to other clauses - and/or |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

whereId(
string|int $value
)
:
\Zend_Cloud_DocumentService_Query
Select record or fields by ID
Name | Type | Description |
---|---|---|
$value | string|int | Identifier to select by |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |