public final class TupleOperations extends Object
TupleOperation
for update and upsert requestsModifier and Type | Method and Description |
---|---|
static TupleOperations |
add(int fieldIndex,
Number value)
Adds the specified value to the field value
|
static TupleOperations |
add(String fieldName,
Number value)
Adds the specified value to the field value
|
TupleOperations |
addOperation(TupleOperation operation)
Add operation to the list
|
TupleOperations |
andAdd(int fieldIndex,
Number value)
Adds the specified value to the field value
|
TupleOperations |
andAdd(String fieldName,
Number value)
Adds the specified value to the field value
|
TupleOperations |
andBitwiseAnd(int fieldIndex,
long value)
Bitwise AND(&) operation
|
TupleOperations |
andBitwiseAnd(String fieldName,
long value)
Bitwise AND(&) operation
|
TupleOperations |
andBitwiseOr(int fieldIndex,
long value)
Bitwise OR(|) operation
|
TupleOperations |
andBitwiseOr(String fieldName,
long value)
Bitwise OR(|) operation
|
TupleOperations |
andBitwiseXor(int fieldIndex,
long value)
Bitwise XOR(^) operation
|
TupleOperations |
andBitwiseXor(String fieldName,
long value)
Bitwise XOR(^) operation
|
TupleOperations |
andDelete(int fieldIndex,
int fieldsCount)
Remove field value
|
TupleOperations |
andDelete(String fieldName,
int fieldsCount)
Remove field value
|
TupleOperations |
andInsert(int fieldIndex,
Object value)
Insert field value
|
TupleOperations |
andInsert(String fieldName,
Object value)
Insert field value
|
TupleOperations |
andSet(int fieldIndex,
Object value)
Set field value
|
TupleOperations |
andSet(String fieldName,
Object value)
Set field value
|
TupleOperations |
andSplice(int fieldIndex,
int position,
int offset,
String replacement)
Replace substring
|
TupleOperations |
andSplice(String fieldName,
int position,
int offset,
String replacement)
Replace substring
|
TupleOperations |
andSubtract(int fieldIndex,
Number value)
Subtracts the specified value to the field value
|
TupleOperations |
andSubtract(String fieldName,
Number value)
Subtracts the specified value to the field value
|
List<TupleOperation> |
asList()
Get list of operations
|
List<TupleOperation> |
asProxyOperationList()
Get a list of operations by converting field indexes starts with 0
to position numbers starts with 1 for working with lua box.space API
|
static TupleOperations |
bitwiseAnd(int fieldIndex,
long value)
Bitwise AND(&) operation
|
static TupleOperations |
bitwiseAnd(String fieldName,
long value)
Bitwise AND(&) operation
|
static TupleOperations |
bitwiseOr(int fieldIndex,
long value)
Bitwise OR(|) operation
|
static TupleOperations |
bitwiseOr(String fieldName,
long value)
Bitwise OR(|) operation
|
static TupleOperations |
bitwiseXor(int fieldIndex,
long value)
Bitwise XOR(^) operation
|
static TupleOperations |
bitwiseXor(String fieldName,
long value)
Bitwise XOR(^) operation
|
static TupleOperations |
delete(int fieldIndex,
int fieldsCount)
Remove field value
|
static TupleOperations |
delete(String fieldName,
int fieldsCount)
Remove field value
|
static TupleOperations |
fromTarantoolTuple(TarantoolTuple tuple)
Build a collection of set operations from passed tuple
|
static TupleOperations |
insert(int fieldIndex,
Object value)
Insert field value
|
static TupleOperations |
insert(String fieldName,
Object value)
Insert field value
|
static TupleOperations |
set(int fieldIndex,
Object value)
Set field value
|
static TupleOperations |
set(String fieldName,
Object value)
Set field value
|
static TupleOperations |
splice(int fieldIndex,
int position,
int offset,
String replacement)
Replace substring
|
static TupleOperations |
splice(String fieldName,
int position,
int offset,
String replacement)
Replace substring
|
static TupleOperations |
subtract(int fieldIndex,
Number value)
Subtracts the specified value to the field value
|
static TupleOperations |
subtract(String fieldName,
Number value)
Subtracts the specified value to the field value
|
public TupleOperations addOperation(TupleOperation operation)
operation
- for fieldpublic List<TupleOperation> asList()
public List<TupleOperation> asProxyOperationList()
public static TupleOperations fromTarantoolTuple(TarantoolTuple tuple)
tuple
- tuple, must not be null or emptypublic static TupleOperations add(int fieldIndex, Number value)
fieldIndex
- field number starting with 0value
- incrementpublic TupleOperations andAdd(int fieldIndex, Number value)
fieldIndex
- field number starting with 0value
- incrementpublic static TupleOperations add(String fieldName, Number value)
fieldName
- field namevalue
- incrementpublic TupleOperations andAdd(String fieldName, Number value)
fieldName
- field namevalue
- incrementpublic static TupleOperations bitwiseAnd(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic TupleOperations andBitwiseAnd(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic static TupleOperations bitwiseAnd(String fieldName, long value)
fieldName
- field namevalue
- valuepublic TupleOperations andBitwiseAnd(String fieldName, long value)
fieldName
- field namevalue
- valuepublic static TupleOperations bitwiseOr(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic TupleOperations andBitwiseOr(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic static TupleOperations bitwiseOr(String fieldName, long value)
fieldName
- field namevalue
- valuepublic TupleOperations andBitwiseOr(String fieldName, long value)
fieldName
- field namevalue
- valuepublic static TupleOperations bitwiseXor(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic TupleOperations andBitwiseXor(int fieldIndex, long value)
fieldIndex
- field number starting with 0value
- valuepublic static TupleOperations bitwiseXor(String fieldName, long value)
fieldName
- field namevalue
- valuepublic TupleOperations andBitwiseXor(String fieldName, long value)
fieldName
- field namevalue
- valuepublic static TupleOperations delete(int fieldIndex, int fieldsCount)
fieldIndex
- start field number starting with 0 to start withfieldsCount
- the number of fields to removepublic TupleOperations andDelete(int fieldIndex, int fieldsCount)
fieldIndex
- start field number starting with 0 to start withfieldsCount
- the number of fields to removepublic static TupleOperations delete(String fieldName, int fieldsCount)
fieldName
- field name to start withfieldsCount
- the number of fields to removepublic TupleOperations andDelete(String fieldName, int fieldsCount)
fieldName
- field name to start withfieldsCount
- the number of fields to removepublic static TupleOperations insert(int fieldIndex, Object value)
fieldIndex
- field number starting with 0 to insert aftervalue
- the value to insertpublic TupleOperations andInsert(int fieldIndex, Object value)
fieldIndex
- field number starting with 0 to insert aftervalue
- the value to insertpublic static TupleOperations insert(String fieldName, Object value)
fieldName
- field name to insert aftervalue
- the value to insertpublic TupleOperations andInsert(String fieldName, Object value)
fieldName
- field name to insert aftervalue
- the value to insertpublic static TupleOperations set(int fieldIndex, Object value)
fieldIndex
- field number starting with 0value
- the new value of a fieldpublic TupleOperations andSet(int fieldIndex, Object value)
fieldIndex
- field number starting with 0value
- the new value of a fieldpublic static TupleOperations set(String fieldName, Object value)
fieldName
- field namevalue
- the new value of a fieldpublic TupleOperations andSet(String fieldName, Object value)
fieldName
- field namevalue
- the new value of a fieldpublic static TupleOperations splice(int fieldIndex, int position, int offset, String replacement)
fieldIndex
- field number starting with 0position
- the start'th positionoffset
- length of substringreplacement
- new valuepublic TupleOperations andSplice(int fieldIndex, int position, int offset, String replacement)
fieldIndex
- field number starting with 0position
- the start'th positionoffset
- length of substringreplacement
- new valuepublic static TupleOperations splice(String fieldName, int position, int offset, String replacement)
fieldName
- field nameposition
- the start'th positionoffset
- length of substringreplacement
- new valuepublic TupleOperations andSplice(String fieldName, int position, int offset, String replacement)
fieldName
- field nameposition
- the start'th positionoffset
- length of substringreplacement
- new valuepublic static TupleOperations subtract(int fieldIndex, Number value)
fieldIndex
- field number starting with 0value
- incrementpublic TupleOperations andSubtract(int fieldIndex, Number value)
fieldIndex
- field number starting with 0value
- incrementpublic static TupleOperations subtract(String fieldName, Number value)
fieldName
- field namevalue
- incrementpublic TupleOperations andSubtract(String fieldName, Number value)
fieldName
- field namevalue
- incrementCopyright © 2025 Picodata. All rights reserved.