Primitive record operations for Aerospike.operate/4.
These builders create the simple bin operations used by the server's
operate command: write a bin, read a bin, read only record metadata,
increment a numeric bin, and append or prepend string data. Use the CDT
modules for collection bins and Aerospike.Op.Exp for expression-backed
operate calls.
key = Aerospike.key("test", "users", "user:1")
{:ok, record} =
Aerospike.operate(cluster, key, [
Aerospike.Op.add("login_count", 1),
Aerospike.Op.put("last_seen", "2026-04-27"),
Aerospike.Op.get("login_count")
])Read operations return data in the %Aerospike.Record{} returned by
Aerospike.operate/4; write operations affect the record on the server and
only return data when the server operation itself produces a result.
See also Aerospike.Op.Bit, Aerospike.Op.Exp, Aerospike.Op.HLL,
Aerospike.Op.List, and Aerospike.Op.Map for collection and expression
operations.
Summary
Functions
Adds delta to a numeric bin.
Appends suffix to a string bin.
Reads bin_name from the record.
Reads only record metadata.
Prepends prefix to a string bin.
Writes value to bin_name.
Types
Functions
Adds delta to a numeric bin.
The server creates the bin when needed and returns an error if the existing value is not numeric.
Appends suffix to a string bin.
Reads bin_name from the record.
The returned operation projects the requested bin into the operate response.
@spec get_header() :: t()
Reads only record metadata.
This operation asks the server for the record generation and TTL without returning bin data.
Prepends prefix to a string bin.
Writes value to bin_name.
The value must be encodable by the Aerospike particle encoder. Atom bin names are converted to strings.