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
- Alphabetic
- By Inheritance
- DensifyRange
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fullRangeWithStep(step: Long, unit: MongoTimeUnit): DateDensifyRange
Returns a
DensifyRangethat represents an interval with the smallest BSONDatevalue of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.Returns a
DensifyRangethat represents an interval with the smallest BSONDatevalue 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
stepis specified.- returns
The requested
DensifyRange.
- def fullRangeWithStep(step: Number): NumberDensifyRange
Returns a
DensifyRangethat represents an interval with the smallest BSON32-bit integer/64-bit integer/Double/Decimal128value of the field in the sequence of documents being its lower bound, and the largest value being the upper bound.Returns a
DensifyRangethat represents an interval with the smallest BSON32-bit integer/64-bit integer/Double/Decimal128value 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.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def of(range: Bson): DensifyRange
Creates a
DensifyRangefrom aBsonin situations when there is no builder method that better satisfies your needs.Creates a
DensifyRangefrom aBsonin 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 equivalentDensifyRanges, 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
Bsonrepresenting the requiredDensifyRange.- returns
The requested
DensifyRange.
- def partitionRangeWithStep(step: Long, unit: MongoTimeUnit): DateDensifyRange
Returns a
DensifyRangethat represents an interval with the smallest BSONDatevalue of the field in the partition of documents being its lower bound, and the largest value being the upper bound.Returns a
DensifyRangethat represents an interval with the smallest BSONDatevalue 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
stepis specified.- returns
The requested
DensifyRange.
- def partitionRangeWithStep(step: Number): NumberDensifyRange
Returns a
DensifyRangethat represents an interval with the smallest BSON32-bit integer/64-bit integer/Double/Decimal128value of the field in the partition of documents being its lower bound, and the largest value being the upper bound.Returns a
DensifyRangethat represents an interval with the smallest BSON32-bit integer/64-bit integer/Double/Decimal128value 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.
- def rangeWithStep(l: Instant, u: Instant, step: Long, unit: MongoTimeUnit): DateDensifyRange
Returns a
DensifyRangethat represents a single interval [l, u).Returns a
DensifyRangethat represents a single interval [l, u).- l
The lower bound.
- u
The upper bound.
- step
The positive step.
- unit
The unit in which the
stepis specified.- returns
The requested
DensifyRange.
- def rangeWithStep(l: Number, u: Number, step: Number): NumberDensifyRange
Returns a
DensifyRangethat represents a single interval [l, u).Returns a
DensifyRangethat represents a single interval [l, u).- l
The lower bound.
- u
The upper bound.
- step
The positive step.
- returns
The requested
DensifyRange.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
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: