Packages

  • package root

    This is the documentation for the MongoDB Scala driver.

    This is the documentation for the MongoDB Scala driver.

    Driver structure

    The mongodb scala driver.

    To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.

    Notable packages include:

    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package mongodb
    Definition Classes
    org
  • package scala

    The MongoDB Scala Driver package

    The MongoDB Scala Driver package

    Contains type aliases and companion objects to help when using the Scala API

    Definition Classes
    mongodb
    Since

    1.0

  • package model

    The model package containing models and options that help describe MongoCollection operations

    The model package containing models and options that help describe MongoCollection operations

    Definition Classes
    scala
  • package densify

    Definition Classes
    model
    Since

    4.7

    Note

    Requires MongoDB 5.1 or greater.

    See also

    Aggregates.densify

  • DensifyOptions
  • DensifyRange

object DensifyRange

A specification of how to compute the missing field values for which new documents must be added. It specifies a half-closed interval of values with the lower bound being inclusive, and a step. The first potentially missing value within each interval is its lower bound, other values are computed by adding the step multiple times, until the result is out of the interval. Each time the step is added, the result is a potentially missing value for which a new document must be added if the sequence of documents that is being densified does not have a document with equal value of the field.

Since

4.7

Note

Requires MongoDB 5.1 or greater.

See also

Aggregates.densify

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DensifyRange
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def fullRangeWithStep(step: Long, unit: MongoTimeUnit): DateDensifyRange

    Returns a DensifyRange that represents an interval with the smallest BSON Date value of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.

    Returns a DensifyRange that represents an interval with the smallest BSON Date value of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.

    step

    The positive step.

    unit

    The unit in which the step is specified.

    returns

    The requested DensifyRange.

  9. def fullRangeWithStep(step: Number): NumberDensifyRange

    Returns a DensifyRange that represents an interval with the smallest BSON 32-bit integer / 64-bit integer / Double / Decimal128 value of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.

    Returns a DensifyRange that represents an interval with the smallest BSON 32-bit integer / 64-bit integer / Double / Decimal128 value of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.

    step

    The positive step.

    returns

    The requested DensifyRange.

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. def of(range: Bson): DensifyRange

    Creates a DensifyRange from a Bson in situations when there is no builder method that better satisfies your needs.

    Creates a DensifyRange from a Bson in situations when there is no builder method that better satisfies your needs. This method cannot be used to validate the syntax.

    Example
    The following code creates two functionally equivalent DensifyRanges, though they may not be equal.

    val range1 = DensifyRange.partitionRangeWithStep(
      1, MongoTimeUnit.MINUTE)
    val range2 = DensifyRange.of(Document("bounds" -> "partition",
      "step" -> 1, "unit" -> MongoTimeUnit.MINUTE.value()))
    range

    A Bson representing the required DensifyRange.

    returns

    The requested DensifyRange.

  17. def partitionRangeWithStep(step: Long, unit: MongoTimeUnit): DateDensifyRange

    Returns a DensifyRange that represents an interval with the smallest BSON Date value of the field in the partition of documents being its lower bound, and the largest value being the upper bound.

    Returns a DensifyRange that represents an interval with the smallest BSON Date value of the field in the partition of documents being its lower bound, and the largest value being the upper bound.

    step

    The positive step.

    unit

    The unit in which the step is specified.

    returns

    The requested DensifyRange.

  18. def partitionRangeWithStep(step: Number): NumberDensifyRange

    Returns a DensifyRange that represents an interval with the smallest BSON 32-bit integer / 64-bit integer / Double / Decimal128 value of the field in the partition of documents being its lower bound, and the largest value being the upper bound.

    Returns a DensifyRange that represents an interval with the smallest BSON 32-bit integer / 64-bit integer / Double / Decimal128 value of the field in the partition of documents being its lower bound, and the largest value being the upper bound.

    step

    The positive step.

    returns

    The requested DensifyRange.

  19. def rangeWithStep(l: Instant, u: Instant, step: Long, unit: MongoTimeUnit): DateDensifyRange

    Returns a DensifyRange that represents a single interval [l, u).

    Returns a DensifyRange that represents a single interval [l, u).

    l

    The lower bound.

    u

    The upper bound.

    step

    The positive step.

    unit

    The unit in which the step is specified.

    returns

    The requested DensifyRange.

  20. def rangeWithStep(l: Number, u: Number, step: Number): NumberDensifyRange

    Returns a DensifyRange that represents a single interval [l, u).

    Returns a DensifyRange that represents a single interval [l, u).

    l

    The lower bound.

    u

    The upper bound.

    step

    The positive step.

    returns

    The requested DensifyRange.

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped