Cloud/DocumentService/QueryAdapter.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_QueryAdapter
Package: Zend_Cloud\DocumentService
Returns
This interface describes the API that concrete query adapter should implement
Common interface for document storage services in the cloud. This interface
supports most document services and provides some flexibility for
vendor-specific features and requirements via an optional $options array in
each method signature. Classes implementing this interface should implement
URI construction for collections and documents from the parameters given in each
method and the account data passed in to the constructor. Classes
implementing this interface are also responsible for security; access control
isn't currently supported in this interface, although we are considering
access control support in future versions of the interface. Query
optimization mechanisms are also not supported in this version.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods
assemble() : mixed
Assemble the query into a format the adapter can utilize
Returns
Type | Description |
---|---|
mixed |
from(string $from) : \Zend_Cloud_DocumentService_QueryAdapter
FROM clause (table name)
Parameters
Returns
Name | Type | Description |
---|---|---|
$from | string |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |
limit(int $limit) : \Zend_Cloud_DocumentService_QueryAdapter
LIMIT clause (how many rows ot return)
Parameters
Returns
Name | Type | Description |
---|---|---|
$limit | int |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |
order(string $sort, string $direction = 'asc') : \Zend_Cloud_DocumentService_QueryAdapter
ORDER BY clause (sorting)
Parameters
Returns
Name | Type | Description |
---|---|---|
$sort | string | Column to sort by |
$direction | string | Direction - asc/desc |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |
select(string $select) : \Zend_Cloud_DocumentService_QueryAdapter
SELECT clause (fields to be selected)
Parameters
Returns
Name | Type | Description |
---|---|---|
$select | string |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |
where(string $where, mixed $value = null, string $op = 'and') : \Zend_Cloud_DocumentService_QueryAdapter
WHERE clause (conditions to be used)
Parameters
Returns
Name | Type | Description |
---|---|---|
$where | string | |
$value | mixed | Value or array of values to be inserted instead of ? |
$op | string | Operation to use to join where clauses (AND/OR) |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |
whereId(mixed $value) : \Zend_Cloud_DocumentService_QueryAdapter
WHERE clause for item ID
This one should be used when fetching specific rows since some adapters
have special syntax for primary keys
ParametersName | Type | Description |
---|---|---|
$value | mixed | Row ID for the document |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_QueryAdapter |