Class

io.scalajs.npm.mongodb

DSLExtensions

Related Doc: package mongodb

Permalink

implicit final class DSLExtensions extends AnyVal

Mongo DSL Extensions

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DSLExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DSLExtensions(attribute: String)

    Permalink

    attribute

    the given JSON attribute

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def $addToSet(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Adds elements to an array only if they do not already exist in the set.

    Adds elements to an array only if they do not already exist in the set.

    Annotations
    @inline()
    Example:
    1. { $addToSet: {letters: [ "c", "d" ] } }

  4. def $all(array: ⇒ Array[_]): (String, Dictionary[Any])

    Permalink

    The $all is equivalent to an $and operation of the specified values; i.e.

    The $all is equivalent to an $and operation of the specified values; i.e. the following statement:

    Annotations
    @inline()
    Example:
    1. { tags: { $all: [ "ssl" , "security" ] } }

  5. def $all(values: Any*): (String, Dictionary[Any])

    Permalink

    The $all is equivalent to an $and operation of the specified values; i.e.

    The $all is equivalent to an $and operation of the specified values; i.e. the following statement:

    Annotations
    @inline()
    Example:
    1. { tags: { $all: [ "ssl" , "security" ] } }

  6. def $elemMatch(value: (String, Any)*): (String, Dictionary[Any])

    Permalink

    Projects the first element in an array that matches the specified $elemMatch condition.

    Projects the first element in an array that matches the specified $elemMatch condition.

    Annotations
    @inline()
    Example:
    1. { students: { $elemMatch: { school: 102 } } }

  7. def $elemMatch(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Projects the first element in an array that matches the specified $elemMatch condition.

    Projects the first element in an array that matches the specified $elemMatch condition.

    Annotations
    @inline()
    Example:
    1. { students: { $elemMatch: { school: 102 } } }

  8. def $exists(state: ⇒ Boolean): (String, Dictionary[Any])

    Permalink

    Matches documents that have the specified field.

    Matches documents that have the specified field.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $exists: true, $nin: [ 5, 15 ] } } )

  9. def $gt(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Matches values that are greater than a specified value.

    Matches values that are greater than a specified value.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $gt: 20 } } )

  10. def $gte(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Matches values that are greater than or equal to a specified value.

    Matches values that are greater than or equal to a specified value.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $gte: 20 } } )

  11. def $in(array: ⇒ Array[_]): (String, Dictionary[Any])

    Permalink

    Matches any of the values specified in an array.

    Matches any of the values specified in an array.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $in: [ 5, 15 ] } } )

  12. def $inc(delta: ⇒ Double): (String, Dictionary[Any])

    Permalink

    Annotations
    @inline()
    Example:
    1. { $inc: { <field1>: <amount1>, <field2>: <amount2>, ... } }

  13. def $lt(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Matches values that are less than a specified value.

    Matches values that are less than a specified value.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $lt: 20 } } )

  14. def $lte(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Matches values that are less than or equal to a specified value.

    Matches values that are less than or equal to a specified value.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $lte: 20 } } )

  15. def $meta(text: ⇒ String): (String, Dictionary[Any])

    Permalink

    The $meta projection operator returns for each matching document the metadata (e.g.

    The $meta projection operator returns for each matching document the metadata (e.g. "textScore") associated with the query.

    Annotations
    @inline()
    Example:
    1. db.collection.find({}, { score: { $meta: "textScore" } })

  16. def $mod(array: ⇒ Array[_]): (String, Dictionary[Any])

    Permalink

    Performs a modulo operation on the value of a field and selects documents with a specified result.

    Performs a modulo operation on the value of a field and selects documents with a specified result.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $mod: [ 4, 0 ] } } )

  17. def $mod(values: Any*): (String, Dictionary[Any])

    Permalink

    Performs a modulo operation on the value of a field and selects documents with a specified result.

    Performs a modulo operation on the value of a field and selects documents with a specified result.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $mod: [ 4, 0 ] } } )

  18. def $ne(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Matches all values that are not equal to a specified value.

    Matches all values that are not equal to a specified value.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $ne: 20 } } )

  19. def $nin(array: ⇒ Array[_]): (String, Dictionary[Any])

    Permalink

    Matches none of the values specified in an array.

    Matches none of the values specified in an array.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { qty: { $nin: [ 5, 15 ] } } )

  20. def $not(expression: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Inverts the effect of a query expression and returns documents that do not match the query expression.

    Inverts the effect of a query expression and returns documents that do not match the query expression.

    Annotations
    @inline()
    Example:
    1. db.inventory.find( { price: { $not: { $gt: 1.99 } } } )

  21. def $oid: ObjectID

    Permalink
    Annotations
    @inline()
  22. def $orderby(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    The $orderby operator sorts the results of a query in ascending or descending order.

    The $orderby operator sorts the results of a query in ascending or descending order.

    Annotations
    @inline()
    Example:
    1. db.collection.find( { $query: {}, $orderby: { age : -1 } } )

  23. def $pop(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Removes the first or last item of an array.

    Removes the first or last item of an array.

    Example:
    1. db.students.update( { _id: 1 }, { $pop: { scores: -1 } } )

  24. def $pull(value: (String, Any)*): (String, Dictionary[Any])

    Permalink

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    Annotations
    @inline()
    Example:
    1. { $pull: { results: { $elemMatch: { score: 8 , item: "B" } } } }

  25. def $pull(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    Annotations
    @inline()
    Example:
    1. { $pull: { results: { $elemMatch: { score: 8 , item: "B" } } } }

  26. def $pullAll(array: ⇒ Array[_]): (String, Dictionary[Any])

    Permalink

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    Annotations
    @inline()
    Example:
    1. db.survey.update( { _id: 1 }, { $pullAll: { scores: [ 0, 5 ] } } )

  27. def $pullAll(values: Any*): (String, Dictionary[Any])

    Permalink

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    The $pull operator removes from an existing array all instances of a value or values that match a specified condition.

    Annotations
    @inline()
    Example:
    1. db.survey.update( { _id: 1 }, { $pullAll: { scores: [ 0, 5 ] } } )

  28. def $regex(pattern: ⇒ String, ignoreCase: Boolean = false): (String, Dictionary[Any])

    Permalink

    Selects documents where values match a specified regular expression.

    Selects documents where values match a specified regular expression.

    Annotations
    @inline()
    Example:
    1. db.products.find( { sku: { $regex: /^ABC/i } } )
  29. def $set(value: ⇒ Any): (String, Dictionary[Any])

    Permalink

    Annotations
    @inline()
    Example:
    1. { $set: { <field1>: <value1>, <field2>: <value2>, ... } }

  30. def $size(count: ⇒ Double): (String, Dictionary[Any])

    Permalink

    Selects documents if the array field is a specified size.

    Selects documents if the array field is a specified size.

    Annotations
    @inline()
    Example:
    1. db.collection.find( { field: { $size: 1 } } )

  31. def $slice(count: ⇒ Int): (String, Dictionary[Any])

    Permalink

    The $slice operator controls the number of items of an array that a query returns.

    The $slice operator controls the number of items of an array that a query returns. For information on limiting the size of an array during an update with $push, see the $slice modifier instead.

    Annotations
    @inline()
    Example:
    1. db.posts.find( {}, { comments: { $slice: 5 } } )

  32. def $sum(value: ⇒ Double): (String, Dictionary[Any])

    Permalink

    Annotations
    @inline()
    Example:
    1. count: { $sum: 1 }

  33. def $type(name: ⇒ String): (String, Dictionary[Any])

    Permalink

    Selects documents if a field is of the specified type.

    Selects documents if a field is of the specified type.

    Annotations
    @inline()
    Example:
    1. db.data.find( { x: { $type: "minKey" } } )

  34. def =(value: ⇒ Any): (String, Any)

    Permalink

    Specifies equality condition.

    Specifies equality condition. The $eq operator matches documents where the value of a field equals the specified value.

    Annotations
    @inline()
    Examples:
    1. db.inventory.find( { qty: 20 } )

    2. ,
    3. db.inventory.find( { qty: { $eq: 20 } } )

  35. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  36. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  37. val attribute: String

    Permalink

    the given JSON attribute

  38. def between[A, B](values: ⇒ (UndefOr[A], UndefOr[B])): (String, Dictionary[Any])

    Permalink
    Annotations
    @inline()
  39. def between[A, B](minValue: UndefOr[A], maxValue: UndefOr[B]): (String, Dictionary[Any])

    Permalink
    Annotations
    @inline()
  40. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped