MutateInSpec

class MutateInSpec

Functions

arrayAddUnique
Link copied to clipboard
fun arrayAddUnique(path: String, value: Boolean?, xattr: Boolean = false)
fun arrayAddUnique(path: String, value: Int?, xattr: Boolean = false)
fun arrayAddUnique(path: String, value: Long?, xattr: Boolean = false)
fun arrayAddUnique(path: String, value: String?, xattr: Boolean = false)

Adds the value to an array (creating the array if it doesn't already exist) or fail with PathExistsException if the array already contains the value.

arrayAppend
Link copied to clipboard
inline fun <T> arrayAppend(path: String, values: List<T>, xattr: Boolean = false)
arrayInsert
Link copied to clipboard
inline fun <T> arrayInsert(path: String, values: List<T>, xattr: Boolean = false)
arrayPrepend
Link copied to clipboard
inline fun <T> arrayPrepend(path: String, values: List<T>, xattr: Boolean = false)
decrementAndGet
Link copied to clipboard
fun decrementAndGet(path: String, delta: Long = 1, xattr: Boolean = false): SubdocLong
incrementAndGet
Link copied to clipboard
fun incrementAndGet(path: String, delta: Long = 1, xattr: Boolean = false): SubdocLong
insert
Link copied to clipboard
inline fun <T> insert(path: String, value: T, xattr: Boolean = false)

Inserts an Object node field. Fails if the field already exists.

remove
Link copied to clipboard
fun remove(path: String, xattr: Boolean = false)

Removes the targeted element (or whole doc if path is empty)

replace
Link copied to clipboard
inline fun <T> replace(path: String, value: T, xattr: Boolean = false)

Replaces an Object node field or Array element.

upsert
Link copied to clipboard
inline fun <T> upsert(path: String, value: T, xattr: Boolean = false)

Upserts an Object node field.