Filter

mongo4cats.operations.Filter
See theFilter companion object
trait Filter

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def and(anotherFilter: Filter): Filter

Creates a filter that performs a logical AND of the provided filter.

Creates a filter that performs a logical AND of the provided filter.

 eq("x", 1).and(lt("y", 3)) 

will generate a MongoDB query like:

 { $and: [{x : 1}, {y : {$lt : 3}}]} 

{ $and: [{x : 1}, {y : {$lt : 3}}]}

eq("x", 1).and(lt("y", 3))

will generate a MongoDB query like:

 { $and: [{x : 1}, {y : {$lt : 3}}]} 

{ $and: [{x : 1}, {y : {$lt : 3}}]}

Attributes

anotherFilter

the filter to and together

Returns:

the filter

def nor(anotherFilter: Filter): Filter

Creates a filter that performs a logical NOR operation on the specified filters.

Creates a filter that performs a logical NOR operation on the specified filters.

Attributes

anotherFilter

the filter to or together

Returns:

the filter

def not: Filter

Creates a filter that matches all documents that do not match the passed in filter. Lifts the current filter to create a valid "$not" query:

Creates a filter that matches all documents that do not match the passed in filter. Lifts the current filter to create a valid "$not" query:

 eq("x", 1).not 

will generate a MongoDB query like:

 {x : $not: {$eq : 1}} 

{x : $not: {$eq : 1}}

eq("x", 1).not

will generate a MongoDB query like:

 {x : $not: {$eq : 1}} 

{x : $not: {$eq : 1}}

Attributes

Returns:

the filter

def or(anotherFilter: Filter): Filter

Creates a filter that preforms a logical OR of the provided filter.

Creates a filter that preforms a logical OR of the provided filter.

Attributes

anotherFilter

the filter to or together

Returns:

the filter

Concrete methods

def &&(anotherFilter: Filter): Filter
def ||(anotherFilter: Filter): Filter