Cloud/DocumentService/Query.php
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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- DocumentService
\Zend_Cloud_DocumentService_Query
Package: Zend_Cloud\DocumentService
Returns
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.
- Implements
- Children
- \Zend_Cloud_DocumentService_Adapter_SimpleDb_Query
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
Methods
__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'
ParametersName | 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.
ReturnsType | Description |
---|---|
array |
from(string $name) : \Zend_Cloud_DocumentService_Query
FROM clause
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string | Field names |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |
limit(int $limit) : \Zend_Cloud_DocumentService_Query
LIMIT clause (how many items to return)
Parameters
Returns
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
Parameters
Returns
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)
Parameters
Returns
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
Parameters
Returns
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
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string | int | Identifier to select by |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |