Method |
Description |
|
__construct ( Connection $connection ) : void |
Create a new query builder instance. |
|
addToSet ( string $column, mixed $value = null ) : integer |
Append one unique value to the array key. |
|
aggregate ( string $function, string $column, array $query = [] ) : mixed |
Execute an aggregate function on the database. |
|
andWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder |
Add an "$and logical operation" clause to the query. |
|
andWhereAll ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$all comparison operation" clause to logical $and operation. |
|
andWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder |
Add a where between statement to logical $and operation. |
|
andWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder |
Add an "$exists element operation" clause to logical $and operation. |
|
andWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder |
Add an "$geoIntersects geospatial operation" clause to logical $and operation. |
|
andWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder |
Add an "$geoWithin geospatial operation" clause to logical $and operation. |
|
andWhereGt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gt comparison operation" clause to logical $and operation. |
|
andWhereGte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gte comparison operation" clause to logical $and operation. |
|
andWhereIn ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$in comparison operation" clause to logical $and operation. |
|
andWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder |
Add a like statement with $regex operation to logical $and operation. |
|
andWhereLt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lt comparison operation" clause to logical $and operation. |
|
andWhereLte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lte comparison operation" clause to logical $and operation. |
|
andWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder |
Add an "$mod element operation" clause to logical $and operation. |
|
andWhereNe ( string $column, string $value ) : LMongo\Query\Builder |
Add an "$ne comparison operation" clause to logical $and operation. |
|
andWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$near geospatial operation" clause to logical $and operation. |
|
andWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$nearSphere geospatial operation" clause to logical $and operation. |
|
andWhereNin ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$nin comparison operation" clause to logical $and operation. |
|
andWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder |
Add an "$regex JavaScript operation" clause to logical $and operation. |
|
andWhereSize ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$size array operation" clause to logical $and operation. |
|
andWhereType ( string $column, integer $type ) : LMongo\Query\Builder |
Add an "$type element operation" clause to logical $and operation. |
|
avg ( string $column, array $query = [] ) : mixed |
Retrieve the avg of the values of a given column. |
|
batchInsert ( array $data ) : mixed |
Insert a new documents into the database. |
|
collection ( string $collection ) : LMongo\Query\Builder |
Set the collection which the query is targeting. |
|
compileWheres ( Builder $query ) : array |
Compile the query |
|
count ( ) : integer |
Execute the query to return count. |
|
decrement ( string $column, integer $amount = 1, array $extra = [] ) : integer |
Decrement a column's value by a given amount. |
|
delete ( ) : integer |
Delete a document from the database. |
|
distinct ( string $column, array $query = [] ) : array |
Execute the query to only return distinct results. |
|
exists ( ) : boolean |
Determine if any document exist for the current query. |
|
find ( integer $id, array $columns = [] ) : mixed |
Execute a query for a single record by _id. |
|
first ( array $columns = [] ) : mixed |
Execute the query and get the first result. |
|
forPage ( integer $page, integer $perPage = 15 ) : LMongo\Query\Builder |
Set the limit and offset for a given page. |
|
generateCacheKey ( ) : string |
Generate the unique cache key for the query. |
|
get ( array $columns = [] ) : LMongo\Query\Cursor |
Execute the query. |
|
getAndResetWheres ( ) : array |
Get a copy of the where clauses and reset. |
|
getCacheKey ( ) : string |
Get a unique cache key for the complete query. |
|
getCached ( array $columns = [] ) : array |
Execute cached query. |
|
getConnection ( ) : Connection |
Get the database connection instance. |
|
getFresh ( array $columns = [], $cursor = false ) : array |
Execute fresh query. |
|
group ( array $initial, mixed $reduce, mixed $columns = [], array $options = [] ) : LMongo\Query\Cursor |
Execute a group command on the database. |
|
implode ( string $column, string $glue = null ) : string |
Concatenate values of a given column as a string. |
|
increment ( string $column, integer $amount = 1, array $extra = [] ) : integer |
Increment a column's value by a given amount. |
|
insert ( array $data ) : mixed |
Insert a new document into the database. |
|
max ( string $column, array $query = [] ) : mixed |
Retrieve the maximum value of a given column. |
|
min ( string $column, array $query = [] ) : mixed |
Retrieve the minimum value of a given column. |
|
newQuery ( ) : Builder |
new Query Builder instance |
|
norWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder |
Add an "$nor logical operation" clause to the query. |
|
norWhereAll ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$all comparison operation" clause to logical $nor operation. |
|
norWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder |
Add a where between statement to logical $nor operation. |
|
norWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder |
Add an "$exists element operation" clause to logical $nor operation. |
|
norWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder |
Add an "$geoIntersects geospatial operation" clause to logical $nor operation. |
|
norWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder |
Add an "$geoWithin geospatial operation" clause to logical $nor operation. |
|
norWhereGt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gt comparison operation" clause to logical $nor operation. |
|
norWhereGte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gte comparison operation" clause to logical $nor operation. |
|
norWhereIn ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$in comparison operation" clause to logical $nor operation. |
|
norWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder |
Add a like statement with $regex operation to logical $nor operation. |
|
norWhereLt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lt comparison operation" clause to logical $nor operation. |
|
norWhereLte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lte comparison operation" clause to logical $nor operation. |
|
norWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder |
Add an "$mod element operation" clause to logical $nor operation. |
|
norWhereNe ( string $column, string $value ) : LMongo\Query\Builder |
Add an "$ne comparison operation" clause to logical $nor operation. |
|
norWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$near geospatial operation" clause to logical $nor operation. |
|
norWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$nearSphere geospatial operation" clause to logical $nor operation. |
|
norWhereNin ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$nin comparison operation" clause to logical $nor operation. |
|
norWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder |
Add an "$regex JavaScript operation" clause to logical $nor operation. |
|
norWhereSize ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$size array operation" clause to logical $nor operation. |
|
norWhereType ( string $column, integer $type ) : LMongo\Query\Builder |
Add an "$type element operation" clause to logical $nor operation. |
|
orWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder |
Add an "$or logical operation" clause to the query. |
|
orWhereAll ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$all comparison operation" clause to logical $or operation. |
|
orWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder |
Add a where between statement to logical $or operation. |
|
orWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder |
Add an "$exists element operation" clause to logical $or operation. |
|
orWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder |
Add an "$geoIntersects geospatial operation" clause to logical $or operation. |
|
orWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder |
Add an "$geoWithin geospatial operation" clause to logical $or operation. |
|
orWhereGt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gt comparison operation" clause to logical $or operation. |
|
orWhereGte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gte comparison operation" clause to logical $or operation. |
|
orWhereIn ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$in comparison operation" clause to logical $or operation. |
|
orWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder |
Add a like statement with $regex operation to logical $or operation. |
|
orWhereLt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lt comparison operation" clause to logical $or operation. |
|
orWhereLte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lte comparison operation" clause to logical $or operation. |
|
orWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder |
Add an "$mod element operation" clause to logical $or operation. |
|
orWhereNe ( string $column, string $value ) : LMongo\Query\Builder |
Add an "$ne comparison operation" clause to logical $or operation. |
|
orWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$near geospatial operation" clause to logical $or operation. |
|
orWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder |
Add an "$nearSphere geospatial operation" clause to logical $or operation. |
|
orWhereNin ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$nin comparison operation" clause to logical $or operation. |
|
orWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder |
Add an "$regex JavaScript operation" clause to logical $or operation. |
|
orWhereSize ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$size array operation" clause to logical $or operation. |
|
orWhereType ( string $column, integer $type ) : LMongo\Query\Builder |
Add an "$type element operation" clause to logical $or operation. |
|
orderBy ( string $column, string $direction = 'asc' ) : LMongo\Query\Builder |
Add an "order by" clause to the query. |
|
paginate ( integer $perPage = 15, array $columns = [] ) : Illuminate\Pagination\Paginator |
Get a paginator. |
|
pluck ( string $column ) : mixed |
Pluck a single column from the database. |
|
pop ( string $column, integer $type = 1 ) : integer |
Remove the last element from the array key. |
|
pull ( string $column, mixed $value = null ) : integer |
Remove one value from the array key. |
|
pullAll ( string $column, mixed $value = null ) : integer |
Remove several value from the array key. |
|
push ( string $column, mixed $value = null ) : integer |
Append one value to the array key. |
|
pushAll ( string $column, array $values ) : integer |
Append several value to the array key. |
|
remember ( integer $minutes, string $key = null ) : Builder |
Indicate that the query results should be cached. |
|
remove ( ) : integer |
Alias of delete. |
|
renameField ( mixed $old, mixed $new = null ) : integer |
Renames a field. |
|
resetQuery ( ) : void |
Reset the query |
|
save ( array $data ) : mixed |
Save the document. Insert into the database if its not exists. |
|
setConnection ( Connection $connection ) : Connection |
Set the database connection instance. |
|
setField ( mixed $column, mixed $value = null ) : integer |
Set the values for the keys. |
|
skip ( integer $value ) : LMongo\Query\Builder |
Set the "offset" value of the query. |
|
sum ( string $column, array $query = [] ) : mixed |
Retrieve the sum of the values of a given column. |
|
take ( integer $value ) : LMongo\Query\Builder |
Set the "limit" value of the query. |
|
truncate ( ) : void |
Drop the collection. |
|
unsetField ( mixed $column ) : integer |
Unset or remove the given keys. |
|
update ( array $data ) : integer |
Update a document in the database. |
|
where ( string $column, mixed $value = null, string $logic = 'first' ) : LMongo\Query\Builder |
Add a basic where clause to the query. |
|
whereAll ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$all comparison operation" clause to logical operation. |
|
whereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder |
Add a where between statement to logical operation. |
|
whereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder |
Add an "$exists element operation" clause to logical operation. |
|
whereGeoIntersects ( string $column, string $geometry, array $coords, string $boolean = 'first' ) : LMongo\Query\Builder |
Add an "$geoIntersects geospatial operation" clause to logical operation. |
|
whereGeoWithin ( string $column, string $shape, array $coords, string $boolean = 'first' ) : LMongo\Query\Builder |
Add an "$geoWithin geospatial operation" clause to logical operation. |
|
whereGt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gt comparison operation" clause to logical operation. |
|
whereGte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$gte comparison operation" clause to logical operation. |
|
whereIn ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$in comparison operation" clause to logical operation. |
|
whereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder |
Add a like statement with $regex operation to logical operation. |
|
whereLt ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lt comparison operation" clause to logical operation. |
|
whereLte ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$lte comparison operation" clause to logical operation. |
|
whereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder |
Add an "$mod element operation" clause to logical operation. |
|
whereNe ( string $column, string $value ) : LMongo\Query\Builder |
Add an "$ne comparison operation" clause to logical operation. |
|
whereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null, string $boolean = 'first' ) : LMongo\Query\Builder |
Add an "$near geospatial operation" clause to logical operation. |
|
whereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null, string $boolean = 'first' ) : LMongo\Query\Builder |
Add an "$nearSphere geospatial operation" clause to logical operation. |
|
whereNested ( Closure $callback, string $logic = '$and' ) : LMongo\Query\Builder |
Add a nested where statement to the query. |
|
whereNin ( string $column, array $value ) : LMongo\Query\Builder |
Add an "$nin comparison operation" clause to logical operation. |
|
whereRegex ( string $column, mixed $value ) : LMongo\Query\Builder |
Add an "$regex JavaScript operation" clause to logical operation. |
|
whereSize ( string $column, integer $value ) : LMongo\Query\Builder |
Add an "$size array operation" clause to logical operation. |
|
whereType ( string $column, integer $type ) : LMongo\Query\Builder |
Add an "$type element operation" clause to logical operation. |
|