MongoDB request DSL • opensavvy.ktmongo.dsl.options
Package-level declarations¶
Types¶
AbstractCompoundOption¶
abstract class AbstractCompoundOption(val name: String, content: BsonNode, val context: ) : AbstractOption
Utility to easily implement options that contain a document as content.
AbstractOption¶
abstract class AbstractOption(val name: String, val context: ) : AbstractBsonNode, Option
Helper to implement Option.
LimitOption¶
class LimitOption(val limit: Long, val context: ) : AbstractOption
Maximum number of elements analyzed by this operation.
MaxTimeOption¶
class MaxTimeOption(val timeout: , val context: ) : AbstractOption
Maximum timeout spent processing the request.
Option¶
Additional parameters that are passed to MongoDB operations.
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, val context: ) : 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, val context: ) : AbstractOption
Specifies the read preference for an operation.
SkipOption¶
class SkipOption(val skip: Long, val context: ) : AbstractOption
Number of documents to skip before processing the request.
SortOption¶
class SortOption<Document : Any>(config: SortOptionDsl<Document>, val context: ) : AbstractCompoundOption
Describes in which order elements should be returned.
SortOptionDsl¶
interface SortOptionDsl<Document : Any> : CompoundBsonNode, FieldDsl
DSL to describe a sort order.
WithLimit¶
Limits the number of elements returned by a query.
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¶
Number of documents to skip before processing the request.
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: ? = null)
The level of acknowledgment requested from a write operation.
WriteConcernOption¶
class WriteConcernOption(val concern: WriteConcern, val context: ) : AbstractOption
Specifies the write concern for an operation.
Functions¶
option¶
Accesses the value of a given Option.