@@ -94,7 +94,7 @@ This will allow you to use your registered alias like:
Query Builder
-------------
The database driver plugs right into the original query builder. When using mongodb connections you will be able to build fluent queries to perform database operations. For your convenience, there is a `collection` alias for `table` as well as some additional mongodb specific operations like `push` and `pull`.
The database driver plugs right into the original query builder. When using mongodb connections you will be able to build fluent queries to perform database operations. For your convenience, there is a `collection` alias for `table` as well as some additional mongodb specific operators/operations.
Selects documents if the array field is a specified size.
User::where('tags', 'size', 3)->get();
**Regex**
Selects documents where values match a specified regular expression.
User::where('name', 'regex', new MongoRegex("/.*doe/i"))->get();
**Type**
Selects documents if a field is of the specified type. For more information check: http://docs.mongodb.org/manual/reference/operator/query/type/#op._S_type
User::where('age', 'type', 2)->get();
**Mod**
Performs a modulo operation on the value of a field and selects documents with a specified result.
User::where('age', 'mod', array(10, 0))->get();
**Where**
Matches documents that satisfy a JavaScript expression. For more information check http://docs.mongodb.org/manual/reference/operator/query/where/#op._S_where
### Inserts, updates and deletes
All basic insert, update, delete and select methods should be implemented.