Aerospike.Batch (Aerospike Driver v0.3.1)

Copy Markdown View Source

Constructors for heterogeneous Aerospike.batch_operate/3 requests.

Each constructor returns an opaque batch entry value. Pass a list of entries to Aerospike.batch_operate/3 to execute reads, writes, deletes, operations, and record UDF calls in one batch request. Results are returned as %Aerospike.BatchResult{} values in the same order as the input entries.

Parent batch policy is passed to Aerospike.batch_operate/3. Entry-level read and write policy opts can be attached to each builder when a field is encodable in the batch index protocol.

Summary

Types

t()

One heterogeneous batch entry for Aerospike.batch_operate/3.

Functions

Builds a delete entry.

Returns the key targeted by a batch entry.

Builds an operate entry from Aerospike.Op operations.

Builds a put entry from a non-empty bin map.

Builds a full-record read entry.

Types

Functions

delete(key, opts \\ [])

Builds a delete entry.

key(arg1)

@spec key(t()) :: Aerospike.Key.t()

Returns the key targeted by a batch entry.

operate(key, operations, opts \\ [])

Builds an operate entry from Aerospike.Op operations.

put(key, bins, opts \\ [])

Builds a put entry from a non-empty bin map.

Bin names may be atoms or strings. Values follow the same supported value subset as Aerospike.put/4.

read(key, opts \\ [])

Builds a full-record read entry.

Accepts %Aerospike.Key{} values or {namespace, set, user_key} tuples.

udf(key, package, function, args \\ [], opts \\ [])

Builds a record-UDF entry.