opensavvy.ktmongo.dsl.options¶
Types¶
AbstractCompoundOption¶
abstract class AbstractCompoundOption(
name: String,
content: BsonNode,
context: BsonContext
) : AbstractOption
Utility to easily implement options that contain a document as content.
AbstractOption¶
abstract class AbstractOption(val name: String, context: BsonContext) : AbstractBsonNode, Option
Helper to implement Option.
LimitOption¶
class LimitOption(val limit: Long, context: BsonContext) : AbstractOption
Maximum number of elements analyzed by this operation.
MaxTimeOption¶
class MaxTimeOption(val timeout: Duration, context: BsonContext) : AbstractOption
Maximum timeout spent processing the request.
Option¶
Options¶
interface Options : CompoundBsonNode
Parent interface for all option containers.
ReadConcern¶
enum ReadConcern : Enum<ReadConcern>
The read concern allows configuring the level of consistency required for each operation.
ReadConcernOption¶
class ReadConcernOption(val concern: ReadConcern, context: BsonContext) : AbstractOption
Specifies the read concern for an operation.
ReadPreference¶
enum ReadPreference : Enum<ReadPreference>
The read preference allows configuring which instance the request will be sent to.
ReadPreferenceOption¶
class ReadPreferenceOption(val concern: ReadPreference, context: BsonContext) : AbstractOption
Specifies the read preference for an operation.
SkipOption¶
class SkipOption(val skip: Long, context: BsonContext) : AbstractOption
Number of documents to skip before processing the request.
SortOption¶
class SortOption<Document : Any>(config: SortOptionDsl<Document>, context: BsonContext) : AbstractCompoundOption
Describes in which order elements should be returned.
SortOptionDsl¶
interface SortOptionDsl<Document : Any> : CompoundBsonNode, FieldDsl
DSL to describe a sort order.
WithLimit¶
WithMaxTime¶
interface WithMaxTime : Options
Maximum duration spent processing the request.
WithReadConcern¶
interface WithReadConcern : Options
Consistency guarantees for this request.
WithReadPreference¶
interface WithReadPreference : Options
Declares which nodes should receive the request.
WithSkip¶
WithSort¶
Describes in which order elements should be returned by the query.
WithWriteConcern¶
interface WithWriteConcern : Options
Consistency guarantees for this request.
WriteAcknowledgment¶
sealed class WriteAcknowledgment
Describes how many nodes must acknowledge this write operation.
WriteConcern¶
class WriteConcern(
val acknowledgment: WriteAcknowledgment? = null,
val writeToJournal: Boolean? = null,
val writeTimeout: Duration? = null
)
The level of acknowledgment requested from a write operation.
WriteConcernOption¶
class WriteConcernOption(val concern: WriteConcern, context: BsonContext) : AbstractOption
Specifies the write concern for an operation.