object Sorts
A factory for sort specifications. A convenient way to use this class is to statically import all of its methods, which allows usage like:
collection.find().sort(orderBy(ascending("x", "y"), descending("z")))
- Since
1.0
- Alphabetic
- By Inheritance
- Sorts
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ascending(fieldNames: String*): Bson
Create a sort specification for an ascending sort on the given fields.
Create a sort specification for an ascending sort on the given fields.
- fieldNames
the field names, which must contain at least one
- returns
the sort specification
- See also
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
descending(fieldNames: String*): Bson
Create a sort specification for an ascending sort on the given fields.
Create a sort specification for an ascending sort on the given fields.
- fieldNames
the field names, which must contain at least one
- returns
the sort specification
- See also
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
metaTextScore(fieldName: String): Bson
Create a sort specification for the text score meta projection on the given field.
Create a sort specification for the text score meta projection on the given field.
- fieldName
the field name
- returns
the sort specification
- See also
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
orderBy(sorts: Bson*): Bson
Combine multiple sort specifications.
Combine multiple sort specifications. If any field names are repeated, the last one takes precendence.
- sorts
the sort specifications
- returns
the combined sort specification
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: