Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Query builder improvements #128

Merged
merged 34 commits into from
Sep 2, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0964c90
Query::execute() should use a copy of the $options property
jmikola Aug 13, 2013
2e266d8
Refactor Builder::sort() to not use recursion
jmikola Aug 13, 2013
d6ec8e9
Do not filter out falsey values in Query/Builder debug() methods
jmikola Aug 13, 2013
1ea8ddc
Query::debug() should access the entire $query property
jmikola Aug 14, 2013
1685790
Support values and expressions for $pull in query builder
jmikola Aug 13, 2013
0d10218
Rename argument for Expr pullAll/pushAll methods
jmikola Aug 14, 2013
f32e433
Remove recursive merging in Expr::addManyToSet()
jmikola Aug 14, 2013
c159d27
Implement Expr::each() and allow it to be used with addToSet()
jmikola Aug 14, 2013
5999f15
Deprecate Expr::addManyToSet() in favor of addToSet() and each()
jmikola Aug 14, 2013
0d88e84
Support $each/$slice/$sort operators with push()
jmikola Aug 14, 2013
ac04fff
Expr::push() should ensure $each operator appears first
jmikola Aug 14, 2013
975b247
Test array/Expr arguments for logical operators and elemMatch
jmikola Aug 14, 2013
8207985
Use casting and array type-hinting for method args
jmikola Aug 14, 2013
4ee53d6
Formatting Builder method docs
jmikola Aug 14, 2013
a512d7f
Expr::where() need not alter the current field
jmikola Aug 14, 2013
de44c42
Builder mapReduceOptions/out methods should require mapReduce command
jmikola Aug 14, 2013
08ade88
Support GeoJSON in Builder::geoNear() and set spherical default
jmikola Aug 14, 2013
5a31a2b
Make query type equality checks consistent
jmikola Aug 15, 2013
16a92eb
Builder::map() should init full query array, default to inline output
jmikola Aug 15, 2013
a7ba5c2
Refactor Builder/Expr set() and add tests
jmikola Aug 15, 2013
e6dfbc3
Remove optional fields from Builder::$query array
jmikola Aug 15, 2013
66e0355
Fix preparation of group "cond" option in Query::execute()
jmikola Aug 15, 2013
fe4b3ca
Rename Query::DISTINCT_FIELD to DISTINCT
jmikola Aug 15, 2013
93d9a99
Throw exception for invalid query types in Query constructor
jmikola Aug 15, 2013
f19c70b
Refactor Query execution and Builder array structure
jmikola Aug 15, 2013
7735482
Query should allow a single cursor hint to be specified
jmikola Aug 15, 2013
a040ddf
Query should apply "limit" option for mapReduce commands
jmikola Aug 15, 2013
ee0f3c3
Fix Collection::count() return type documentation
jmikola Aug 30, 2013
7cc7c5e
Add docblocks to Expr methods (mostly copied from Builder)
jmikola Aug 30, 2013
9e117fe
Add array type-hint to Builder and Expr::all()
jmikola Aug 30, 2013
7f67505
Don't document string argument for Builder and Expr::type()
jmikola Aug 30, 2013
b5f3e0c
Query::getIterator() should not execute if an exception is guaranteed
jmikola Aug 30, 2013
b926926
Deprecate Query::iterate() alias in favor of getIterator()
jmikola Aug 30, 2013
d13aab0
Update references to IteratorAggregate interface methods in Query
jmikola Aug 30, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/Doctrine/MongoDB/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function batchInsert(array &$a, array $options = array())
* @param array $query
* @param integer $limit
* @param integer $skip
* @return ArrayIterator
* @return integer
*/
public function count(array $query = array(), $limit = 0, $skip = 0)
{
Expand Down Expand Up @@ -1159,6 +1159,7 @@ protected function doNear($near, array $query, array $options)
$command = array();
$command['geoNear'] = $this->getMongoCollection()->getName();
$command['near'] = $near;
$command['spherical'] = isset($near['type']);
$command['query'] = (object) $query;
$command = array_merge($command, $options);

Expand Down
Loading