Class

io.fsq.rogue

Query

Related Doc: package rogue

Permalink

case class Query[M, R, +State](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]) extends Product with Serializable

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.

M

the record type being queried.

State

a phantom type which defines the state of the builder.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Query
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allShards[S2](implicit ev: AddShardAware[State, _, S2]): Query[M, R, S2]

    Permalink
  5. def and[F](clause: (M) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink

    Adds another and-connected clause to the query.

  6. def andAsc(field: (M) ⇒ AbstractQueryField[_, _, _, M])(implicit ev: <:<[State, Ordered]): Query[M, R, State]

    Permalink
  7. def andDesc(field: (M) ⇒ AbstractQueryField[_, _, _, M])(implicit ev: <:<[State, Ordered]): Query[M, R, State]

    Permalink
  8. def andOpt[V, F](opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink
  9. def andScore(scoreName: String = "score"): Query[M, R, State]

    Permalink
  10. def asDBObject: DBObject

    Permalink
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. val collectionName: String

    Permalink
  14. def comment(c: String): Query[M, R, State]

    Permalink
  15. val comment: Option[String]

    Permalink
  16. val condition: AndCondition

    Permalink
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def findAndModify[F](clause: (M) ⇒ ModifyClause)(implicit ev1: Required[State, Unlimited with Unskipped], ev2: RequireShardKey[M, State]): FindAndModifyQuery[M, R]

    Permalink
  20. def findAndModifyOpt[V](opt: Option[V])(clause: (M, V) ⇒ ModifyClause)(implicit ev1: Required[State, Unlimited with Unskipped], ev2: RequireShardKey[M, State]): FindAndModifyQuery[M, R]

    Permalink
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hint[S2](index: MongoIndex[M])(implicit ev: AddHint[State, S2]): Query[M, R, S2]

    Permalink
  23. val hint: Option[ListMap[String, Any]]

    Permalink
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def iscan[F](clause: (M) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink

    Adds an iscan clause to a query.

  26. def iscanOpt[V, F](opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink
  27. val lim: Option[Int]

    Permalink
  28. def limit[S2](n: Int)(implicit ev: AddLimit[State, S2]): Query[M, R, S2]

    Permalink

    Places a limit on the size of the returned result.

    Places a limit on the size of the returned result.

    Like "or", this uses the Rogue phantom-type/implicit parameter mechanics. To call this method, the query must not yet have a limit clause attached. This is captured by the implicit parameter being constrained to be "Unlimited". After this is called, the type signature of the returned query is updated so that the "MaybeLimited" type parameter is now Limited.

  29. def limitOpt[S2](n: Option[Int])(implicit ev: AddLimit[State, S2]): Query[M, R, S2]

    Permalink
  30. def maxScan(max: Int): Query[M, R, State]

    Permalink
  31. val maxScan: Option[Int]

    Permalink
  32. val meta: M

    Permalink
  33. def modify(clause: (M) ⇒ ModifyClause)(implicit ev1: Required[State, Unselected with Unlimited with Unskipped], ev2: ShardingOk[M, State]): ModifyQuery[M, State]

    Permalink
  34. def modifyOpt[V](opt: Option[V])(clause: (M, V) ⇒ ModifyClause)(implicit ev1: Required[State, Unselected with Unlimited with Unskipped], ev2: ShardingOk[M, State]): ModifyQuery[M, State]

    Permalink
  35. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  36. def noop()(implicit ev1: Required[State, Unselected with Unlimited with Unskipped], ev2: ShardingOk[M, State]): ModifyQuery[M, State]

    Permalink
  37. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. def or[S2](subqueries: (Query[M, R, Ordered with Selected with Limited with Skipped with HasNoOrClause]) ⇒ Query[M, R, _]*)(implicit ev: AddOrClause[State, S2]): Query[M, R, S2]

    Permalink

    Chains an "or" subquery to the current query.

    Chains an "or" subquery to the current query.

    The use of the implicit parameter here is key to how the Rogue type checking mechanics work. In order to attach an "or" clause to a query, the query as it exists must not yet have an or-clause. So the implicit parameter, which carries the phantom type information, must be "HasNoOrClause" before this is called. After it's called, you can see that the "MaybeHasOrClause" type parameter is changed, and is now specifically bound to "HasOrClause", rather than to a type variable.

  40. val order: Option[MongoOrder]

    Permalink
  41. def orderAsc[S2](field: (M) ⇒ AbstractQueryField[_, _, _, M])(implicit ev: AddOrder[State, S2]): Query[M, R, S2]

    Permalink

    Like "or", this uses the Rogue phantom-type/implicit parameter mechanics.

    Like "or", this uses the Rogue phantom-type/implicit parameter mechanics. To call this method, the query must not yet have an ordering clause attached. This is captured by the implicit parameter being constrained to be "Unordered". After this is called, the type signature of the returned query is updated so that the "MaybeOrdered" type parameter is now Ordered.

  42. def orderDesc[S2](field: (M) ⇒ AbstractQueryField[_, _, _, M])(implicit ev: AddOrder[State, S2]): Query[M, R, S2]

    Permalink
  43. def orderNaturalAsc[V, S2](implicit ev: AddNaturalOrder[State, S2]): Query[M, R, S2]

    Permalink

    Natural ordering.

    Natural ordering. TODO: doesn't make sense in conjunction with ordering on any other fields. enforce w/ phantom types?

  44. def orderNaturalDesc[V, S2](implicit ev: AddNaturalOrder[State, S2]): Query[M, R, S2]

    Permalink
  45. def orderScore(scoreName: String = "score"): Query[M, R, State]

    Permalink

    Search score ordering

  46. def raw(f: (BasicDBObjectBuilder) ⇒ Unit): Query[M, R, State]

    Permalink
  47. val readPreference: Option[ReadPreference]

    Permalink
  48. def scan[F](clause: (M) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink

    Adds a scan clause to a query.

  49. def scanOpt[V, F](opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink
  50. def search(s: String, lang: Option[String] = None): Query[M, R, State]

    Permalink

    Adds text search to the query.

  51. def searchOpt(opt: Option[String], lang: Option[String] = None): Query[M, R, State]

    Permalink
  52. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M], f21: (M) ⇒ SelectField[F21, M], f22: (M) ⇒ SelectField[F22, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22), S2]

    Permalink
  53. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M], f21: (M) ⇒ SelectField[F21, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21), S2]

    Permalink
  54. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20), S2]

    Permalink
  55. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19), S2]

    Permalink
  56. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18), S2]

    Permalink
  57. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17), S2]

    Permalink
  58. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16), S2]

    Permalink
  59. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15), S2]

    Permalink
  60. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14), S2]

    Permalink
  61. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13), S2]

    Permalink
  62. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12), S2]

    Permalink
  63. def select[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, 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], f11: (M) ⇒ SelectField[F11, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11), S2]

    Permalink
  64. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10), S2]

    Permalink
  65. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8, F9), S2]

    Permalink
  66. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7, F8), S2]

    Permalink
  67. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6, F7), S2]

    Permalink
  68. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5, F6), S2]

    Permalink
  69. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4, F5), S2]

    Permalink
  70. 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: AddSelect[State, S2, _]): Query[M, (F1, F2, F3, F4), S2]

    Permalink
  71. def select[F1, F2, F3, S2](f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], f3: (M) ⇒ SelectField[F3, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2, F3), S2]

    Permalink
  72. def select[F1, F2, S2](f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M])(implicit ev: AddSelect[State, S2, _]): Query[M, (F1, F2), S2]

    Permalink
  73. def select[F1, S2](f1: (M) ⇒ SelectField[F1, M])(implicit ev: AddSelect[State, _, S2]): Query[M, F1, S2]

    Permalink

    Adds a select clause to the query.

    Adds a select clause to the query. The use of this method constrains the type signature of the query to force the "Sel" field to be type "Selected".

    The use of the implicit parameter here is key to how the Rogue type checking mechanics work. In order to attach a "select" clause to a query, the query as it exists must not have a select clause yet. So the implicit parameter, which carries the phantom type information, must be "Unselected" before this is called. After it's called, you can see that the "MaybeSelected" type parameter is changed, and is now specifically bound to "Selected", rather than to a type variable.

  74. val select: Option[MongoSelect[M, R]]

    Permalink
  75. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M], f21: (M) ⇒ SelectField[F21, M], f22: (M) ⇒ SelectField[F22, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  76. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M], f21: (M) ⇒ SelectField[F21, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  77. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], f20: (M) ⇒ SelectField[F20, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  78. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], f19: (M) ⇒ SelectField[F19, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  79. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], f18: (M) ⇒ SelectField[F18, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  80. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], f17: (M) ⇒ SelectField[F17, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  81. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], f16: (M) ⇒ SelectField[F16, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  82. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], f15: (M) ⇒ SelectField[F15, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  83. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], f14: (M) ⇒ SelectField[F14, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  84. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], f13: (M) ⇒ SelectField[F13, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  85. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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], f11: (M) ⇒ SelectField[F11, M], f12: (M) ⇒ SelectField[F12, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  86. def selectCase[F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, 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], f11: (M) ⇒ SelectField[F11, M], create: (F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  87. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  88. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  89. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  90. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  91. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  92. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  93. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  94. 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: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  95. def selectCase[F1, F2, CC, S2](f1: (M) ⇒ SelectField[F1, M], f2: (M) ⇒ SelectField[F2, M], create: (F1, F2) ⇒ CC)(implicit ev: AddSelect[State, S2, _]): Query[M, CC, S2]

    Permalink
  96. def selectCase[F1, CC, S2](f1: (M) ⇒ SelectField[F1, M], create: (F1) ⇒ CC)(implicit ev: AddSelect[State, _, S2]): Query[M, CC, S2]

    Permalink
  97. def setReadPreference(r: ReadPreference): Query[M, R, State]

    Permalink

    Set a flag to indicate whether this query should hit primaries or secondaries.

    Set a flag to indicate whether this query should hit primaries or secondaries. This only really makes sense if you're using replica sets. If this field is unspecified, rogue will leave the option untouched, so you'll use secondaries or not depending on how you configure the mongo java driver. Also, this only works if you're doing a query -- findAndModify, updates, and deletes always go to the primaries.

    For more info, see http://www.mongodb.org/display/DOCS/slaveOk

  98. def signature(): String

    Permalink
  99. val sk: Option[Int]

    Permalink
  100. def skip[S2](n: Int)(implicit ev: AddSkip[State, S2]): Query[M, R, S2]

    Permalink

    Adds a skip to the query.

    Adds a skip to the query.

    Like or, this uses the Rogue phantom-type/implicit parameter mechanics. To call this method, the query must not yet have a skip clause attached. This is captured by the implicit parameter being constrained to be Unskipped. After this is called, the type signature of the returned query is updated so that the MaybeSkipped type parameter is now Skipped.

  101. def skipOpt[S2](n: Option[Int])(implicit ev: AddSkip[State, S2]): Query[M, R, S2]

    Permalink
  102. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  103. def toString(): String

    Permalink
    Definition Classes
    Query → AnyRef → Any
  104. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  105. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. def where[F](clause: (M) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink

    Adds a where clause to a query.

  108. def whereOpt[V, F](opt: Option[V])(clause: (M, V) ⇒ QueryClause[F]): Query[M, R, State]

    Permalink
  109. def withShardKey[F, S2](clause: (M) ⇒ QueryClause[F] with ShardKeyClause)(implicit ev: AddShardAware[State, S2, _]): Query[M, R, S2]

    Permalink

    Adds an eqs clause specifying the shard key.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped