Cloud/DocumentService/Adapter/SimpleDb.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 license@zend.com 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_Adapter_SimpleDb
Package: Zend_Cloud\DocumentService








Returns




Returns
SimpleDB adapter for document service.
Provides functionality surrounding setting classes for each of:
- document objects
- document set objects
- query class objects
- Parent(s)
- \Zend_Cloud_DocumentService_Adapter_AbstractAdapter
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
Methods


__construct(array | \Zend_Config $options = array()) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config |


createCollection(string $name, array $options = null) : void
Create collection.
Parameters
Name | Type | Description |
---|---|---|
$name | string | |
$options | array |


deleteCollection(string $name, array $options = null) : void
Delete collection.
Parameters
Name | Type | Description |
---|---|---|
$name | string | |
$options | array |


deleteDocument(string $collectionName, mixed $document, array $options = null) : boolean
Delete document.
Parameters
Returns
Name | Type | Description |
---|---|---|
$collectionName | string | Collection from which to delete document |
$document | mixed | Document ID or Document object. |
$options | array |
Type | Description |
---|---|
boolean |


fetchDocument(string $collectionName, mixed $documentId, array $options = null) : \Zend_Cloud_DocumentService_Document
Fetch single document by ID
Parameters
Returns
Name | Type | Description |
---|---|---|
$collectionName | string | Collection name |
$documentId | mixed | Document ID, adapter-dependent |
$options | array |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Document |


getClient() : \Zend_Service_Amazon_SimpleDb
Get the concrete service client
Returns
Type | Description |
---|---|
\Zend_Service_Amazon_SimpleDb |


insertDocument(string $collectionName, array | \Zend_Cloud_DocumentService_Document $document, array $options = null) : void
Insert document
Parameters
Name | Type | Description |
---|---|---|
$collectionName | string | Collection into which to insert document |
$document | array | \Zend_Cloud_DocumentService_Document | |
$options | array |


listCollections(array $options = null) : array
List collections.
Parameters
Returns
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
array |


listDocuments(string $collectionName, array | null $options = null) : \Zend_Cloud_DocumentService_DocumentSet
List documents
Returns a key/value array of document names to document objects.
ParametersName | Type | Description |
---|---|---|
$collectionName | string | Name of collection for which to list documents |
$options | array | null |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_DocumentSet |


query(string $collectionName, string $query, array $options = null) : array
Query for documents stored in the document service. If a string is passed in $query, the query string will be passed directly to the service.
Parameters
Returns
Name | Type | Description |
---|---|---|
$collectionName | string | Collection name |
$query | string | |
$options | array |
Type | Description |
---|---|
array | Zend_Cloud_DocumentService_DocumentSet |


replaceDocument(string $collectionName, array | \Zend_Cloud_DocumentService_Document $document, array $options = null) : void
Replace an existing document with a new version
Parameters
Name | Type | Description |
---|---|---|
$collectionName | string | |
$document | array | \Zend_Cloud_DocumentService_Document | |
$options | array |


select(string $fields = null) : \Zend_Cloud_DocumentService_Adapter_SimpleDb_Query
Create query statement
Parameters
Returns
Name | Type | Description |
---|---|---|
$fields | string |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Adapter_SimpleDb_Query |


updateDocument(string $collectionName, mixed | \Zend_Cloud_DocumentService_Document $documentId, array | \Zend_Cloud_DocumentService_Document $fieldset = null, array $options = null) : boolean
Update document. The new document replaces the existing document.
Option 'merge' specifies to add all attributes (if true) or
specific attributes ("attr" => true) instead of replacing them.
By default, attributes are replaced.
ParametersName | Type | Description |
---|---|---|
$collectionName | string | |
$documentId | mixed | \Zend_Cloud_DocumentService_Document | Document ID, adapter-dependent |
$fieldset | array | \Zend_Cloud_DocumentService_Document | Set of fields to update |
$options | array |
Type | Description |
---|---|
boolean |