PHP 클래스 LMongo\Query\Builder

파일 보기 프로젝트 열기: navruzm/lmongo 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$collection string The database collection
$columns array The columns that should be returned.
$limit integer The maximum number of documents to return.
$offset integer The number of documents to skip.
$orders array The orderings for the query.
$wheres array The where constraints for the query.

보호된 프로퍼티들

프로퍼티 타입 설명
$cacheKey string The key that should be used when caching the query.
$cacheMinutes integer The number of minutes to cache the query.
$connection LMongo\Connection The database connection instance.
$first boolean Indicates if the first where set or not.

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
compileWhereBasic ( Builder $query, array $where ) : array Compile a basic operation clause.
compileWhereNested ( Builder $query, array $where ) : array Compile a nested operation clause.
getCacheCallback ( array $columns ) : Closure Get the Closure callback used when caching queries.
getCacheInfo ( ) : array Get the cache key and cache minutes as an array.
performUpdate ( array $query ) : integer Perform update.

비공개 메소드들

메소드 설명
prepareColumns ( ) : array Retrieve the select statement.
prepareOrderBy ( mixed $direction ) : integer Transform sql style order statement to mongodb style.

메소드 상세

__construct() 공개 메소드

Create a new query builder instance.
public __construct ( Connection $connection ) : void
$connection LMongo\Connection
리턴 void

addToSet() 공개 메소드

Append one unique value to the array key.
public addToSet ( string $column, mixed $value = null ) : integer
$column string
$value mixed
리턴 integer

aggregate() 공개 메소드

Execute an aggregate function on the database.
public aggregate ( string $function, string $column, array $query = [] ) : mixed
$function string
$column string
$query array
리턴 mixed

andWhere() 공개 메소드

Add an "$and logical operation" clause to the query.
public andWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

andWhereAll() 공개 메소드

Add an "$all comparison operation" clause to logical $and operation.
public andWhereAll ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

andWhereBetween() 공개 메소드

Add a where between statement to logical $and operation.
public andWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder
$column string
$min integer
$max integer
리턴 LMongo\Query\Builder

andWhereExists() 공개 메소드

Add an "$exists element operation" clause to logical $and operation.
public andWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder
$column string
$exists boolean
리턴 LMongo\Query\Builder

andWhereGeoIntersects() 공개 메소드

Add an "$geoIntersects geospatial operation" clause to logical $and operation.
public andWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder
$column string
$geometry string
$coords array
리턴 LMongo\Query\Builder

andWhereGeoWithin() 공개 메소드

Add an "$geoWithin geospatial operation" clause to logical $and operation.
public andWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder
$column string
$shape string
$coords array
리턴 LMongo\Query\Builder

andWhereGt() 공개 메소드

Add an "$gt comparison operation" clause to logical $and operation.
public andWhereGt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

andWhereGte() 공개 메소드

Add an "$gte comparison operation" clause to logical $and operation.
public andWhereGte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

andWhereIn() 공개 메소드

Add an "$in comparison operation" clause to logical $and operation.
public andWhereIn ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

andWhereLike() 공개 메소드

Add a like statement with $regex operation to logical $and operation.
public andWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder
$column string
$value mixed
$flags string
리턴 LMongo\Query\Builder

andWhereLt() 공개 메소드

Add an "$lt comparison operation" clause to logical $and operation.
public andWhereLt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

andWhereLte() 공개 메소드

Add an "$lte comparison operation" clause to logical $and operation.
public andWhereLte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

andWhereMod() 공개 메소드

Add an "$mod element operation" clause to logical $and operation.
public andWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder
$column string
$divisor integer
$remainder integer
리턴 LMongo\Query\Builder

andWhereNe() 공개 메소드

Add an "$ne comparison operation" clause to logical $and operation.
public andWhereNe ( string $column, string $value ) : LMongo\Query\Builder
$column string
$value string
리턴 LMongo\Query\Builder

andWhereNear() 공개 메소드

Add an "$near geospatial operation" clause to logical $and operation.
public andWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

andWhereNearSphere() 공개 메소드

Add an "$nearSphere geospatial operation" clause to logical $and operation.
public andWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

andWhereNin() 공개 메소드

Add an "$nin comparison operation" clause to logical $and operation.
public andWhereNin ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

andWhereRegex() 공개 메소드

Add an "$regex JavaScript operation" clause to logical $and operation.
public andWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

andWhereSize() 공개 메소드

Add an "$size array operation" clause to logical $and operation.
public andWhereSize ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

andWhereType() 공개 메소드

Add an "$type element operation" clause to logical $and operation.
public andWhereType ( string $column, integer $type ) : LMongo\Query\Builder
$column string
$type integer
리턴 LMongo\Query\Builder

avg() 공개 메소드

Retrieve the avg of the values of a given column.
public avg ( string $column, array $query = [] ) : mixed
$column string
$query array
리턴 mixed

batchInsert() 공개 메소드

Insert a new documents into the database.
public batchInsert ( array $data ) : mixed
$data array
리턴 mixed

collection() 공개 메소드

Set the collection which the query is targeting.
public collection ( string $collection ) : LMongo\Query\Builder
$collection string
리턴 LMongo\Query\Builder

compileWhereBasic() 보호된 메소드

Compile a basic operation clause.
protected compileWhereBasic ( Builder $query, array $where ) : array
$query Builder
$where array
리턴 array

compileWhereNested() 보호된 메소드

Compile a nested operation clause.
protected compileWhereNested ( Builder $query, array $where ) : array
$query Builder
$where array
리턴 array

compileWheres() 공개 메소드

Compile the query
public compileWheres ( Builder $query ) : array
$query Builder
리턴 array

count() 공개 메소드

Execute the query to return count.
public count ( ) : integer
리턴 integer

decrement() 공개 메소드

Decrement a column's value by a given amount.
public decrement ( string $column, integer $amount = 1, array $extra = [] ) : integer
$column string
$amount integer
$extra array
리턴 integer

delete() 공개 메소드

Delete a document from the database.
public delete ( ) : integer
리턴 integer

distinct() 공개 메소드

Execute the query to only return distinct results.
public distinct ( string $column, array $query = [] ) : array
$column string
$query array
리턴 array

exists() 공개 메소드

Determine if any document exist for the current query.
public exists ( ) : boolean
리턴 boolean

find() 공개 메소드

Execute a query for a single record by _id.
public find ( integer $id, array $columns = [] ) : mixed
$id integer
$columns array
리턴 mixed

first() 공개 메소드

Execute the query and get the first result.
public first ( array $columns = [] ) : mixed
$columns array
리턴 mixed

forPage() 공개 메소드

Set the limit and offset for a given page.
public forPage ( integer $page, integer $perPage = 15 ) : LMongo\Query\Builder
$page integer
$perPage integer
리턴 LMongo\Query\Builder

generateCacheKey() 공개 메소드

Generate the unique cache key for the query.
public generateCacheKey ( ) : string
리턴 string

get() 공개 메소드

Execute the query.
public get ( array $columns = [] ) : LMongo\Query\Cursor
$columns array
리턴 LMongo\Query\Cursor

getAndResetWheres() 공개 메소드

Get a copy of the where clauses and reset.
public getAndResetWheres ( ) : array
리턴 array

getCacheCallback() 보호된 메소드

Get the Closure callback used when caching queries.
protected getCacheCallback ( array $columns ) : Closure
$columns array
리턴 Closure

getCacheInfo() 보호된 메소드

Get the cache key and cache minutes as an array.
protected getCacheInfo ( ) : array
리턴 array

getCacheKey() 공개 메소드

Get a unique cache key for the complete query.
public getCacheKey ( ) : string
리턴 string

getCached() 공개 메소드

Execute cached query.
public getCached ( array $columns = [] ) : array
$columns array
리턴 array

getConnection() 공개 메소드

Get the database connection instance.
public getConnection ( ) : Connection
리턴 LMongo\Connection

getFresh() 공개 메소드

Execute fresh query.
public getFresh ( array $columns = [], $cursor = false ) : array
$columns array
리턴 array

group() 공개 메소드

Execute a group command on the database.
public group ( array $initial, mixed $reduce, mixed $columns = [], array $options = [] ) : LMongo\Query\Cursor
$initial array
$reduce mixed
$columns mixed
$options array
리턴 LMongo\Query\Cursor

implode() 공개 메소드

Concatenate values of a given column as a string.
public implode ( string $column, string $glue = null ) : string
$column string
$glue string
리턴 string

increment() 공개 메소드

Increment a column's value by a given amount.
public increment ( string $column, integer $amount = 1, array $extra = [] ) : integer
$column string
$amount integer
$extra array
리턴 integer

insert() 공개 메소드

Insert a new document into the database.
public insert ( array $data ) : mixed
$data array
리턴 mixed

max() 공개 메소드

Retrieve the maximum value of a given column.
public max ( string $column, array $query = [] ) : mixed
$column string
$query array
리턴 mixed

min() 공개 메소드

Retrieve the minimum value of a given column.
public min ( string $column, array $query = [] ) : mixed
$column string
$query array
리턴 mixed

newQuery() 공개 메소드

new Query Builder instance
public newQuery ( ) : Builder
리턴 Builder

norWhere() 공개 메소드

Add an "$nor logical operation" clause to the query.
public norWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

norWhereAll() 공개 메소드

Add an "$all comparison operation" clause to logical $nor operation.
public norWhereAll ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

norWhereBetween() 공개 메소드

Add a where between statement to logical $nor operation.
public norWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder
$column string
$min integer
$max integer
리턴 LMongo\Query\Builder

norWhereExists() 공개 메소드

Add an "$exists element operation" clause to logical $nor operation.
public norWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder
$column string
$exists boolean
리턴 LMongo\Query\Builder

norWhereGeoIntersects() 공개 메소드

Add an "$geoIntersects geospatial operation" clause to logical $nor operation.
public norWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder
$column string
$geometry string
$coords array
리턴 LMongo\Query\Builder

norWhereGeoWithin() 공개 메소드

Add an "$geoWithin geospatial operation" clause to logical $nor operation.
public norWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder
$column string
$shape string
$coords array
리턴 LMongo\Query\Builder

norWhereGt() 공개 메소드

Add an "$gt comparison operation" clause to logical $nor operation.
public norWhereGt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

norWhereGte() 공개 메소드

Add an "$gte comparison operation" clause to logical $nor operation.
public norWhereGte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

norWhereIn() 공개 메소드

Add an "$in comparison operation" clause to logical $nor operation.
public norWhereIn ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

norWhereLike() 공개 메소드

Add a like statement with $regex operation to logical $nor operation.
public norWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder
$column string
$value mixed
$flags string
리턴 LMongo\Query\Builder

norWhereLt() 공개 메소드

Add an "$lt comparison operation" clause to logical $nor operation.
public norWhereLt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

norWhereLte() 공개 메소드

Add an "$lte comparison operation" clause to logical $nor operation.
public norWhereLte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

norWhereMod() 공개 메소드

Add an "$mod element operation" clause to logical $nor operation.
public norWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder
$column string
$divisor integer
$remainder integer
리턴 LMongo\Query\Builder

norWhereNe() 공개 메소드

Add an "$ne comparison operation" clause to logical $nor operation.
public norWhereNe ( string $column, string $value ) : LMongo\Query\Builder
$column string
$value string
리턴 LMongo\Query\Builder

norWhereNear() 공개 메소드

Add an "$near geospatial operation" clause to logical $nor operation.
public norWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

norWhereNearSphere() 공개 메소드

Add an "$nearSphere geospatial operation" clause to logical $nor operation.
public norWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

norWhereNin() 공개 메소드

Add an "$nin comparison operation" clause to logical $nor operation.
public norWhereNin ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

norWhereRegex() 공개 메소드

Add an "$regex JavaScript operation" clause to logical $nor operation.
public norWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

norWhereSize() 공개 메소드

Add an "$size array operation" clause to logical $nor operation.
public norWhereSize ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

norWhereType() 공개 메소드

Add an "$type element operation" clause to logical $nor operation.
public norWhereType ( string $column, integer $type ) : LMongo\Query\Builder
$column string
$type integer
리턴 LMongo\Query\Builder

orWhere() 공개 메소드

Add an "$or logical operation" clause to the query.
public orWhere ( string $column, mixed $value = null ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

orWhereAll() 공개 메소드

Add an "$all comparison operation" clause to logical $or operation.
public orWhereAll ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

orWhereBetween() 공개 메소드

Add a where between statement to logical $or operation.
public orWhereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder
$column string
$min integer
$max integer
리턴 LMongo\Query\Builder

orWhereExists() 공개 메소드

Add an "$exists element operation" clause to logical $or operation.
public orWhereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder
$column string
$exists boolean
리턴 LMongo\Query\Builder

orWhereGeoIntersects() 공개 메소드

Add an "$geoIntersects geospatial operation" clause to logical $or operation.
public orWhereGeoIntersects ( string $column, string $geometry, array $coords ) : LMongo\Query\Builder
$column string
$geometry string
$coords array
리턴 LMongo\Query\Builder

orWhereGeoWithin() 공개 메소드

Add an "$geoWithin geospatial operation" clause to logical $or operation.
public orWhereGeoWithin ( string $column, string $shape, array $coords ) : LMongo\Query\Builder
$column string
$shape string
$coords array
리턴 LMongo\Query\Builder

orWhereGt() 공개 메소드

Add an "$gt comparison operation" clause to logical $or operation.
public orWhereGt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

orWhereGte() 공개 메소드

Add an "$gte comparison operation" clause to logical $or operation.
public orWhereGte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

orWhereIn() 공개 메소드

Add an "$in comparison operation" clause to logical $or operation.
public orWhereIn ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

orWhereLike() 공개 메소드

Add a like statement with $regex operation to logical $or operation.
public orWhereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder
$column string
$value mixed
$flags string
리턴 LMongo\Query\Builder

orWhereLt() 공개 메소드

Add an "$lt comparison operation" clause to logical $or operation.
public orWhereLt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

orWhereLte() 공개 메소드

Add an "$lte comparison operation" clause to logical $or operation.
public orWhereLte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

orWhereMod() 공개 메소드

Add an "$mod element operation" clause to logical $or operation.
public orWhereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder
$column string
$divisor integer
$remainder integer
리턴 LMongo\Query\Builder

orWhereNe() 공개 메소드

Add an "$ne comparison operation" clause to logical $or operation.
public orWhereNe ( string $column, string $value ) : LMongo\Query\Builder
$column string
$value string
리턴 LMongo\Query\Builder

orWhereNear() 공개 메소드

Add an "$near geospatial operation" clause to logical $or operation.
public orWhereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

orWhereNearSphere() 공개 메소드

Add an "$nearSphere geospatial operation" clause to logical $or operation.
public orWhereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
리턴 LMongo\Query\Builder

orWhereNin() 공개 메소드

Add an "$nin comparison operation" clause to logical $or operation.
public orWhereNin ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

orWhereRegex() 공개 메소드

Add an "$regex JavaScript operation" clause to logical $or operation.
public orWhereRegex ( string $column, mixed $value ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

orWhereSize() 공개 메소드

Add an "$size array operation" clause to logical $or operation.
public orWhereSize ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

orWhereType() 공개 메소드

Add an "$type element operation" clause to logical $or operation.
public orWhereType ( string $column, integer $type ) : LMongo\Query\Builder
$column string
$type integer
리턴 LMongo\Query\Builder

orderBy() 공개 메소드

Add an "order by" clause to the query.
public orderBy ( string $column, string $direction = 'asc' ) : LMongo\Query\Builder
$column string
$direction string
리턴 LMongo\Query\Builder

paginate() 공개 메소드

Get a paginator.
public paginate ( integer $perPage = 15, array $columns = [] ) : Illuminate\Pagination\Paginator
$perPage integer
$columns array
리턴 Illuminate\Pagination\Paginator

performUpdate() 보호된 메소드

Perform update.
protected performUpdate ( array $query ) : integer
$query array
리턴 integer

pluck() 공개 메소드

Pluck a single column from the database.
public pluck ( string $column ) : mixed
$column string
리턴 mixed

pop() 공개 메소드

Remove the last element from the array key.
public pop ( string $column, integer $type = 1 ) : integer
$column string
$type integer
리턴 integer

pull() 공개 메소드

Remove one value from the array key.
public pull ( string $column, mixed $value = null ) : integer
$column string
$value mixed
리턴 integer

pullAll() 공개 메소드

Remove several value from the array key.
public pullAll ( string $column, mixed $value = null ) : integer
$column string
$value mixed
리턴 integer

push() 공개 메소드

Append one value to the array key.
public push ( string $column, mixed $value = null ) : integer
$column string
$value mixed
리턴 integer

pushAll() 공개 메소드

Append several value to the array key.
public pushAll ( string $column, array $values ) : integer
$column string
$values array
리턴 integer

remember() 공개 메소드

Indicate that the query results should be cached.
public remember ( integer $minutes, string $key = null ) : Builder
$minutes integer
$key string
리턴 Builder

remove() 공개 메소드

Alias of delete.
public remove ( ) : integer
리턴 integer

renameField() 공개 메소드

Renames a field.
public renameField ( mixed $old, mixed $new = null ) : integer
$old mixed
$new mixed
리턴 integer

resetQuery() 공개 메소드

Reset the query
public resetQuery ( ) : void
리턴 void

save() 공개 메소드

Save the document. Insert into the database if its not exists.
public save ( array $data ) : mixed
$data array
리턴 mixed

setConnection() 공개 메소드

Set the database connection instance.
public setConnection ( Connection $connection ) : Connection
$connection LMongo\Connection
리턴 LMongo\Connection

setField() 공개 메소드

Set the values for the keys.
public setField ( mixed $column, mixed $value = null ) : integer
$column mixed
$value mixed
리턴 integer

skip() 공개 메소드

Set the "offset" value of the query.
public skip ( integer $value ) : LMongo\Query\Builder
$value integer
리턴 LMongo\Query\Builder

sum() 공개 메소드

Retrieve the sum of the values of a given column.
public sum ( string $column, array $query = [] ) : mixed
$column string
$query array
리턴 mixed

take() 공개 메소드

Set the "limit" value of the query.
public take ( integer $value ) : LMongo\Query\Builder
$value integer
리턴 LMongo\Query\Builder

truncate() 공개 메소드

Drop the collection.
public truncate ( ) : void
리턴 void

unsetField() 공개 메소드

Unset or remove the given keys.
public unsetField ( mixed $column ) : integer
$column mixed
리턴 integer

update() 공개 메소드

Update a document in the database.
public update ( array $data ) : integer
$data array
리턴 integer

where() 공개 메소드

Add a basic where clause to the query.
public where ( string $column, mixed $value = null, string $logic = 'first' ) : LMongo\Query\Builder
$column string
$value mixed
$logic string
리턴 LMongo\Query\Builder

whereAll() 공개 메소드

Add an "$all comparison operation" clause to logical operation.
public whereAll ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

whereBetween() 공개 메소드

Add a where between statement to logical operation.
public whereBetween ( string $column, integer $min, integer $max ) : LMongo\Query\Builder
$column string
$min integer
$max integer
리턴 LMongo\Query\Builder

whereExists() 공개 메소드

Add an "$exists element operation" clause to logical operation.
public whereExists ( string $column, boolean $exists = true ) : LMongo\Query\Builder
$column string
$exists boolean
리턴 LMongo\Query\Builder

whereGeoIntersects() 공개 메소드

Add an "$geoIntersects geospatial operation" clause to logical operation.
public whereGeoIntersects ( string $column, string $geometry, array $coords, string $boolean = 'first' ) : LMongo\Query\Builder
$column string
$geometry string
$coords array
$boolean string
리턴 LMongo\Query\Builder

whereGeoWithin() 공개 메소드

Add an "$geoWithin geospatial operation" clause to logical operation.
public whereGeoWithin ( string $column, string $shape, array $coords, string $boolean = 'first' ) : LMongo\Query\Builder
$column string
$shape string
$coords array
$boolean string
리턴 LMongo\Query\Builder

whereGt() 공개 메소드

Add an "$gt comparison operation" clause to logical operation.
public whereGt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

whereGte() 공개 메소드

Add an "$gte comparison operation" clause to logical operation.
public whereGte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

whereIn() 공개 메소드

Add an "$in comparison operation" clause to logical operation.
public whereIn ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

whereLike() 공개 메소드

Add a like statement with $regex operation to logical operation.
public whereLike ( string $column, mixed $value, string $flags = 'im' ) : LMongo\Query\Builder
$column string
$value mixed
$flags string
리턴 LMongo\Query\Builder

whereLt() 공개 메소드

Add an "$lt comparison operation" clause to logical operation.
public whereLt ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

whereLte() 공개 메소드

Add an "$lte comparison operation" clause to logical operation.
public whereLte ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

whereMod() 공개 메소드

Add an "$mod element operation" clause to logical operation.
public whereMod ( string $column, integer $divisor, integer $remainder ) : LMongo\Query\Builder
$column string
$divisor integer
$remainder integer
리턴 LMongo\Query\Builder

whereNe() 공개 메소드

Add an "$ne comparison operation" clause to logical operation.
public whereNe ( string $column, string $value ) : LMongo\Query\Builder
$column string
$value string
리턴 LMongo\Query\Builder

whereNear() 공개 메소드

Add an "$near geospatial operation" clause to logical operation.
public whereNear ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null, string $boolean = 'first' ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
$boolean string
리턴 LMongo\Query\Builder

whereNearSphere() 공개 메소드

Add an "$nearSphere geospatial operation" clause to logical operation.
public whereNearSphere ( string $column, array $coords, mixed $geometry = null, mixed $maxDistance = null, string $boolean = 'first' ) : LMongo\Query\Builder
$column string
$coords array
$geometry mixed
$maxDistance mixed
$boolean string
리턴 LMongo\Query\Builder

whereNested() 공개 메소드

Add a nested where statement to the query.
public whereNested ( Closure $callback, string $logic = '$and' ) : LMongo\Query\Builder
$callback Closure
$logic string
리턴 LMongo\Query\Builder

whereNin() 공개 메소드

Add an "$nin comparison operation" clause to logical operation.
public whereNin ( string $column, array $value ) : LMongo\Query\Builder
$column string
$value array
리턴 LMongo\Query\Builder

whereRegex() 공개 메소드

Add an "$regex JavaScript operation" clause to logical operation.
public whereRegex ( string $column, mixed $value ) : LMongo\Query\Builder
$column string
$value mixed
리턴 LMongo\Query\Builder

whereSize() 공개 메소드

Add an "$size array operation" clause to logical operation.
public whereSize ( string $column, integer $value ) : LMongo\Query\Builder
$column string
$value integer
리턴 LMongo\Query\Builder

whereType() 공개 메소드

Add an "$type element operation" clause to logical operation.
public whereType ( string $column, integer $type ) : LMongo\Query\Builder
$column string
$type integer
리턴 LMongo\Query\Builder

프로퍼티 상세

$cacheKey 보호되어 있는 프로퍼티

The key that should be used when caching the query.
protected string $cacheKey
리턴 string

$cacheMinutes 보호되어 있는 프로퍼티

The number of minutes to cache the query.
protected int $cacheMinutes
리턴 integer

$collection 공개적으로 프로퍼티

The database collection
public string $collection
리턴 string

$columns 공개적으로 프로퍼티

The columns that should be returned.
public array $columns
리턴 array

$connection 보호되어 있는 프로퍼티

The database connection instance.
protected LMongo\Connection $connection
리턴 LMongo\Connection

$first 보호되어 있는 프로퍼티

Indicates if the first where set or not.
protected bool $first
리턴 boolean

$limit 공개적으로 프로퍼티

The maximum number of documents to return.
public int $limit
리턴 integer

$offset 공개적으로 프로퍼티

The number of documents to skip.
public int $offset
리턴 integer

$orders 공개적으로 프로퍼티

The orderings for the query.
public array $orders
리턴 array

$wheres 공개적으로 프로퍼티

The where constraints for the query.
public array $wheres
리턴 array