Bit expression helpers for blob expressions.
Summary
Functions
Adds value to a sub-integer in the bitmap.
Applies bitwise AND of value into the selected bit range.
Inverts the selected bit range.
Applies bitwise OR of value into the selected bit range.
Applies bitwise XOR of value into the selected bit range.
Returns the count of bits set to 1 in the selected range.
Returns the selected bits as a blob expression.
Reads an integer from the selected bit range, optionally as signed.
Inserts a byte-string expression at byte_offset.
Returns the offset of the first matching bit when scanning left to right.
Left shifts the selected bit range by shift bits.
Removes byte_size bytes starting at byte_offset.
Resizes the blob expression to byte_size bytes using resize_flags.
Returns the offset of the first matching bit when scanning right to left.
Right shifts the selected bit range by shift bits.
Overwrites a bit range with bits from value.
Writes integer value into the selected bit range.
Subtracts value from a sub-integer in the bitmap.
Types
@type opts() :: [ flags: atom() | [atom()] | non_neg_integer() | {:raw, non_neg_integer()}, overflow_action: atom() | non_neg_integer() | {:raw, non_neg_integer()}, signed: boolean() ]
Bit expression modify options.
Supported keys:
:flags- bit-operation write flags. Defaults to:default.:overflow_action- overflow behavior foradd/5andsubtract/5.:signed- when true, adds the signed flag to:overflow_action.
@type t() :: Aerospike.Exp.t()
Opaque server-side expression.
Functions
@spec add( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Adds value to a sub-integer in the bitmap.
Supports flags:, overflow_action:, and signed:.
@spec bw_and( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Applies bitwise AND of value into the selected bit range.
@spec bw_not(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()
Inverts the selected bit range.
@spec bw_or( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Applies bitwise OR of value into the selected bit range.
@spec bw_xor( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Applies bitwise XOR of value into the selected bit range.
@spec count(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns the count of bits set to 1 in the selected range.
@spec get(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
Returns the selected bits as a blob expression.
@spec get_int(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), boolean()) :: t()
Reads an integer from the selected bit range, optionally as signed.
@spec insert(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()
Inserts a byte-string expression at byte_offset.
@spec lscan( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t() ) :: t()
Returns the offset of the first matching bit when scanning left to right.
@spec lshift( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Left shifts the selected bit range by shift bits.
@spec remove(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()
Removes byte_size bytes starting at byte_offset.
@spec resize( Aerospike.Exp.t(), Aerospike.Exp.t(), atom() | [atom()] | non_neg_integer() | {:raw, non_neg_integer()}, opts() ) :: t()
Resizes the blob expression to byte_size bytes using resize_flags.
@spec rscan( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t() ) :: t()
Returns the offset of the first matching bit when scanning right to left.
@spec rshift( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Right shifts the selected bit range by shift bits.
@spec set( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Overwrites a bit range with bits from value.
@spec set_int( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Writes integer value into the selected bit range.
@spec subtract( Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts() ) :: t()
Subtracts value from a sub-integer in the bitmap.
Supports flags:, overflow_action:, and signed:.