- Description:
The
aerospike/exp/bit
module defines functions for expressions on the Blob datatype.
- Source:
The aerospike/exp/bit
module defines functions
for expressions on the Blob datatype.
Methods
(static) add(policy, bitOffset, bitSize, value, action, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit add operation. Note: integers are stored big-endian.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) and(policy, bitOffset, bitSize, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit and operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) count(bitOffset, bitSize, bin) → {number}
- Description:
Create an expression that performs bit count operation.
- Source:
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. |
Returns:
integer value number of bits set to 1 in the bit_size region.
- Type
- number
(static) get(bitOffset, bitSize, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit get operation.
- Source:
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. |
Returns:
blob bin bit_size bits rounded up to the nearest byte size.
- Type
- AerospikeExp
(static) getInt(bitOffset, bitSize, sign, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit get_int operation.
- Source:
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. |
Returns:
integer value Index of the left most bit starting from offset set to value.
- Type
- AerospikeExp
(static) insert(policy, byteOffset, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit insert operation.
- Source:
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. |
Returns:
blob bin resulting blob containing the inserted bytes.
- Type
- AerospikeExp
(static) lScan(bitOffset, bitSize, value, bin) → {number}
- Description:
Create an expression that performs bit lscan operation.
- Source:
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. |
Returns:
integer value Index of the left most bit starting from __offset set to value.
- Type
- number
(static) lShift(policy, bitOffset, bitSize, shift, bin) → {AerospikeExp}
- Description:
Create an expression that performs an bit lshift operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) not(policy, bitOffset, bitSize, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit not operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) or(policy, bitOffset, bitSize, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit or operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) rScan(bitOffset, bitSize, value, bin) → {number}
- Description:
Create an expression that performs bit rscan operation.
- Source:
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. |
Returns:
integer value Index of the right most bit starting from __offset set to value.
- Type
- number
(static) rShift(policy, bitOffset, bitSize, shift, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit rshift operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) reSize(policy, byteSize, flags, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit resize operation.
- Source:
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. |
Returns:
blob bin byteSize bytes.
- Type
- AerospikeExp
(static) remove(policy, byteOffset, byteSize, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit remove operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes removed.
- Type
- AerospikeExp
(static) set(policy, bitOffset, bitSize, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit set operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes overwritten.
- Type
- AerospikeExp
(static) setInt(policy, bitOffset, bitSize, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit add operation. Note: integers are stored big-endian.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) subtract(policy, bitOffset, bitSize, value, action, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit add operation. Note: integers are stored big-endian.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp
(static) xor(policy, bitOffset, bitSize, value, bin) → {AerospikeExp}
- Description:
Create an expression that performs bit xor operation.
- Source:
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. |
Returns:
blob bin resulting blob with the bytes operated on.
- Type
- AerospikeExp