PHP 클래스 Doctrine\MongoDB\Query\Builder

부터: 1.0
저자: Jonathan H. Wage ([email protected])
파일 보기 프로젝트 열기: doctrine/mongodb 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$collection Doctrine\MongoDB\Collection The Collection instance.
$expr Expr This object includes the query criteria and the "new object" used for insert and update queries.
$query array Array containing the query data.

공개 메소드들

메소드 설명
__clone ( )
__construct ( Doctrine\MongoDB\Collection $collection ) Create a new query builder.
addAnd ( array | Expr $expression ) Add one or more $and clauses to the current query.
addManyToSet ( array $values ) Append multiple values to the current array field only if they do not already exist in the array.
addNor ( array | Expr $expression ) Add one or more $nor clauses to the current query.
addOr ( array | Expr $expression ) Add one or more $or clauses to the current query.
addToSet ( mixed | Expr $valueOrExpression ) Append one or more values to the current array field only if they do not already exist in the array.
all ( array $values ) Specify $all criteria for the current field.
bitAnd ( integer $value ) Apply a bitwise and operation on the current field.
bitOr ( integer $value ) Apply a bitwise or operation on the current field.
bitXor ( integer $value ) Apply a bitwise xor operation on the current field.
bitsAllClear ( integer | array | MongoBinData $value ) Matches documents where all of the bit positions given by the query are clear.
bitsAllSet ( integer | array | MongoBinData $value ) Matches documents where all of the bit positions given by the query are set.
bitsAnyClear ( integer | array | MongoBinData $value ) Matches documents where any of the bit positions given by the query are clear.
bitsAnySet ( integer | array | MongoBinData $value ) Matches documents where any of the bit positions given by the query are set.
caseSensitive ( boolean $caseSensitive ) A boolean flag to enable or disable case sensitive search for $text criteria.
comment ( string $comment ) Associates a comment to any expression taking a query predicate.
count ( ) Change the query type to count.
currentDate ( string $type = 'date' ) Sets the value of the current field to the current date, either as a date or a timestamp.
debug ( string $name = null ) : mixed Return an array of information about the Builder state for debugging.
diacriticSensitive ( boolean $diacriticSensitive ) A boolean flag to enable or disable diacritic sensitive search for $text criteria.
distanceMultiplier ( float $distanceMultiplier ) Set the "distanceMultiplier" option for a geoNear command query.
distinct ( string $field ) Change the query type to a distinct command.
eagerCursor ( boolean $bool = true ) Set whether the query should return its result as an EagerCursor.
elemMatch ( array | Expr $expression ) Specify $elemMatch criteria for the current field.
equals ( mixed $value ) Specify an equality match for the current field.
exclude ( $fieldName = null ) Set one or more fields to be excluded from the query projection.
exists ( boolean $bool ) Specify $exists criteria for the current field.
expr ( ) : Expr Create a new Expr instance that can be used to build partial expressions for other operator methods.
field ( string $field ) Set the current field for building the expression.
finalize ( string | MongoCode $finalize ) Set the "finalize" option for a mapReduce or group command.
find ( ) Change the query type to find.
findAndRemove ( ) Change the query type to findAndRemove (uses the findAndModify command).
findAndUpdate ( ) Change the query type to findAndUpdate (uses the findAndModify command).
geoIntersects ( array | GeoJson\Geometry\Geometry $geometry ) Add $geoIntersects criteria with a GeoJSON geometry to the query.
geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null ) Change the query type to a geoNear command.
geoWithin ( array | GeoJson\Geometry\Geometry $geometry ) Add $geoWithin criteria with a GeoJSON geometry to the query.
geoWithinBox ( float $x1, float $y1, float $x2, float $y2 ) Add $geoWithin criteria with a $box shape to the query.
geoWithinCenter ( float $x, float $y, float $radius ) Add $geoWithin criteria with a $center shape to the query.
geoWithinCenterSphere ( float $x, float $y, float $radius ) Add $geoWithin criteria with a $centerSphere shape to the query.
geoWithinPolygon ( ) Add $geoWithin criteria with a $polygon shape to the query.
getNewObj ( ) : array Return the expression's "new object".
getQuery ( array $options = [] ) : Query Create a new Query instance from the Builder state.
getQueryArray ( ) : array Return the expression's query criteria.
getType ( ) : integer Get the type of this query.
group ( mixed $keys, array $initial, string | MongoCode $reduce = null, array $options = [] ) Change the query type to a group command.
gt ( mixed $value ) Specify $gt criteria for the current field.
gte ( mixed $value ) Specify $gte criteria for the current field.
hint ( array | string $index ) Set the index hint for the query.
immortal ( boolean $bool = true ) Set the immortal cursor flag.
in ( array $values ) Specify $in criteria for the current field.
inc ( float | integer $value ) Increment the current field.
insert ( ) Change the query type to insert.
language ( string $language ) Set the $language option for $text criteria.
limit ( integer $limit ) Set the limit for the query.
lt ( mixed $value ) Specify $lt criteria for the current field.
lte ( mixed $value ) Specify $lte criteria for the current field.
map ( string | MongoCode $map ) Change the query type to a mapReduce command.
mapReduce ( string | MongoCode $map, string | MongoCode $reduce, array | string $out = ['inline' => true], array $options = [] ) Change the query type to a mapReduce command.
mapReduceOptions ( array $options ) Set additional options for a mapReduce command.
max ( mixed $value ) Updates the value of the field to a specified value if the specified value is greater than the current value of the field.
maxDistance ( float $maxDistance ) Set the "maxDistance" option for a geoNear command query or add $maxDistance criteria to the query.
maxTimeMS ( integer $ms ) Specifies a cumulative time limit in milliseconds for processing operations on a cursor.
min ( mixed $value ) Updates the value of the field to a specified value if the specified value is less than the current value of the field.
minDistance ( float $minDistance ) Set the "minDistance" option for a geoNear command query or add $minDistance criteria to the query.
mod ( float | integer $divisor, float | integer $remainder ) Specify $mod criteria for the current field.
mul ( float | integer $value ) Multiply the current field.
multiple ( boolean $bool = true ) Set the "multiple" option for an update query.
near ( float | array | GeoJson\Geometry\Point $x, float $y = null ) Add $near criteria to the query.
nearSphere ( float | array | GeoJson\Geometry\Point $x, float $y = null ) Add $nearSphere criteria to the query.
not ( array | Expr $expression ) Negates an expression for the current field.
notEqual ( mixed $value ) Specify $ne criteria for the current field.
notIn ( array $values ) Specify $nin criteria for the current field.
out ( array | string $out ) Set the "out" option for a mapReduce command.
popFirst ( ) Remove the first element from the current array field.
popLast ( ) Remove the last element from the current array field.
pull ( mixed | Expr $valueOrExpression ) Remove all elements matching the given value or expression from the current array field.
pullAll ( array $values ) Remove all elements matching any of the given values from the current array field.
push ( mixed | Expr $valueOrExpression ) Append one or more values to the current array field.
pushAll ( array $values ) Append multiple values to the current array field.
range ( mixed $start, mixed $end ) Specify $gte and $lt criteria for the current field.
reduce ( string | MongoCode $reduce ) Set the "reduce" option for a mapReduce or group command.
remove ( ) Change the query type to remove.
rename ( string $name ) Rename the current field.
returnNew ( boolean $bool = true ) Set the "new" option for a findAndUpdate command.
select ( $fieldName = null ) Set one or more fields to be included in the query projection.
selectElemMatch ( string $fieldName, array | Expr $expression ) Select only matching embedded documents in an array field for the query projection.
selectMeta ( string $fieldName, string $metaDataKeyword ) Select a metadata field for the query projection.
selectSlice ( string $fieldName, integer $countOrSkip, integer $limit = null ) Select a slice of an array field for the query projection.
set ( mixed $value, boolean $atomic = true ) Set the current field to a value.
setNewObj ( array $newObj ) Set the expression's "new object".
setOnInsert ( mixed $value ) Set the current field to the value if the document is inserted in an upsert operation.
setQueryArray ( array $query ) Set the expression's query criteria.
setReadPreference ( $readPreference, array $tags = null ) Set the read preference for the query.
size ( integer $size ) Specify $size criteria for the current field.
skip ( integer $skip ) Set the skip for the query cursor.
slaveOkay ( boolean $bool = true ) Set whether the query may be directed to replica set secondaries.
snapshot ( boolean $bool = true ) Set the snapshot cursor flag.
sort ( array | string $fieldName, integer | string $order = 1 ) Set one or more field/order pairs on which to sort the query.
sortMeta ( string $fieldName, string $metaDataKeyword ) Specify a projected metadata field on which to sort the query.
spherical ( boolean $spherical = true ) Set the "spherical" option for a geoNear command query.
text ( string $search ) Specify $text criteria for the current field.
type ( integer $type ) Specify $type criteria for the current field.
unsetField ( ) Unset the current field.
update ( ) Change the query type to update.
updateMany ( ) Change the query type to update multiple documents
updateOne ( ) Change the query type to update a single document
upsert ( boolean $bool = true ) Set the "upsert" option for an update or findAndUpdate query.
where ( string | MongoCode $javascript ) Specify a JavaScript expression to use for matching documents.
withinBox ( float $x1, float $y1, float $x2, float $y2 ) Add $within criteria with a $box shape to the query.
withinCenter ( float $x, float $y, float $radius ) Add $within criteria with a $center shape to the query.
withinCenterSphere ( float $x, float $y, float $radius ) Add $within criteria with a $centerSphere shape to the query.
withinPolygon ( ) Add $within criteria with a $polygon shape to the query.

메소드 상세

__clone() 공개 메소드

또한 보기: http://php.net/manual/en/language.oop5.cloning.php
public __clone ( )

__construct() 공개 메소드

Create a new query builder.
public __construct ( Doctrine\MongoDB\Collection $collection )
$collection Doctrine\MongoDB\Collection

addAnd() 공개 메소드

You can create a new expression using the {@link Builder::expr()} method.
또한 보기: Expr::addAnd()
또한 보기: http://docs.mongodb.org/manual/reference/operator/and/
public addAnd ( array | Expr $expression )
$expression array | Expr

addManyToSet() 공개 메소드

If the field does not exist, it will be set to an array containing the unique values in the argument. If the field is not an array, the query will yield an error.
또한 보기: Expr::addManyToSet()
또한 보기: http://docs.mongodb.org/manual/reference/operator/addToSet/
또한 보기: http://docs.mongodb.org/manual/reference/operator/each/
사용 중단: 1.1 Use {@link Builder::addToSet()} with {@link Expr::each()}; Will be removed in 2.0
public addManyToSet ( array $values )
$values array

addNor() 공개 메소드

You can create a new expression using the {@link Builder::expr()} method.
또한 보기: Expr::addNor()
또한 보기: http://docs.mongodb.org/manual/reference/operator/nor/
public addNor ( array | Expr $expression )
$expression array | Expr

addOr() 공개 메소드

You can create a new expression using the {@link Builder::expr()} method.
또한 보기: Expr::addOr()
또한 보기: http://docs.mongodb.org/manual/reference/operator/or/
public addOr ( array | Expr $expression )
$expression array | Expr

addToSet() 공개 메소드

If the field does not exist, it will be set to an array containing the unique value(s) in the argument. If the field is not an array, the query will yield an error. Multiple values may be specified by provided an Expr object and using {@link Expr::each()}.
또한 보기: Expr::addToSet()
또한 보기: http://docs.mongodb.org/manual/reference/operator/addToSet/
또한 보기: http://docs.mongodb.org/manual/reference/operator/each/
public addToSet ( mixed | Expr $valueOrExpression )
$valueOrExpression mixed | Expr

all() 공개 메소드

Specify $all criteria for the current field.
또한 보기: Expr::all()
또한 보기: http://docs.mongodb.org/manual/reference/operator/all/
public all ( array $values )
$values array

bitAnd() 공개 메소드

Apply a bitwise and operation on the current field.
또한 보기: Expr::bitAnd()
또한 보기: http://docs.mongodb.org/manual/reference/operator/update/bit/
public bitAnd ( integer $value )
$value integer

bitOr() 공개 메소드

Apply a bitwise or operation on the current field.
또한 보기: Expr::bitOr()
또한 보기: http://docs.mongodb.org/manual/reference/operator/update/bit/
public bitOr ( integer $value )
$value integer

bitXor() 공개 메소드

Apply a bitwise xor operation on the current field.
또한 보기: Expr::bitXor()
또한 보기: http://docs.mongodb.org/manual/reference/operator/update/bit/
public bitXor ( integer $value )
$value integer

bitsAllClear() 공개 메소드

Matches documents where all of the bit positions given by the query are clear.
또한 보기: Expr::bitsAllClear()
또한 보기: https://docs.mongodb.org/manual/reference/operator/query/bitsAllClear/
public bitsAllClear ( integer | array | MongoBinData $value )
$value integer | array | MongoBinData

bitsAllSet() 공개 메소드

Matches documents where all of the bit positions given by the query are set.
또한 보기: Expr::bitsAllSet()
또한 보기: https://docs.mongodb.org/manual/reference/operator/query/bitsAllSet/
public bitsAllSet ( integer | array | MongoBinData $value )
$value integer | array | MongoBinData

bitsAnyClear() 공개 메소드

Matches documents where any of the bit positions given by the query are clear.
또한 보기: Expr::bitsAnyClear()
또한 보기: https://docs.mongodb.org/manual/reference/operator/query/bitsAnyClear/
public bitsAnyClear ( integer | array | MongoBinData $value )
$value integer | array | MongoBinData

bitsAnySet() 공개 메소드

Matches documents where any of the bit positions given by the query are set.
또한 보기: Expr::bitsAnySet()
또한 보기: https://docs.mongodb.org/manual/reference/operator/query/bitsAnySet/
public bitsAnySet ( integer | array | MongoBinData $value )
$value integer | array | MongoBinData

caseSensitive() 공개 메소드

This method must be called after text().
또한 보기: Expr::caseSensitive()
또한 보기: http://docs.mongodb.org/manual/reference/operator/text/
부터: 1.3
public caseSensitive ( boolean $caseSensitive )
$caseSensitive boolean

comment() 공개 메소드

Associates a comment to any expression taking a query predicate.
또한 보기: Expr::comment()
또한 보기: http://docs.mongodb.org/manual/reference/operator/query/comment/
public comment ( string $comment )
$comment string

count() 공개 메소드

Change the query type to count.
public count ( )

currentDate() 공개 메소드

Sets the value of the current field to the current date, either as a date or a timestamp.
또한 보기: Expr::currentDate()
또한 보기: http://docs.mongodb.org/manual/reference/operator/currentDate/
public currentDate ( string $type = 'date' )
$type string

debug() 공개 메소드

The $name parameter may be used to return a specific key from the internal $query array property. If omitted, the entire array will be returned.
public debug ( string $name = null ) : mixed
$name string
리턴 mixed

diacriticSensitive() 공개 메소드

This method must be called after text().
또한 보기: Builder::diacriticSensitive()
또한 보기: http://docs.mongodb.org/manual/reference/operator/text/
부터: 1.3
public diacriticSensitive ( boolean $diacriticSensitive )
$diacriticSensitive boolean

distanceMultiplier() 공개 메소드

Set the "distanceMultiplier" option for a geoNear command query.
public distanceMultiplier ( float $distanceMultiplier )
$distanceMultiplier float

distinct() 공개 메소드

Change the query type to a distinct command.
또한 보기: http://docs.mongodb.org/manual/reference/command/distinct/
public distinct ( string $field )
$field string

eagerCursor() 공개 메소드

Set whether the query should return its result as an EagerCursor.
public eagerCursor ( boolean $bool = true )
$bool boolean

elemMatch() 공개 메소드

You can create a new expression using the {@link Builder::expr()} method.
또한 보기: Expr::elemMatch()
또한 보기: http://docs.mongodb.org/manual/reference/operator/elemMatch/
public elemMatch ( array | Expr $expression )
$expression array | Expr

equals() 공개 메소드

Specify an equality match for the current field.
또한 보기: Expr::equals()
public equals ( mixed $value )
$value mixed

exclude() 공개 메소드

If fields have been selected for inclusion, only the "_id" field may be excluded.
public exclude ( $fieldName = null )

exists() 공개 메소드

Specify $exists criteria for the current field.
또한 보기: Expr::exists()
또한 보기: http://docs.mongodb.org/manual/reference/operator/exists/
public exists ( boolean $bool )
$bool boolean

expr() 공개 메소드

Create a new Expr instance that can be used to build partial expressions for other operator methods.
public expr ( ) : Expr
리턴 Expr $expr

field() 공개 메소드

Set the current field for building the expression.
또한 보기: Expr::field()
public field ( string $field )
$field string

finalize() 공개 메소드

Set the "finalize" option for a mapReduce or group command.
public finalize ( string | MongoCode $finalize )
$finalize string | MongoCode

find() 공개 메소드

Change the query type to find.
public find ( )

findAndRemove() 공개 메소드

Change the query type to findAndRemove (uses the findAndModify command).
또한 보기: http://docs.mongodb.org/manual/reference/command/findAndModify/
public findAndRemove ( )

findAndUpdate() 공개 메소드

Change the query type to findAndUpdate (uses the findAndModify command).
또한 보기: http://docs.mongodb.org/manual/reference/command/findAndModify/
public findAndUpdate ( )

geoIntersects() 공개 메소드

The geometry parameter GeoJSON object or an array corresponding to the geometry's JSON representation.
또한 보기: Expr::geoIntersects()
또한 보기: http://docs.mongodb.org/manual/reference/operator/geoIntersects/
public geoIntersects ( array | GeoJson\Geometry\Geometry $geometry )
$geometry array | GeoJson\Geometry\Geometry

geoNear() 공개 메소드

A GeoJSON point may be provided as the first and only argument for 2dsphere queries. This single parameter may be a GeoJSON point object or an array corresponding to the point's JSON representation. If GeoJSON is used, the "spherical" option will default to true. This method sets the "near" option for the geoNear command. The "num" option may be set using {@link Expr::limit()}. The "distanceMultiplier", "maxDistance", "minDistance", and "spherical" options may be set using their respective builder methods. Additional query criteria will be assigned to the "query" option.
또한 보기: http://docs.mongodb.org/manual/reference/command/geoNear/
public geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null )
$x float | array | GeoJson\Geometry\Point
$y float

geoWithin() 공개 메소드

The geometry parameter GeoJSON object or an array corresponding to the geometry's JSON representation.
또한 보기: Expr::geoWithin()
또한 보기: http://docs.mongodb.org/manual/reference/operator/geoWithin/
public geoWithin ( array | GeoJson\Geometry\Geometry $geometry )
$geometry array | GeoJson\Geometry\Geometry

geoWithinBox() 공개 메소드

A rectangular polygon will be constructed from a pair of coordinates corresponding to the bottom left and top right corners. Note: the $box operator only supports legacy coordinate pairs and 2d indexes. This cannot be used with 2dsphere indexes and GeoJSON shapes.
또한 보기: Expr::geoWithinBox()
또한 보기: http://docs.mongodb.org/manual/reference/operator/box/
public geoWithinBox ( float $x1, float $y1, float $x2, float $y2 )
$x1 float
$y1 float
$x2 float
$y2 float

geoWithinCenter() 공개 메소드

Note: the $center operator only supports legacy coordinate pairs and 2d indexes. This cannot be used with 2dsphere indexes and GeoJSON shapes.
또한 보기: Expr::geoWithinCenter()
또한 보기: http://docs.mongodb.org/manual/reference/operator/center/
public geoWithinCenter ( float $x, float $y, float $radius )
$x float
$y float
$radius float

geoWithinCenterSphere() 공개 메소드

Note: the $centerSphere operator supports both 2d and 2dsphere indexes.
또한 보기: Expr::geoWithinCenterSphere()
또한 보기: http://docs.mongodb.org/manual/reference/operator/centerSphere/
public geoWithinCenterSphere ( float $x, float $y, float $radius )
$x float
$y float
$radius float

geoWithinPolygon() 공개 메소드

Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, latitude for geographic coordinates). The last point coordinate is implicitly connected with the first. Note: the $polygon operator only supports legacy coordinate pairs and 2d indexes. This cannot be used with 2dsphere indexes and GeoJSON shapes.
또한 보기: Expr::geoWithinPolygon()
또한 보기: http://docs.mongodb.org/manual/reference/operator/polygon/
public geoWithinPolygon ( )

getNewObj() 공개 메소드

Return the expression's "new object".
또한 보기: Expr::getNewObj()
public getNewObj ( ) : array
리턴 array

getQuery() 공개 메소드

Create a new Query instance from the Builder state.
public getQuery ( array $options = [] ) : Query
$options array
리턴 Query

getQueryArray() 공개 메소드

Return the expression's query criteria.
또한 보기: Expr::getQuery()
public getQueryArray ( ) : array
리턴 array

getType() 공개 메소드

Get the type of this query.
public getType ( ) : integer
리턴 integer $type

group() 공개 메소드

If the "reduce" option is not specified when calling this method, it must be set with the {@link Builder::reduce()} method.
또한 보기: http://docs.mongodb.org/manual/reference/command/group/
public group ( mixed $keys, array $initial, string | MongoCode $reduce = null, array $options = [] )
$keys mixed
$initial array
$reduce string | MongoCode
$options array

gt() 공개 메소드

Specify $gt criteria for the current field.
또한 보기: Expr::gt()
또한 보기: http://docs.mongodb.org/manual/reference/operator/gt/
public gt ( mixed $value )
$value mixed

gte() 공개 메소드

Specify $gte criteria for the current field.
또한 보기: Expr::gte()
또한 보기: http://docs.mongodb.org/manual/reference/operator/gte/
public gte ( mixed $value )
$value mixed

hint() 공개 메소드

Set the index hint for the query.
public hint ( array | string $index )
$index array | string

immortal() 공개 메소드

Set the immortal cursor flag.
public immortal ( boolean $bool = true )
$bool boolean

in() 공개 메소드

Specify $in criteria for the current field.
또한 보기: Expr::in()
또한 보기: http://docs.mongodb.org/manual/reference/operator/in/
public in ( array $values )
$values array

inc() 공개 메소드

If the field does not exist, it will be set to this value.
또한 보기: Expr::inc()
또한 보기: http://docs.mongodb.org/manual/reference/operator/inc/
public inc ( float | integer $value )
$value float | integer

insert() 공개 메소드

Change the query type to insert.
public insert ( )

language() 공개 메소드

This method must be called after text().
또한 보기: Expr::language()
또한 보기: http://docs.mongodb.org/manual/reference/operator/text/
public language ( string $language )
$language string

limit() 공개 메소드

This is only relevant for find queries and geoNear and mapReduce commands.
또한 보기: Query::prepareCursor()
public limit ( integer $limit )
$limit integer

lt() 공개 메소드

Specify $lt criteria for the current field.
또한 보기: Expr::lte()
또한 보기: http://docs.mongodb.org/manual/reference/operator/lte/
public lt ( mixed $value )
$value mixed

lte() 공개 메소드

Specify $lte criteria for the current field.
또한 보기: Expr::lte()
또한 보기: http://docs.mongodb.org/manual/reference/operator/lte/
public lte ( mixed $value )
$value mixed

map() 공개 메소드

The "reduce" option is not specified when calling this method; it must be set with the {@link Builder::reduce()} method. The "out" option defaults to inline, like {@link Builder::mapReduce()}.
또한 보기: http://docs.mongodb.org/manual/reference/command/mapReduce/
public map ( string | MongoCode $map )
$map string | MongoCode

mapReduce() 공개 메소드

Change the query type to a mapReduce command.
또한 보기: http://docs.mongodb.org/manual/reference/command/mapReduce/
public mapReduce ( string | MongoCode $map, string | MongoCode $reduce, array | string $out = ['inline' => true], array $options = [] )
$map string | MongoCode
$reduce string | MongoCode
$out array | string
$options array

mapReduceOptions() 공개 메소드

Set additional options for a mapReduce command.
public mapReduceOptions ( array $options )
$options array

max() 공개 메소드

Updates the value of the field to a specified value if the specified value is greater than the current value of the field.
또한 보기: Expr::max()
또한 보기: http://docs.mongodb.org/manual/reference/operator/update/max/
public max ( mixed $value )
$value mixed

maxDistance() 공개 메소드

If the query is a geoNear command ({@link Expr::geoNear()} was called), the "maxDistance" command option will be set; otherwise, $maxDistance will be added to the current expression. If the query uses GeoJSON points, $maxDistance will be interpreted in meters. If legacy point coordinates are used, $maxDistance will be interpreted in radians.
또한 보기: Expr::maxDistance()
또한 보기: http://docs.mongodb.org/manual/reference/command/geoNear/
또한 보기: http://docs.mongodb.org/manual/reference/operator/maxDistance/
또한 보기: http://docs.mongodb.org/manual/reference/operator/near/
또한 보기: http://docs.mongodb.org/manual/reference/operator/nearSphere/
public maxDistance ( float $maxDistance )
$maxDistance float

maxTimeMS() 공개 메소드

Specifies a cumulative time limit in milliseconds for processing operations on a cursor.
public maxTimeMS ( integer $ms )
$ms integer

min() 공개 메소드

Updates the value of the field to a specified value if the specified value is less than the current value of the field.
또한 보기: Expr::min()
또한 보기: http://docs.mongodb.org/manual/reference/operator/update/min/
public min ( mixed $value )
$value mixed

minDistance() 공개 메소드

If the query is a geoNear command ({@link Expr::geoNear()} was called), the "minDistance" command option will be set; otherwise, $minDistance will be added to the current expression. If the query uses GeoJSON points, $minDistance will be interpreted in meters. If legacy point coordinates are used, $minDistance will be interpreted in radians.
또한 보기: Expr::minDistance()
또한 보기: http://docs.mongodb.org/manual/reference/command/geoNear/
또한 보기: http://docs.mongodb.org/manual/reference/operator/minDistance/
또한 보기: http://docs.mongodb.org/manual/reference/operator/near/
또한 보기: http://docs.mongodb.org/manual/reference/operator/nearSphere/
public minDistance ( float $minDistance )
$minDistance float

mod() 공개 메소드

Specify $mod criteria for the current field.
또한 보기: Expr::mod()
또한 보기: http://docs.mongodb.org/manual/reference/operator/mod/
public mod ( float | integer $divisor, float | integer $remainder )
$divisor float | integer
$remainder float | integer

mul() 공개 메소드

If the field does not exist, it will be set to 0.
또한 보기: Expr::mul()
또한 보기: http://docs.mongodb.org/manual/reference/operator/mul/
public mul ( float | integer $value )
$value float | integer

multiple() 공개 메소드

Set the "multiple" option for an update query.
사용 중단: Deprecated in version 1.4 - use updateOne or updateMany instead
public multiple ( boolean $bool = true )
$bool boolean

near() 공개 메소드

A GeoJSON point may be provided as the first and only argument for 2dsphere queries. This single parameter may be a GeoJSON point object or an array corresponding to the point's JSON representation.
또한 보기: Expr::near()
또한 보기: http://docs.mongodb.org/manual/reference/operator/near/
public near ( float | array | GeoJson\Geometry\Point $x, float $y = null )
$x float | array | GeoJson\Geometry\Point
$y float

nearSphere() 공개 메소드

A GeoJSON point may be provided as the first and only argument for 2dsphere queries. This single parameter may be a GeoJSON point object or an array corresponding to the point's JSON representation.
또한 보기: Expr::nearSphere()
또한 보기: http://docs.mongodb.org/manual/reference/operator/nearSphere/
public nearSphere ( float | array | GeoJson\Geometry\Point $x, float $y = null )
$x float | array | GeoJson\Geometry\Point
$y float

not() 공개 메소드

You can create a new expression using the {@link Builder::expr()} method.
또한 보기: Expr::not()
또한 보기: http://docs.mongodb.org/manual/reference/operator/not/
public not ( array | Expr $expression )
$expression array | Expr

notEqual() 공개 메소드

Specify $ne criteria for the current field.
또한 보기: Expr::notEqual()
또한 보기: http://docs.mongodb.org/manual/reference/operator/ne/
public notEqual ( mixed $value )
$value mixed

notIn() 공개 메소드

Specify $nin criteria for the current field.
또한 보기: Expr::notIn()
또한 보기: http://docs.mongodb.org/manual/reference/operator/nin/
public notIn ( array $values )
$values array

out() 공개 메소드

Set the "out" option for a mapReduce command.
public out ( array | string $out )
$out array | string

popFirst() 공개 메소드

Remove the first element from the current array field.
또한 보기: Expr::popFirst()
또한 보기: http://docs.mongodb.org/manual/reference/operator/pop/
public popFirst ( )

popLast() 공개 메소드

Remove the last element from the current array field.
또한 보기: Expr::popLast()
또한 보기: http://docs.mongodb.org/manual/reference/operator/pop/
public popLast ( )

pull() 공개 메소드

Remove all elements matching the given value or expression from the current array field.
또한 보기: Expr::pull()
또한 보기: http://docs.mongodb.org/manual/reference/operator/pull/
public pull ( mixed | Expr $valueOrExpression )
$valueOrExpression mixed | Expr

pullAll() 공개 메소드

Remove all elements matching any of the given values from the current array field.
또한 보기: Expr::pullAll()
또한 보기: http://docs.mongodb.org/manual/reference/operator/pullAll/
public pullAll ( array $values )
$values array

push() 공개 메소드

If the field does not exist, it will be set to an array containing the value(s) in the argument. If the field is not an array, the query will yield an error. Multiple values may be specified by providing an Expr object and using {@link Expr::each()}. {@link Expr::slice()} and {@link Expr::sort()} may also be used to limit and order array elements, respectively.
또한 보기: Expr::push()
또한 보기: http://docs.mongodb.org/manual/reference/operator/push/
또한 보기: http://docs.mongodb.org/manual/reference/operator/each/
또한 보기: http://docs.mongodb.org/manual/reference/operator/slice/
또한 보기: http://docs.mongodb.org/manual/reference/operator/sort/
public push ( mixed | Expr $valueOrExpression )
$valueOrExpression mixed | Expr

pushAll() 공개 메소드

If the field does not exist, it will be set to an array containing the values in the argument. If the field is not an array, the query will yield an error. This operator is deprecated in MongoDB 2.4. {@link Builder::push()} and {@link Expr::each()} should be used in its place.
또한 보기: Expr::pushAll()
또한 보기: http://docs.mongodb.org/manual/reference/operator/pushAll/
public pushAll ( array $values )
$values array

range() 공개 메소드

This method is shorthand for specifying $gte criteria on the lower bound and $lt criteria on the upper bound. The upper bound is not inclusive.
또한 보기: Expr::range()
public range ( mixed $start, mixed $end )
$start mixed
$end mixed

reduce() 공개 메소드

Set the "reduce" option for a mapReduce or group command.
public reduce ( string | MongoCode $reduce )
$reduce string | MongoCode

remove() 공개 메소드

Change the query type to remove.
public remove ( )

rename() 공개 메소드

Rename the current field.
또한 보기: Expr::rename()
또한 보기: http://docs.mongodb.org/manual/reference/operator/rename/
public rename ( string $name )
$name string

returnNew() 공개 메소드

Set the "new" option for a findAndUpdate command.
public returnNew ( boolean $bool = true )
$bool boolean

select() 공개 메소드

Set one or more fields to be included in the query projection.
public select ( $fieldName = null )

selectElemMatch() 공개 메소드

Select only matching embedded documents in an array field for the query projection.
또한 보기: http://docs.mongodb.org/manual/reference/projection/elemMatch/
public selectElemMatch ( string $fieldName, array | Expr $expression )
$fieldName string
$expression array | Expr

selectMeta() 공개 메소드

Select a metadata field for the query projection.
또한 보기: http://docs.mongodb.org/master/reference/operator/projection/meta/
public selectMeta ( string $fieldName, string $metaDataKeyword )
$fieldName string
$metaDataKeyword string

selectSlice() 공개 메소드

The $countOrSkip parameter has two very different meanings, depending on whether or not $limit is provided. See the MongoDB documentation for more information.
또한 보기: http://docs.mongodb.org/manual/reference/projection/slice/
public selectSlice ( string $fieldName, integer $countOrSkip, integer $limit = null )
$fieldName string
$countOrSkip integer Count parameter, or skip if limit is specified
$limit integer Limit parameter used in conjunction with skip

set() 공개 메소드

This is only relevant for insert, update, or findAndUpdate queries. For update and findAndUpdate queries, the $atomic parameter will determine whether or not a $set operator is used.
또한 보기: Expr::set()
또한 보기: http://docs.mongodb.org/manual/reference/operator/set/
public set ( mixed $value, boolean $atomic = true )
$value mixed
$atomic boolean

setNewObj() 공개 메소드

Set the expression's "new object".
또한 보기: Expr::setNewObj()
public setNewObj ( array $newObj )
$newObj array

setOnInsert() 공개 메소드

If an update operation with upsert: true results in an insert of a document, then $setOnInsert assigns the specified values to the fields in the document. If the update operation does not result in an insert, $setOnInsert does nothing.
또한 보기: Expr::setOnInsert()
또한 보기: https://docs.mongodb.org/manual/reference/operator/update/setOnInsert/
public setOnInsert ( mixed $value )
$value mixed

setQueryArray() 공개 메소드

Set the expression's query criteria.
또한 보기: Expr::setQuery()
public setQueryArray ( array $query )
$query array

setReadPreference() 공개 메소드

This is only relevant for read-only queries and commands.
또한 보기: http://docs.mongodb.org/manual/core/read-preference/
public setReadPreference ( $readPreference, array $tags = null )
$tags array

size() 공개 메소드

Specify $size criteria for the current field.
또한 보기: Expr::size()
또한 보기: http://docs.mongodb.org/manual/reference/operator/size/
public size ( integer $size )
$size integer

skip() 공개 메소드

This is only relevant for find queries, or mapReduce queries that store results in an output collecton and return a cursor.
또한 보기: Query::prepareCursor()
public skip ( integer $skip )
$skip integer

slaveOkay() 공개 메소드

If the driver supports read preferences and slaveOkay is true, a "secondaryPreferred" read preference will be used. Otherwise, a "primary" read preference will be used.
또한 보기: Doctrine\MongoDB\Cursor::setMongoCursorSlaveOkay()
public slaveOkay ( boolean $bool = true )
$bool boolean

snapshot() 공개 메소드

Set the snapshot cursor flag.
public snapshot ( boolean $bool = true )
$bool boolean

sort() 공개 메소드

If sorting by multiple fields, the first argument should be an array of field name (key) and order (value) pairs.
public sort ( array | string $fieldName, integer | string $order = 1 )
$fieldName array | string Field name or array of field/order pairs
$order integer | string Field order (if one field is specified)

sortMeta() 공개 메소드

Sort order is not configurable for metadata fields. Sorting by a metadata field requires the same field and $meta expression to exist in the projection document. This method will call {@link Builder::selectMeta()} if the field is not already set in the projection.
또한 보기: http://docs.mongodb.org/master/reference/operator/projection/meta/#sort
public sortMeta ( string $fieldName, string $metaDataKeyword )
$fieldName string Field name of the projected metadata
$metaDataKeyword string

spherical() 공개 메소드

Set the "spherical" option for a geoNear command query.
public spherical ( boolean $spherical = true )
$spherical boolean

text() 공개 메소드

The $language option may be set with {@link Builder::language()}.
또한 보기: Expr::text()
또한 보기: http://docs.mongodb.org/master/reference/operator/query/text/
public text ( string $search )
$search string

type() 공개 메소드

Specify $type criteria for the current field.
또한 보기: Expr::type()
또한 보기: http://docs.mongodb.org/manual/reference/operator/type/
public type ( integer $type )
$type integer

unsetField() 공개 메소드

The field will be removed from the document (not set to null).
또한 보기: Expr::unsetField()
또한 보기: http://docs.mongodb.org/manual/reference/operator/unset/
public unsetField ( )

update() 공개 메소드

Change the query type to update.
사용 중단: Deprecated in version 1.4 - use updateOne or updateMany instead
public update ( )

updateMany() 공개 메소드

Change the query type to update multiple documents
public updateMany ( )

updateOne() 공개 메소드

Change the query type to update a single document
public updateOne ( )

upsert() 공개 메소드

Set the "upsert" option for an update or findAndUpdate query.
public upsert ( boolean $bool = true )
$bool boolean

where() 공개 메소드

Specify a JavaScript expression to use for matching documents.
또한 보기: Expr::where()
또한 보기: http://docs.mongodb.org/manual/reference/operator/where/
public where ( string | MongoCode $javascript )
$javascript string | MongoCode

withinBox() 공개 메소드

Add $within criteria with a $box shape to the query.
또한 보기: Builder::geoWithinBox()
또한 보기: Expr::withinBox()
또한 보기: http://docs.mongodb.org/manual/reference/operator/box/
사용 중단: 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
public withinBox ( float $x1, float $y1, float $x2, float $y2 )
$x1 float
$y1 float
$x2 float
$y2 float

withinCenter() 공개 메소드

Add $within criteria with a $center shape to the query.
또한 보기: Builder::geoWithinCenter()
또한 보기: Expr::withinCenter()
또한 보기: http://docs.mongodb.org/manual/reference/operator/center/
사용 중단: 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
public withinCenter ( float $x, float $y, float $radius )
$x float
$y float
$radius float

withinCenterSphere() 공개 메소드

Add $within criteria with a $centerSphere shape to the query.
또한 보기: Builder::geoWithinCenterSphere()
또한 보기: Expr::withinCenterSphere()
또한 보기: http://docs.mongodb.org/manual/reference/operator/centerSphere/
사용 중단: 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
public withinCenterSphere ( float $x, float $y, float $radius )
$x float
$y float
$radius float

withinPolygon() 공개 메소드

Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, latitude for geographic coordinates). The last point coordinate is implicitly connected with the first.
또한 보기: Builder::geoWithinPolygon()
또한 보기: Expr::withinPolygon()
또한 보기: http://docs.mongodb.org/manual/reference/operator/polygon/
사용 중단: 1.1 MongoDB 2.4 deprecated $within in favor of $geoWithin
public withinPolygon ( )

프로퍼티 상세

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

The Collection instance.
protected Collection,Doctrine\MongoDB $collection
리턴 Doctrine\MongoDB\Collection

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

This object includes the query criteria and the "new object" used for insert and update queries.
protected Expr,Doctrine\MongoDB\Query $expr
리턴 Expr

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

Array containing the query data.
protected array $query
리턴 array