case class AggregateObservable[TResult](wrapped: AggregateIterable[TResult]) extends Observable[TResult] with Product with Serializable
Observable for aggregate
- TResult
The type of the result.
- wrapped
the underlying java AggregateObservable
- Since
1.0
- Alphabetic
- By Inheritance
- AggregateObservable
- Serializable
- Product
- Equals
- Observable
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AggregateObservable(wrapped: AggregateIterable[TResult])
- wrapped
the underlying java AggregateObservable
Value Members
- def allowDiskUse(allowDiskUse: Boolean): AggregateObservable[TResult]
Enables writing to temporary files.
Enables writing to temporary files. A null value indicates that it's unspecified.
- allowDiskUse
true if writing to temporary files is enabled
- returns
this
- def batchSize(batchSize: Int): AggregateObservable[TResult]
Sets the number of documents to return per batch.
Sets the number of documents to return per batch.
- batchSize
the batch size
- returns
this
- Since
2.7
- def bypassDocumentValidation(bypassDocumentValidation: Boolean): AggregateObservable[TResult]
Sets the bypass document level validation flag.
Sets the bypass document level validation flag.
Note:: This only applies when an
$out
stage is specified.- bypassDocumentValidation
If true, allows the write to opt-out of document level validation.
- returns
this
- Since
1.1
- Note
Requires MongoDB 3.2 or greater
- def collation(collation: Collation): AggregateObservable[TResult]
Sets the collation options
Sets the collation options
- collation
the collation options to use
- returns
this
- Since
1.2
- Note
A null value represents the server default.
,Requires MongoDB 3.4 or greater
- def comment(comment: String): AggregateObservable[TResult]
Sets the comment to the aggregation.
Sets the comment to the aggregation. A null value means no comment is set.
- comment
the comment
- returns
this
- Since
2.2
- Note
Requires MongoDB 3.6 or greater
- def hint(hint: Bson): AggregateObservable[TResult]
Sets the hint for which index to use.
Sets the hint for which index to use. A null value means no hint is set.
- hint
the hint
- returns
this
- Since
2.2
- Note
Requires MongoDB 3.6 or greater
- def maxAwaitTime(duration: Duration): AggregateObservable[TResult]
Sets the maximum await execution time on the server for this operation.
Sets the maximum await execution time on the server for this operation.
- duration
the duration
- returns
this
- Since
2.2
- Note
Requires MongoDB 3.6 or greater
- def maxTime(duration: Duration): AggregateObservable[TResult]
Sets the maximum execution time on the server for this operation.
Sets the maximum execution time on the server for this operation.
- duration
the duration
- returns
this
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def subscribe(observer: Observer[_ >: TResult]): Unit
Request
Observable
to start streaming data.Request
Observable
to start streaming data.This is a "factory method" and can be called multiple times, each time starting a new Subscription. Each
Subscription
will work for only a single Observer.If the
Observable
rejects the subscription attempt or otherwise fails it will signal the error via Observer.onError.- observer
the
Observer
that will consume signals from thisObservable
- Definition Classes
- AggregateObservable → Observable
- def subscribe(observer: com.mongodb.async.client.Observer[_ >: TResult]): Unit
Handles the automatic boxing of a Java
Observable
so it conforms to the interface.Handles the automatic boxing of a Java
Observable
so it conforms to the interface.- observer
the
Observer
that will consume signals from thisObservable
- Definition Classes
- Observable → Observable
- Note
Users should not have to implement this method but rather use the Scala
Observable
.
- def toCollection(): Observable[Completed]
Aggregates documents according to the specified aggregation pipeline, which must end with a
$out
stage.Aggregates documents according to the specified aggregation pipeline, which must end with a
$out
stage.- returns
a Observable with a single element indicating when the operation has completed
Deprecated Value Members
- def useCursor(useCursor: Boolean): AggregateObservable[TResult]
Sets whether the server should use a cursor to return results.
Sets whether the server should use a cursor to return results.
- useCursor
whether the server should use a cursor to return results
- returns
this
- Annotations
- @deprecated
- Deprecated
(Since version 2.2) No replacement for this method
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: