Filter

trait Filter
Companion
object
class Object
trait Matchable
class Any

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}}]}

Value Params
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.

Value Params
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}}

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.

Value Params
anotherFilter

the filter to or together

Returns

the filter

Concrete methods

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