Skip to content

Commit

Permalink
Reworked QueryAdapter to QueryAdapterInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Baker committed Apr 22, 2012
1 parent 0e9c60a commit 4b1c842
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
*/
namespace Zend\Cloud\DocumentService\Adapter\WindowsAzure;

use Zend\Cloud\DocumentService\QueryAdapter,
use Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface,
Zend\Service\WindowsAzure\Storage\TableEntityQuery,
Zend\Cloud\DocumentService\Adapter\Exception;

3 changes: 1 addition & 2 deletions library/Zend/Cloud/DocumentService/Query.php
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@
*/
namespace Zend\Cloud\DocumentService;

use Zend\Cloud\DocumentService\QueryAdapter;

/**
* Generic query object
@@ -36,7 +35,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Query implements QueryAdapter
class Query implements QueryAdapter\QueryAdapterInterface
{
/**
* Known query types
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
/**
* namespace
*/
namespace Zend\Cloud\DocumentService;
namespace Zend\Cloud\DocumentService\QueryAdapter;

/**
* This interface describes the API that concrete query adapter should implement
@@ -42,7 +42,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface QueryAdapter
interface QueryAdapterInterface
{
/**
* SELECT clause (fields to be selected)
@@ -56,7 +56,7 @@ public function select($select);
* FROM clause (table name)
*
* @param string $from
* @return Zend\Cloud\DocumentService\QueryAdapter
* @return Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface
*/
public function from($from);

@@ -66,7 +66,7 @@ public function from($from);
* @param string $where
* @param mixed $value Value or array of values to be inserted instead of ?
* @param string $op Operation to use to join where clauses (AND/OR)
* @return Zend\Cloud\DocumentService\QueryAdapter
* @return Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface
*/
public function where($where, $value = null, $op = 'and');

@@ -77,15 +77,15 @@ public function where($where, $value = null, $op = 'and');
* have special syntax for primary keys
*
* @param mixed $value Row ID for the document
* @return Zend\Cloud\DocumentService\QueryAdapter
* @return Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface
*/
public function whereId($value);

/**
* LIMIT clause (how many rows ot return)
*
* @param int $limit
* @return Zend\Cloud\DocumentService\QueryAdapter
* @return Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface
*/
public function limit($limit);

@@ -94,7 +94,7 @@ public function limit($limit);
*
* @param string $sort Column to sort by
* @param string $direction Direction - asc/desc
* @return Zend\Cloud\DocumentService\QueryAdapter
* @return Zend\Cloud\DocumentService\QueryAdapter\QueryAdapterInterface
*/
public function order($sort, $direction = 'asc');

0 comments on commit 4b1c842

Please sign in to comment.