equal
deleted
inserted
replaced
11 * to license@zend.com so we can send you a copy immediately. |
11 * to license@zend.com so we can send you a copy immediately. |
12 * |
12 * |
13 * @category Zend |
13 * @category Zend |
14 * @package Zend_Cloud |
14 * @package Zend_Cloud |
15 * @subpackage DocumentService |
15 * @subpackage DocumentService |
16 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
16 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @license http://framework.zend.com/license/new-bsd New BSD License |
17 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 */ |
18 */ |
19 |
19 |
20 /* |
20 /* |
21 * @see Zend_Cloud_DocumentService_Query |
21 * @see Zend_Cloud_DocumentService_Query |
22 */ |
22 */ |
23 require_once 'Zend/Cloud/DocumentService/Query.php'; |
23 require_once 'Zend/Cloud/DocumentService/Query.php'; |
24 |
24 |
25 /** |
25 /** |
26 * Class implementing Query adapter for working with SimpleDb queries in a |
26 * Class implementing Query adapter for working with SimpleDb queries in a |
27 * structured way |
27 * structured way |
28 * |
28 * |
29 * @category Zend |
29 * @category Zend |
30 * @package Zend_Cloud |
30 * @package Zend_Cloud |
31 * @subpackage DocumentService |
31 * @subpackage DocumentService |
32 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
34 */ |
34 */ |
35 class Zend_Cloud_DocumentService_Adapter_SimpleDb_Query |
35 class Zend_Cloud_DocumentService_Adapter_SimpleDb_Query |
36 extends Zend_Cloud_DocumentService_Query |
36 extends Zend_Cloud_DocumentService_Query |
37 { |
37 { |
40 */ |
40 */ |
41 protected $_adapter; |
41 protected $_adapter; |
42 |
42 |
43 /** |
43 /** |
44 * Constructor |
44 * Constructor |
45 * |
45 * |
46 * @param Zend_Cloud_DocumentService_Adapter_SimpleDb $adapter |
46 * @param Zend_Cloud_DocumentService_Adapter_SimpleDb $adapter |
47 * @param null|string $collectionName |
47 * @param null|string $collectionName |
48 * @return void |
48 * @return void |
49 */ |
49 */ |
50 public function __construct(Zend_Cloud_DocumentService_Adapter_SimpleDb $adapter, $collectionName = null) |
50 public function __construct(Zend_Cloud_DocumentService_Adapter_SimpleDb $adapter, $collectionName = null) |
51 { |
51 { |
55 } |
55 } |
56 } |
56 } |
57 |
57 |
58 /** |
58 /** |
59 * Get adapter |
59 * Get adapter |
60 * |
60 * |
61 * @return Zend_Cloud_DocumentService_Adapter_SimpleDb |
61 * @return Zend_Cloud_DocumentService_Adapter_SimpleDb |
62 */ |
62 */ |
63 public function getAdapter() |
63 public function getAdapter() |
64 { |
64 { |
65 return $this->_adapter; |
65 return $this->_adapter; |
66 } |
66 } |
67 |
67 |
68 /** |
68 /** |
69 * Assemble the query into a format the adapter can utilize |
69 * Assemble the query into a format the adapter can utilize |
70 * |
70 * |
71 * @var string $collectionName Name of collection from which to select |
71 * @var string $collectionName Name of collection from which to select |
72 * @return string |
72 * @return string |
73 */ |
73 */ |
74 public function assemble($collectionName = null) |
74 public function assemble($collectionName = null) |
75 { |
75 { |
148 return $query; |
148 return $query; |
149 } |
149 } |
150 |
150 |
151 /** |
151 /** |
152 * Parse a where statement into service-specific language |
152 * Parse a where statement into service-specific language |
153 * |
153 * |
154 * @todo Ensure this fulfills the entire SimpleDB query specification for WHERE |
154 * @todo Ensure this fulfills the entire SimpleDB query specification for WHERE |
155 * @param string $where |
155 * @param string $where |
156 * @param array $args |
156 * @param array $args |
157 * @return string |
157 * @return string |
158 */ |
158 */ |
159 protected function _parseWhere($where, $args) |
159 protected function _parseWhere($where, $args) |
160 { |
160 { |
161 if (!is_array($args)) { |
161 if (!is_array($args)) { |