Zend Framework  1.12
Public Member Functions | List of all members
Zend_Cloud_DocumentService_QueryAdapter Interface Reference

Public Member Functions

 select ($select)
 SELECT clause (fields to be selected)
 
 from ($from)
 FROM clause (table name)
 
 where ($where, $value=null, $op= 'and')
 WHERE clause (conditions to be used)
 
 whereId ($value)
 WHERE clause for item ID.
 
 limit ($limit)
 LIMIT clause (how many rows ot return)
 
 order ($sort, $direction= 'asc')
 ORDER BY clause (sorting)
 
 assemble ()
 Assemble the query into a format the adapter can utilize.
 

Member Function Documentation

assemble ( )

Assemble the query into a format the adapter can utilize.

Returns
mixed

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.

from (   $from)
limit (   $limit)

LIMIT clause (how many rows ot return)

Parameters
int$limit
Returns
Zend_Cloud_DocumentService_QueryAdapter

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.

order (   $sort,
  $direction = 'asc' 
)

ORDER BY clause (sorting)

Parameters
string$sortColumn to sort by
string$directionDirection - asc/desc
Returns
Zend_Cloud_DocumentService_QueryAdapter

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.

select (   $select)

SELECT clause (fields to be selected)

Parameters
string$select
Returns
Zend_Cloud_DocumentService_QueryAdapter

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.

where (   $where,
  $value = null,
  $op = 'and' 
)

WHERE clause (conditions to be used)

Parameters
string$where
mixed$valueValue or array of values to be inserted instead of ?
string$opOperation to use to join where clauses (AND/OR)
Returns
Zend_Cloud_DocumentService_QueryAdapter

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.

whereId (   $value)

WHERE clause for item ID.

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

Parameters
mixed$valueRow ID for the document
Returns
Zend_Cloud_DocumentService_QueryAdapter

Implemented in Zend_Cloud_DocumentService_Query, and Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query.