Skip to content

MongoDB request DSLopensavvy.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

interface Option : BsonNode

Additional parameters that are passed to MongoDB operations.

Options

Parent interface for all option containers.

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

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

DSL to describe a sort order.

WithLimit

interface WithLimit : Options

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

Declares which nodes should receive the request.

WithSkip

interface WithSkip : Options

Number of documents to skip before processing the request.

WithSort

interface WithSort<Document : Any> : Options

Describes in which order elements should be returned by the query.

WithWriteConcern

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

inline fun <O : Option> Options.option(): O?

Accesses the value of a given Option.