Sort

mongo4cats.operations.Sort
See theSort companion object
trait Sort

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def asc(fieldNames: String*): Sort

Create a sort specification for an ascending sort on the given field.

Create a sort specification for an ascending sort on the given field.

Value parameters

fieldNames

the field name

Attributes

Returns

the sort specification https://docs.mongodb.com/manual/reference/method/cursor.sort/#std-label-sort-asc-desc

def combinedWith(anotherSort: Sort): Sort

Combine multiple sort specifications. If any field names are repeated, the last one takes precedence.

Combine multiple sort specifications. If any field names are repeated, the last one takes precedence.

Value parameters

anotherSort

the sort specifications

Attributes

Returns

the combined sort specification

def desc(fieldNames: String*): Sort

Create a sort specification for a descending sort on the given field.

Create a sort specification for a descending sort on the given field.

Value parameters

fieldNames

the field name

Attributes

Returns

the sort specification https://docs.mongodb.com/manual/reference/method/cursor.sort/#std-label-sort-asc-desc

def metaTextScore(fieldName: String): Sort

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.

Value parameters

fieldName

the field name

Attributes

Returns

the sort specification https://docs.mongodb.com/manual/reference/method/cursor.sort/#std-label-sort-metadata