Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d634589
Changes for string operations
mirzakaracic May 5, 2026
e32a7b3
Updated protocol changes
mirzakaracic May 6, 2026
69d7c79
Updated api's to fix failing tests
mirzakaracic May 6, 2026
b2fe607
Updated StringOperation
mirzakaracic May 6, 2026
bbe952c
Updated javadocs for StringOperation and StringExp, pack clena-up
mirzakaracic May 7, 2026
47e7ddf
Removed policy from call since server is ignoring it. Also updated co…
mirzakaracic May 11, 2026
f360da8
Added TestStringExp
mirzakaracic May 20, 2026
8f94749
Fixed test with working version of server
mirzakaracic May 21, 2026
2a05ca9
Added server 8.1.3 gates for string ops feature
mirzakaracic May 21, 2026
9aad53c
Added pack function needed for String ops
mirzakaracic May 21, 2026
2b9207f
Added additional tests to include negative tests
mirzakaracic Jun 9, 2026
7b99e1b
Added test
mirzakaracic Jun 10, 2026
c2641f9
Removed single arg snip
mirzakaracic Jun 11, 2026
29d0f85
Renamed lenght -> end for substr(ofset-to-ned form, ...) method in St…
mirzakaracic Jun 12, 2026
4a60cf7
Added tests for validating `self-overlapping needle` for strings
mirzakaracic Jun 17, 2026
acb3dc9
Added examples for string operations
mirzakaracic Jun 18, 2026
e170b52
Added query test using String expressiolns
mirzakaracic Jun 18, 2026
f576592
Updated server version filter
mirzakaracic Jun 18, 2026
e1fa01e
Updated client version since in deprecation annotation
mirzakaracic Jun 19, 2026
8382bfc
Updated contracts to follow product request
mirzakaracic Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion client/src/com/aerospike/client/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,24 @@ public static Operation put(Bin bin) {

/**
* Create string append database operation.
*
* @deprecated Use {@link com.aerospike.client.operation.StringOperation#append(com.aerospike.client.operation.StringPolicy, String, String, com.aerospike.client.cdt.CTX...)}
* instead. This legacy operation performs a raw byte concatenation that is not Unicode/DBCS-aware;
* the string-package equivalent provides consistent Unicode handling and policy/CTX support.
*/
@Deprecated
public static Operation append(Bin bin) {
return new Operation(Type.APPEND, bin.name, bin.value);
}

/**
* Create string prepend database operation.
*
* @deprecated Use {@link com.aerospike.client.operation.StringOperation#prepend(com.aerospike.client.operation.StringPolicy, String, String, com.aerospike.client.cdt.CTX...)}
* instead. This legacy operation performs a raw byte concatenation that is not Unicode/DBCS-aware;
* the string-package equivalent provides consistent Unicode handling and policy/CTX support.
*/
@Deprecated
public static Operation prepend(Bin bin) {
return new Operation(Type.PREPEND, bin.name, bin.value);
}
Expand Down Expand Up @@ -111,7 +121,10 @@ public static enum Type {
BIT_MODIFY(13, true),
DELETE(14, true),
HLL_READ(15, false),
HLL_MODIFY(16, true);
HLL_MODIFY(16, true),
STRING_READ(17, false),
STRING_MODIFY(18, true),
TO_STRING(19, false);

public final int protocolType;
public final boolean isWrite;
Expand Down
10 changes: 10 additions & 0 deletions client/src/com/aerospike/client/ResultCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ public final class ResultCode {
*/
public static final int LOST_CONFLICT = 28;

/**
* String bin or string argument contains invalid UTF-8.
* Returned by server 8.1.3+ string operations when the bin value or a
* string argument fails the UTF-8 well-formedness gate.
*/
public static final int INVALID_ENCODING = 29;

/**
* Write can't complete until XDR finishes shipping.
*/
Expand Down Expand Up @@ -652,6 +659,9 @@ public static String getResultString(int resultCode) {
case LOST_CONFLICT:
return "Command failed due to conflict with XDR";

case INVALID_ENCODING:
return "Invalid UTF-8 encoding";

case XDR_KEY_BUSY:
return "Write can't complete until XDR finishes shipping";

Expand Down
7 changes: 5 additions & 2 deletions client/src/com/aerospike/client/command/OperateArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public OperateArgs(
case EXP_READ:
case HLL_READ:
case MAP_READ:
// Map operations require respondAllOps to be true.
case STRING_READ:
case TO_STRING:
// These operations require respondAllOps to be true.
respondAllOps = true;
// Fall through to read.
case CDT_READ:
Expand All @@ -72,7 +74,8 @@ public OperateArgs(
case EXP_MODIFY:
case HLL_MODIFY:
case MAP_MODIFY:
// Map operations require respondAllOps to be true.
case STRING_MODIFY:
// These operations require respondAllOps to be true.
respondAllOps = true;
// Fall through to write.
default:
Expand Down
4 changes: 4 additions & 0 deletions client/src/com/aerospike/client/exp/Exp.java
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ public static Exp digestModulo(int mod) {
* @param regex regular expression string
* @param flags regular expression bit flags. See {@link com.aerospike.client.query.RegexFlag}
* @param bin string bin or string value expression
* @deprecated Use {@link com.aerospike.client.exp.StringExp#regexCompare(Exp, int, Exp)} instead.
* This legacy comparison uses POSIX regex and is not Unicode/DBCS-aware; the string-package
* equivalent uses ICU regex and provides consistent Unicode handling across the string ops.
*/
@Deprecated
public static Exp regexCompare(String regex, int flags, Exp bin) {
return new Regex(bin, regex, flags);
}
Expand Down
Loading
Loading