c

io.scalajs.npm.mongodb

DSLExtensions

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)

    attribute

    the given JSON attribute

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def $addToSet(value: ⇒ Any): (String, Dictionary[Any])

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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
    Annotations
    @inline()
  22. def $orderby(value: ⇒ Any): (String, Dictionary[Any])

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

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

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

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

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

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

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

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

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

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

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

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

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

    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)

    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
    Definition Classes
    Any
  36. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  37. val attribute: String
  38. def between[A, B](values: ⇒ (UndefOr[A], UndefOr[B])): (String, Dictionary[Any])
    Annotations
    @inline()
  39. def between[A, B](minValue: UndefOr[A], maxValue: UndefOr[B]): (String, Dictionary[Any])
    Annotations
    @inline()
  40. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped