Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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