MutateInSpec

class MutateInSpec

Functions

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.

Link copied to clipboard
inline fun <T> arrayAppend(path: String, values: List<T>, xattr: Boolean = false)
Link copied to clipboard
inline fun <T> arrayInsert(path: String, values: List<T>, xattr: Boolean = false)
Link copied to clipboard
inline fun <T> arrayPrepend(path: String, values: List<T>, xattr: Boolean = false)
Link copied to clipboard
fun decrementAndGet(path: String, delta: Long = 1, xattr: Boolean = false): SubdocLong
Link copied to clipboard
fun incrementAndGet(path: String, delta: Long = 1, xattr: Boolean = false): SubdocLong
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.

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

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

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

Replaces an Object node field or Array element.

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

Upserts an Object node field.