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
package Zend_Cloud
subpackage DocumentService
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Assemble the query into a format the adapter can utilize

assemble() : mixed

Returns

mixed

FROM clause (table name)

from(string $from) : \Zend_Cloud_DocumentService_QueryAdapter

Parameters

$from

string

Returns

\Zend_Cloud_DocumentService_QueryAdapter

LIMIT clause (how many rows ot return)

limit(integer $limit) : \Zend_Cloud_DocumentService_QueryAdapter

Parameters

$limit

integer

Returns

\Zend_Cloud_DocumentService_QueryAdapter

ORDER BY clause (sorting)

order(string $sort, string $direction = 'asc') : \Zend_Cloud_DocumentService_QueryAdapter

Parameters

$sort

string

Column to sort by

$direction

string

Direction - asc/desc

Returns

\Zend_Cloud_DocumentService_QueryAdapter

SELECT clause (fields to be selected)

select(string $select) : \Zend_Cloud_DocumentService_QueryAdapter

Parameters

$select

string

Returns

\Zend_Cloud_DocumentService_QueryAdapter

WHERE clause (conditions to be used)

where(string $where, mixed $value = null, string $op = 'and') : \Zend_Cloud_DocumentService_QueryAdapter

Parameters

$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)

Returns

\Zend_Cloud_DocumentService_QueryAdapter

WHERE clause for item ID

whereId(mixed $value) : \Zend_Cloud_DocumentService_QueryAdapter

This one should be used when fetching specific rows since some adapters have special syntax for primary keys

Parameters

$value

mixed

Row ID for the document

Returns

\Zend_Cloud_DocumentService_QueryAdapter