The aerospike/exp/bit
module defines functions
for expressions on the Blob datatype.
- Source:
Methods
-
<static> add(policy, bitOffset, bitSize, value, action, bin)
-
Create an expression that performs bit add operation. Note: integers are stored big-endian.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
value
AerospikeExp Integer expression for value to add.
action
number bit overflow action value.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> and(policy, bitOffset, bitSize, value, bin)
-
Create an expression that performs bit and operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
value
AerospikeExp Blob expression containing bytes to write.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> count(bitOffset, bitSize, bin)
-
Create an expression that performs bit count operation.
Parameters:
Name Type Description bitOffset
AerospikeExp The bit index of where to start reading from.
bitSize
AerospikeExp Number of bits to read from the blob bin.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
integer value number of bits set to 1 in the bit_size region.
- Type
- number
-
<static> get(bitOffset, bitSize, bin)
-
Create an expression that performs bit get operation.
Parameters:
Name Type Description bitOffset
AerospikeExp The bit index of where to start reading from.
bitSize
AerospikeExp Number of bits to read from the blob bin.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin bit_size bits rounded up to the nearest byte size.
- Type
- AerospikeExp
-
<static> getInt(bitOffset, bitSize, sign, bin)
-
Create an expression that performs bit get_int operation.
Parameters:
Name Type Description bitOffset
AerospikeExp The bit index of where to start reading from.
bitSize
AerospikeExp Number of bits to read from the blob bin.
sign
boolean Boolean value, true for signed, false for unsigned.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
integer value Index of the left most bit starting from offset set to value.
- Type
- AerospikeExp
-
<static> insert(policy, byteOffset, value, bin)
-
Create an expression that performs bit insert operation.
Parameters:
Name Type Description policy
Object bit policy value.
byteOffset
AerospikeExp Byte index of where to insert the value.
value
AerospikeExp Blob expression containing the bytes to insert.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob containing the inserted bytes.
- Type
- AerospikeExp
-
<static> lScan(bitOffset, bitSize, value, bin)
-
Create an expression that performs bit lscan operation.
Parameters:
Name Type Description bitOffset
AerospikeExp The bit index of where to start reading from.
bitSize
AerospikeExp Number of bits to read from the blob bin.
value
AerospikeExp Boolean expression, true searches for 1, false for 0.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
integer value Index of the left most bit starting from __offset set to value.
- Type
- number
-
<static> lShift(policy, bitOffset, bitSize, shift, bin)
-
Create an expression that performs an bit lshift operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
shift
number Number of bits to shift by.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> not(policy, bitOffset, bitSize, bin)
-
Create an expression that performs bit not operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> or(policy, bitOffset, bitSize, value, bin)
-
Create an expression that performs bit or operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bytes to be operated on.
value
AerospikeExp Blob expression containing bytes to write.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> rScan(bitOffset, bitSize, value, bin)
-
Create an expression that performs bit rscan operation.
Parameters:
Name Type Description bitOffset
AerospikeExp The bit index of where to start reading from.
bitSize
AerospikeExp Number of bits to read from the blob bin.
value
AerospikeExp Boolean expression, true searches for 1, false for 0.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
integer value Index of the right most bit starting from __offset set to value.
- Type
- number
-
<static> rShift(policy, bitOffset, bitSize, shift, bin)
-
Create an expression that performs bit rshift operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
shift
number Number of bits to shift by.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> reSize(policy, byteSize, flags, bin)
-
Create an expression that performs bit resize operation.
Parameters:
Name Type Description policy
Object bit policy value.
byteSize
number Number of bytes the resulting blob should occupy.
flags
number bit resize flags value.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin byteSize bytes.
- Type
- AerospikeExp
-
<static> remove(policy, byteOffset, byteSize, bin)
-
Create an expression that performs bit remove operation.
Parameters:
Name Type Description policy
Object bit policy value.
byteOffset
AerospikeExp Byte index of where to remove from.
byteSize
number Number of bytes to remove.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes removed.
- Type
- AerospikeExp
-
<static> set(policy, bitOffset, bitSize, value, bin)
-
Create an expression that performs bit set operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start writing.
bitSize
AerospikeExp Number of bytes to overwrite.
value
AerospikeExp Blob expression containing bytes to write.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes overwritten.
- Type
- AerospikeExp
-
<static> setInt(policy, bitOffset, bitSize, value, bin)
-
Create an expression that performs bit add operation. Note: integers are stored big-endian.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
value
AerospikeExp Integer expression for value to set.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> subtract(policy, bitOffset, bitSize, value, action, bin)
-
Create an expression that performs bit add operation. Note: integers are stored big-endian.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
value
AerospikeExp Integer expression for value to subtract.
action
number bit overflow action value.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
-
<static> xor(policy, bitOffset, bitSize, value, bin)
-
Create an expression that performs bit xor operation.
Parameters:
Name Type Description policy
Object bit policy value.
bitOffset
AerospikeExp Bit index of where to start operation.
bitSize
AerospikeExp Number of bits to be operated on.
value
AerospikeExp Blob expression containing bytes to write.
bin
AerospikeExp A blob bin expression to apply this function to.
- Source:
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp