Instance Constructors
-
new
Query
(meta: M, collectionName: String, lim: Option[Int], sk: Option[Int], maxScan: Option[Int], comment: Option[String], hint: Option[ListMap[String, Any]], condition: AndCondition, order: Option[MongoOrder], select: Option[MongoSelect[M, R]], readPreference: Option[ReadPreference])
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
allShards
[S2]
(implicit ev: com.foursquare.rogue.AddShardAware[State, _, S2]): Query[M, R, S2]
-
def
and
[F]
(clause: (M) ⇒ QueryClause[F]): Query[M, R, State]
-
def
andAsc
(field: (M) ⇒ com.foursquare.rogue.AbstractQueryField[_, _, _, M])(implicit ev: <:<[State, Ordered]): Query[M, R, State]
-
def
andDesc
(field: (M) ⇒ com.foursquare.rogue.AbstractQueryField[_, _, _, M])(implicit ev: <:<[State, Ordered]): Query[M, R, State]
-
def
andOpt
[V, F]
(opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]
-
def
asDBObject
: DBObject
-
def
asInstanceOf
[T0]
: T0
-
def
canEqual
(arg0: Any): Boolean
-
def
clone
(): AnyRef
-
val
collectionName
: String
-
def
comment
(c: String): Query[M, R, State]
-
val
comment
: Option[String]
-
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
-
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
hint
(index: MongoIndex[M]): Query[M, R, State]
-
val
hint
: Option[ListMap[String, Any]]
-
def
isInstanceOf
[T0]
: Boolean
-
def
iscan
[F]
(clause: (M) ⇒ QueryClause[F]): Query[M, R, State]
-
def
iscanOpt
[V, F]
(opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]
-
val
lim
: Option[Int]
-
def
limit
[S2]
(n: Int)(implicit ev: AddLimit[State, S2]): Query[M, R, S2]
-
def
limitOpt
[S2]
(n: Option[Int])(implicit ev: AddLimit[State, S2]): Query[M, R, S2]
-
def
maxScan
(max: Int): Query[M, R, State]
-
val
maxScan
: Option[Int]
-
val
meta
: M
-
-
-
def
ne
(arg0: AnyRef): Boolean
-
-
def
not
[F]
(clause: (M) ⇒ QueryClause[F]): Query[M, R, State]
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
or
[S2]
(subqueries: (Query[M, R, Ordered with Selected with Limited with Skipped with HasNoOrClause]) ⇒ com.foursquare.rogue.Query[M, R, _]*)(implicit ev: AddOrClause[State, S2]): Query[M, R, S2]
-
-
def
orderAsc
[S2]
(field: (M) ⇒ com.foursquare.rogue.AbstractQueryField[_, _, _, M])(implicit ev: AddOrder[State, S2]): Query[M, R, S2]
-
def
orderDesc
[S2]
(field: (M) ⇒ com.foursquare.rogue.AbstractQueryField[_, _, _, M])(implicit ev: AddOrder[State, S2]): Query[M, R, S2]
-
def
orderNaturalAsc
[V, S2]
(implicit ev: AddOrder[State, S2]): Query[M, R, S2]
-
def
orderNaturalDesc
[V, S2]
(implicit ev: AddOrder[State, S2]): Query[M, R, S2]
-
def
productArity
: Int
-
def
productElement
(arg0: Int): Any
-
def
productIterator
: Iterator[Any]
-
def
productPrefix
: String
-
def
raw
(f: (BasicDBObjectBuilder) ⇒ Unit): Query[M, R, State]
-
val
readPreference
: Option[ReadPreference]
-
def
scan
[F]
(clause: (M) ⇒ QueryClause[F]): Query[M, R, State]
-
def
scanOpt
[V, F]
(opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]
-
def
select
[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M], f9: (M) ⇒ SelectField[F9, M], f10: (M) ⇒ SelectField[F10, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10), S2]
-
def
select
[F1, F2, F3, F4, F5, F6, F7, F8, F9, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M], f9: (M) ⇒ SelectField[F9, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9), S2]
-
def
select
[F1, F2, F3, F4, F5, F6, F7, F8, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8), S2]
-
def
select
[F1, F2, F3, F4, F5, F6, F7, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7), S2]
-
def
select
[F1, F2, F3, F4, F5, F6, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6), S2]
-
def
select
[F1, F2, F3, F4, F5, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5), S2]
-
def
select
[F1, F2, F3, F4, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4), S2]
-
def
select
[F1, F2, F3, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2, F3), S2]
-
def
select
[F1, F2, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M])(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, (F1, F2), S2]
-
def
select
[F1, S2]
(f1: (M) ⇒ SelectField[F1, M])(implicit ev: com.foursquare.rogue.AddSelect[State, _, S2]): Query[M, F1, S2]
-
val
select
: Option[MongoSelect[M, R]]
-
def
selectCase
[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M], f9: (M) ⇒ SelectField[F9, M], f10: (M) ⇒ SelectField[F10, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, F5, F6, F7, F8, F9, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M], f9: (M) ⇒ SelectField[F9, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, F5, F6, F7, F8, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], f8: (M) ⇒ SelectField[F8, M], create: (F1, F2, F3, F4, F5, F6, F7, F8) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, F5, F6, F7, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], f7: (M) ⇒ SelectField[F7, M], create: (F1, F2, F3, F4, F5, F6, F7) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, F5, F6, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], f6: (M) ⇒ SelectField[F6, M], create: (F1, F2, F3, F4, F5, F6) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, F5, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], f5: (M) ⇒ SelectField[F5, M], create: (F1, F2, F3, F4, F5) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, F4, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], f4: (M) ⇒ SelectField[F4, M], create: (F1, F2, F3, F4) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, F3, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M], create: (F1, F2, F3) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, F2, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], create: (F1, F2) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, S2, _]): Query[M, CC, S2]
-
def
selectCase
[F1, CC, S2]
(f1: (M) ⇒ SelectField[F1, M], create: (F1) ⇒ CC)(implicit ev: com.foursquare.rogue.AddSelect[State, _, S2]): Query[M, CC, S2]
-
def
setReadPreference
(r: ReadPreference): Query[M, R, State]
-
def
signature
(): String
-
val
sk
: Option[Int]
-
def
skip
[S2]
(n: Int)(implicit ev: AddSkip[State, S2]): Query[M, R, S2]
-
def
skipOpt
[S2]
(n: Option[Int])(implicit ev: AddSkip[State, S2]): Query[M, R, S2]
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
-
def
where
[F]
(clause: (M) ⇒ QueryClause[F]): Query[M, R, State]
-
def
whereOpt
[V, F]
(opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]
-
def
withShardKey
[F, S2]
(clause: (M) ⇒ QueryClause[F] with ShardKeyClause)(implicit ev: com.foursquare.rogue.AddShardAware[State, S2, _]): Query[M, R, S2]
Deprecated Value Members
-
def
productElements
: Iterator[Any]
Inherited from Serializable
Inherited from Serializable
Inherited from Product
Inherited from Equals
Inherited from AnyRef
Inherited from Any
The definition of methods needed to build a query.
To construct a query, an instance of a query-builder needs to be created. That's done by using an implicit conversion from an instance of a meta-record. In code, the user writes a query by calling one of the query construction methods on an instance of the query-record meta-record instance. The implicit conversion will construct an appropriate query builder from the meta-record.
Query builders are parameterized using a collection of phantom types. For our purposes here, phantom types are types which are inferred by the type system, rather than being explicitly provided by users. The phantom types are inferred by the type system on the basis of what clauses are contained in the query. For example, if there's a ordering clause, that constrains the types so that the type system must infer a type parameter of type "Ordered". This use of phantom types allows the type system to prevent a range of query errors - for example, if two query clauses have incompatible ordering constraints, the type system will reject it.
The specific mechanics of the type inference process are based on implicit parameters. A type can only get inferred into an expression based on a parameter. But we don't want people to have to specify parameters explicitly - that would wreck the syntax. Instead, we use implicit parameters. The inference system will find an implicit parameter that is type compatible with what's used in the rest of the expression.
the record type being queried.
a phantom type which defines the state of the builder.