LookupInSpec

abstract class LookupInSpec

Specifies which fields to retrieve when doing a subdoc lookup.

Samples

// Subdoc lookup
val spec = object : LookupInSpec() {
    val sku = get("sku")
    val hasPrice = exists("price")
    val orderCount = count("orders")
}
collection.lookupIn(documentId, spec) {
    println("cas: $cas")
    with(spec) {
        println("sku: ${sku.contentAs<String>()}")
        println("has price: ${hasPrice.value}")
        println("order count: ${orderCount.value}")
    }
}

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun toString(): String