Class implementing Query adapter for working with Azure queries in a structured way

todo Look into preventing a query injection attack.
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

Constructor

__construct(null|\Zend_Service_WindowsAzure_Storage_TableEntityQuery $select = null) : void

Parameters

$select

null\Zend_Service_WindowsAzure_Storage_TableEntityQuery

Table select object

Assemble query

assemble() : \Zend_Service_WindowsAzure_Storage_TableEntityQuery

Simply return the WindowsAzure table entity query object

inherited_from \Zend_Cloud_DocumentService_QueryAdapter::assemble()

Returns

\Zend_Service_WindowsAzure_Storage_TableEntityQuery

FROM clause (table name)

from(string $from) : \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query
inherited_from \Zend_Cloud_DocumentService_QueryAdapter::from()

Parameters

$from

string

Returns

\Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

Get Azure select query

getAzureSelect() : \Zend_Service_WindowsAzure_Storage_TableEntityQuery

Returns

\Zend_Service_WindowsAzure_Storage_TableEntityQuery

LIMIT clause (how many rows to return)

limit(integer $limit) : \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query
inherited_from \Zend_Cloud_DocumentService_QueryAdapter::limit()

Parameters

$limit

integer

Returns

\Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

ORDER BY clause (sorting)

order(string $sort, string $direction = 'asc') : \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query
todo Azure service doesn't seem to support this yet; emulate?
inherited_from \Zend_Cloud_DocumentService_QueryAdapter::order()

Parameters

$sort

string

Column to sort by

$direction

string

Direction - asc/desc

Exceptions

\Zend_Cloud_OperationNotAvailableException

Returns

\Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

SELECT clause (fields to be selected)

select(string $select) : \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

Does nothing for Azure.

inherited_from \Zend_Cloud_DocumentService_QueryAdapter::select()

Parameters

$select

string

Returns

\Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

WHERE clause (conditions to be used)

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

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_Adapter_WindowsAzure_Query

WHERE clause for item ID

whereId(array $value) : \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

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

inherited_from \Zend_Cloud_DocumentService_QueryAdapter::whereId()

Parameters

$value

array

Row ID for the document (PartitionKey, RowKey)

Returns

\Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query

 Properties

 

Azure concrete query

$_azureSelect : \Zend_Service_WindowsAzure_Storage_TableEntityQuery

Default