GreenLeafMongoDsl

io.github.greenleafoss.mongo.GreenLeafMongoDsl$
See theGreenLeafMongoDsl companion trait

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Inherited classlikes

implicit class FiltersDsl(field: String)

Attributes

Inherited from:
GreenLeafMongoDsl
Graph
Supertypes
class Object
trait Matchable
class Any
implicit class JsValueWithoutNull(j: JsValue)

Attributes

Inherited from:
GreenLeafMongoDsl
Graph
Supertypes
class Object
trait Matchable
class Any
implicit class ObjAsJson[T](t: T)

Attributes

Inherited from:
GreenLeafMongoDsl
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Inherited methods

def $and[T](filters: Seq[T])(implicit writer: JsonWriter[T]): JsObject

$and performs a logical AND operation on an array of two or more expressions (e.g. expression1, expression2, etc.) and selects the documents that satisfy all the expressions in the array. The $and operator uses short-circuit evaluation. If the first expression (e.g. expression1) evaluates to false, MongoDB will not evaluate the remaining expressions.

$and performs a logical AND operation on an array of two or more expressions (e.g. expression1, expression2, etc.) and selects the documents that satisfy all the expressions in the array. The $and operator uses short-circuit evaluation. If the first expression (e.g. expression1) evaluates to false, MongoDB will not evaluate the remaining expressions.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$and("price" $ne 1.99, "price" $exists true)
Inherited from:
GreenLeafMongoDsl
def $and(filters: Seq[JsValue]): JsObject

$and performs a logical AND operation on an array of two or more expressions (e.g. expression1, expression2, etc.) and selects the documents that satisfy all the expressions in the array. The $and operator uses short-circuit evaluation. If the first expression (e.g. expression1) evaluates to false, MongoDB will not evaluate the remaining expressions.

$and performs a logical AND operation on an array of two or more expressions (e.g. expression1, expression2, etc.) and selects the documents that satisfy all the expressions in the array. The $and operator uses short-circuit evaluation. If the first expression (e.g. expression1) evaluates to false, MongoDB will not evaluate the remaining expressions.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$and("price" $ne 1.99, "price" $exists true)
Inherited from:
GreenLeafMongoDsl
def $elemMatch(v: JsValue): JsObject

The $elemMatch operator matches documents that contain an array field with at least one element that matches all the specified query criteria.

The $elemMatch operator matches documents that contain an array field with at least one element that matches all the specified query criteria.

Attributes

v

is value

Returns:

the filter

See also:
Example:
"qty" $all (
 $elemMatch ($and("size" $eq "M", "num" $gt 50)),
 $elemMatch ($and("num" $eq 100, "color" $eq "green"))
)
Inherited from:
GreenLeafMongoDsl
def $nor[T](filters: Seq[T])(implicit writer: JsonWriter[T]): JsObject

$nor performs a logical NOR operation on an array of one or more query expression and selects the documents that fail all the query expressions in the array.

$nor performs a logical NOR operation on an array of one or more query expression and selects the documents that fail all the query expressions in the array.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$nor("price" $eq 1.99, "qty" $lt 20, "sale" $eq true)
Inherited from:
GreenLeafMongoDsl
def $nor(filters: Seq[JsValue]): JsObject

$nor performs a logical NOR operation on an array of one or more query expression and selects the documents that fail all the query expressions in the array.

$nor performs a logical NOR operation on an array of one or more query expression and selects the documents that fail all the query expressions in the array.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$nor("price" $eq 1.99, "qty" $lt 20, "sale" $eq true)
Inherited from:
GreenLeafMongoDsl
def $or(filters: Seq[JsValue]): JsObject

The $or operator performs a logical OR operation on an array of two or more expressions and selects the documents that satisfy at least one of the expressions.

The $or operator performs a logical OR operation on an array of two or more expressions and selects the documents that satisfy at least one of the expressions.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$or("quantity" $lt 20, "price" $eq 10)
Inherited from:
GreenLeafMongoDsl
def $or[T](filters: Seq[T])(implicit writer: JsonWriter[T]): JsObject

The $or operator performs a logical OR operation on an array of two or more expressions and selects the documents that satisfy at least one of the expressions.

The $or operator performs a logical OR operation on an array of two or more expressions and selects the documents that satisfy at least one of the expressions.

Attributes

filters

are expressions

Returns:

the filter

See also:
Example:
$or("quantity" $lt 20, "price" $eq 10)
Inherited from:
GreenLeafMongoDsl

Implicits

Inherited implicits

final implicit def FiltersDsl(field: String): FiltersDsl

Attributes

Inherited from:
GreenLeafMongoDsl
final implicit def JsValueWithoutNull(j: JsValue): JsValueWithoutNull

Attributes

Inherited from:
GreenLeafMongoDsl
final implicit def ObjAsJson[T](t: T): ObjAsJson[T]

Attributes

Inherited from:
GreenLeafMongoDsl
implicit def json2document(j: JsValue): Document

Attributes

Inherited from:
GreenLeafMongoDsl