@valkey/valkey-glide 1.3.4 → 1.3.5-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +36 -14
- package/build-ts/{src/BaseClient.d.ts → BaseClient.d.ts} +62 -118
- package/build-ts/BaseClient.js +6049 -0
- package/build-ts/{src/Transaction.d.ts → Batch.d.ts} +124 -67
- package/build-ts/Batch.js +3457 -0
- package/build-ts/{src/Commands.d.ts → Commands.d.ts} +171 -791
- package/build-ts/Commands.js +2708 -0
- package/build-ts/Errors.js +42 -0
- package/build-ts/{src/GlideClient.d.ts → GlideClient.d.ts} +55 -19
- package/build-ts/GlideClient.js +899 -0
- package/build-ts/{src/GlideClusterClient.d.ts → GlideClusterClient.d.ts} +78 -42
- package/build-ts/GlideClusterClient.js +1251 -0
- package/build-ts/Logger.js +67 -0
- package/build-ts/{src/ProtobufMessage.d.ts → ProtobufMessage.d.ts} +171 -634
- package/build-ts/ProtobufMessage.js +5265 -0
- package/build-ts/index.d.ts +16 -11
- package/build-ts/index.js +53 -216
- package/build-ts/native.d.ts +14 -0
- package/build-ts/native.js +342 -0
- package/build-ts/server-modules/GlideFt.js +628 -0
- package/build-ts/{src/server-modules → server-modules}/GlideFtOptions.d.ts +1 -1
- package/build-ts/server-modules/GlideFtOptions.js +5 -0
- package/build-ts/{src/server-modules → server-modules}/GlideJson.d.ts +65 -65
- package/build-ts/server-modules/GlideJson.js +1572 -0
- package/package.json +141 -64
- /package/build-ts/{src/Errors.d.ts → Errors.d.ts} +0 -0
- /package/build-ts/{src/Logger.d.ts → Logger.d.ts} +0 -0
- /package/build-ts/{src/server-modules → server-modules}/GlideFt.d.ts +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
3
|
*/
|
|
4
4
|
import { BaseClient, DecoderOption, GlideString } from "../BaseClient";
|
|
5
|
+
import { Batch, ClusterBatch } from "../Batch";
|
|
5
6
|
import { ConditionalChange } from "../Commands";
|
|
6
|
-
import { ClusterTransaction, Transaction } from "../Transaction";
|
|
7
7
|
export type ReturnTypeJson<T> = T | (T | null)[];
|
|
8
8
|
export type UniversalReturnTypeJson<T> = T | T[];
|
|
9
9
|
/**
|
|
@@ -829,12 +829,12 @@ export declare class GlideJson {
|
|
|
829
829
|
} & DecoderOption): Promise<ReturnTypeJson<GlideString[]>>;
|
|
830
830
|
}
|
|
831
831
|
/**
|
|
832
|
-
*
|
|
833
|
-
* commands in a single step. See {@link
|
|
832
|
+
* Batch implementation for JSON module. Batches allow the execution of a group of
|
|
833
|
+
* commands in a single step. See {@link Batch} and {@link ClusterBatch}.
|
|
834
834
|
*
|
|
835
835
|
* @example
|
|
836
836
|
* ```typescript
|
|
837
|
-
* const transaction = new
|
|
837
|
+
* const transaction = new Batch(true);
|
|
838
838
|
* JsonBatch.set(transaction, "doc", ".", '{"a": 1.0, "b": 2}');
|
|
839
839
|
* JsonBatch.get(transaction, "doc");
|
|
840
840
|
* const result = await client.exec(transaction);
|
|
@@ -847,7 +847,7 @@ export declare class JsonBatch {
|
|
|
847
847
|
/**
|
|
848
848
|
* Sets the JSON value at the specified `path` stored at `key`.
|
|
849
849
|
*
|
|
850
|
-
* @param
|
|
850
|
+
* @param batch - A batch to add commands to.
|
|
851
851
|
* @param key - The key of the JSON document.
|
|
852
852
|
* @param path - Represents the path within the JSON document where the value will be set.
|
|
853
853
|
* The key will be modified only if `value` is added as the last child in the specified `path`, or if the specified `path` acts as the parent of a new child being added.
|
|
@@ -859,13 +859,13 @@ export declare class JsonBatch {
|
|
|
859
859
|
* Command Response - If the value is successfully set, returns `"OK"`.
|
|
860
860
|
* If `value` isn't set because of `conditionalChange`, returns `null`.
|
|
861
861
|
*/
|
|
862
|
-
static set(
|
|
862
|
+
static set(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, value: GlideString, options?: {
|
|
863
863
|
conditionalChange: ConditionalChange;
|
|
864
|
-
}):
|
|
864
|
+
}): Batch | ClusterBatch;
|
|
865
865
|
/**
|
|
866
866
|
* Retrieves the JSON value at the specified `paths` stored at `key`.
|
|
867
867
|
*
|
|
868
|
-
* @param
|
|
868
|
+
* @param batch - A batch to add commands to.
|
|
869
869
|
* @param key - The key of the JSON document.
|
|
870
870
|
* @param options - (Optional) Additional parameters:
|
|
871
871
|
* - (Optional) Options for formatting the byte representation of the JSON data. See {@link JsonGetOptions}.
|
|
@@ -884,11 +884,11 @@ export declare class JsonBatch {
|
|
|
884
884
|
* Returns a stringified JSON object in bytes, in which each path is a key, and it's corresponding value, is the value as if the path was executed in the command as a single path.
|
|
885
885
|
* In case of multiple paths, and `paths` are a mix of both JSONPath and legacy path, the command behaves as if all are JSONPath paths.
|
|
886
886
|
*/
|
|
887
|
-
static get(
|
|
887
|
+
static get(batch: Batch | ClusterBatch, key: GlideString, options?: JsonGetOptions): Batch | ClusterBatch;
|
|
888
888
|
/**
|
|
889
889
|
* Retrieves the JSON values at the specified `path` stored at multiple `keys`.
|
|
890
890
|
*
|
|
891
|
-
* @remarks When in cluster mode, all keys in the
|
|
891
|
+
* @remarks When in cluster mode, all keys in the batch must be mapped to the same slot.
|
|
892
892
|
*
|
|
893
893
|
* @param client - The client to execute the command.
|
|
894
894
|
* @param keys - The keys of the JSON documents.
|
|
@@ -903,12 +903,12 @@ export declare class JsonBatch {
|
|
|
903
903
|
* the corresponding array element will be `null`.
|
|
904
904
|
* - If a `key` doesn't exist, the corresponding array element will be `null`.
|
|
905
905
|
*/
|
|
906
|
-
static mget(
|
|
906
|
+
static mget(batch: Batch | ClusterBatch, keys: GlideString[], path: GlideString): Batch | ClusterBatch;
|
|
907
907
|
/**
|
|
908
908
|
* Inserts one or more values into the array at the specified `path` within the JSON
|
|
909
909
|
* document stored at `key`, before the given `index`.
|
|
910
910
|
*
|
|
911
|
-
* @param
|
|
911
|
+
* @param batch - A batch to add commands to.
|
|
912
912
|
* @param key - The key of the JSON document.
|
|
913
913
|
* @param path - The path within the JSON document.
|
|
914
914
|
* @param index - The array index before which values are inserted.
|
|
@@ -927,11 +927,11 @@ export declare class JsonBatch {
|
|
|
927
927
|
* exist or the value at `path` is not an array, an error is raised.
|
|
928
928
|
* - If the index is out of bounds or `key` doesn't exist, an error is raised.
|
|
929
929
|
*/
|
|
930
|
-
static arrinsert(
|
|
930
|
+
static arrinsert(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, index: number, values: GlideString[]): Batch | ClusterBatch;
|
|
931
931
|
/**
|
|
932
932
|
* Pops an element from the array located at `path` in the JSON document stored at `key`.
|
|
933
933
|
*
|
|
934
|
-
* @param
|
|
934
|
+
* @param batch - A batch to add commands to.
|
|
935
935
|
* @param key - The key of the JSON document.
|
|
936
936
|
* @param options - (Optional) See {@link JsonArrPopOptions}.
|
|
937
937
|
*
|
|
@@ -947,11 +947,11 @@ export declare class JsonBatch {
|
|
|
947
947
|
* exist or the value at `path` is not an array, an error is raised.
|
|
948
948
|
* - If the index is out of bounds or `key` doesn't exist, an error is raised.
|
|
949
949
|
*/
|
|
950
|
-
static arrpop(
|
|
950
|
+
static arrpop(batch: Batch | ClusterBatch, key: GlideString, options?: JsonArrPopOptions): Batch | ClusterBatch;
|
|
951
951
|
/**
|
|
952
952
|
* Retrieves the length of the array at the specified `path` within the JSON document stored at `key`.
|
|
953
953
|
*
|
|
954
|
-
* @param
|
|
954
|
+
* @param batch - A batch to add commands to.
|
|
955
955
|
* @param key - The key of the JSON document.
|
|
956
956
|
* @param options - (Optional) Additional parameters:
|
|
957
957
|
* - (Optional) `path`: The path within the JSON document. Defaults to the root (`"."`) if not specified.
|
|
@@ -968,16 +968,16 @@ export declare class JsonBatch {
|
|
|
968
968
|
* exist or the value at `path` is not an array, an error is raised.
|
|
969
969
|
* - If the index is out of bounds or `key` doesn't exist, an error is raised.
|
|
970
970
|
*/
|
|
971
|
-
static arrlen(
|
|
971
|
+
static arrlen(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
972
972
|
path: GlideString;
|
|
973
|
-
}):
|
|
973
|
+
}): Batch | ClusterBatch;
|
|
974
974
|
/**
|
|
975
975
|
* Trims an array at the specified `path` within the JSON document stored at `key` so that it becomes a subarray [start, end], both inclusive.
|
|
976
976
|
* If `start` < 0, it is treated as 0.
|
|
977
977
|
* If `end` >= size (size of the array), it is treated as size-1.
|
|
978
978
|
* If `start` >= size or `start` > `end`, the array is emptied and 0 is returned.
|
|
979
979
|
*
|
|
980
|
-
* @param
|
|
980
|
+
* @param batch - A batch to add commands to.
|
|
981
981
|
* @param key - The key of the JSON document.
|
|
982
982
|
* @param path - The path within the JSON document.
|
|
983
983
|
* @param start - The start index, inclusive.
|
|
@@ -997,13 +997,13 @@ export declare class JsonBatch {
|
|
|
997
997
|
* - If `path` doesn't exist, or the value at `path` is not an array, an error is raised.
|
|
998
998
|
* - If an index argument is out of bounds, an error is raised.
|
|
999
999
|
*/
|
|
1000
|
-
static arrtrim(
|
|
1000
|
+
static arrtrim(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, start: number, end: number): Batch | ClusterBatch;
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Searches for the first occurrence of a `scalar` JSON value in the arrays at the `path`.
|
|
1003
1003
|
* Out of range errors are treated by rounding the index to the array's `start` and `end.
|
|
1004
1004
|
* If `start` > `end`, return `-1` (not found).
|
|
1005
1005
|
*
|
|
1006
|
-
* @param
|
|
1006
|
+
* @param batch - A batch to add commands to.
|
|
1007
1007
|
* @param key - The key of the JSON document.
|
|
1008
1008
|
* @param path - The path within the JSON document.
|
|
1009
1009
|
* @param scalar - The scalar value to search for.
|
|
@@ -1020,14 +1020,14 @@ export declare class JsonBatch {
|
|
|
1020
1020
|
* Returns an integer representing the index of matching element, or `-1` if
|
|
1021
1021
|
* not found. If the value at the `path` is not an array, an error is raised.
|
|
1022
1022
|
*/
|
|
1023
|
-
static arrindex(
|
|
1023
|
+
static arrindex(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, scalar: GlideString | number | boolean | null, options?: {
|
|
1024
1024
|
start: number;
|
|
1025
1025
|
end?: number;
|
|
1026
|
-
}):
|
|
1026
|
+
}): Batch | ClusterBatch;
|
|
1027
1027
|
/**
|
|
1028
1028
|
* Toggles a Boolean value stored at the specified `path` within the JSON document stored at `key`.
|
|
1029
1029
|
*
|
|
1030
|
-
* @param
|
|
1030
|
+
* @param batch - A batch to add commands to.
|
|
1031
1031
|
* @param key - The key of the JSON document.
|
|
1032
1032
|
* @param options - (Optional) Additional parameters:
|
|
1033
1033
|
* - (Optional) `path`: The path within the JSON document. Defaults to the root (`"."`) if not specified.
|
|
@@ -1037,40 +1037,40 @@ export declare class JsonBatch {
|
|
|
1037
1037
|
* - For legacy path (`path` doesn't starts with `$`), returns the value of the toggled boolean in `path`.
|
|
1038
1038
|
* - Note that when sending legacy path syntax, If `path` doesn't exist or the value at `path` isn't a boolean, an error is raised.
|
|
1039
1039
|
*/
|
|
1040
|
-
static toggle(
|
|
1040
|
+
static toggle(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1041
1041
|
path: GlideString;
|
|
1042
|
-
}):
|
|
1042
|
+
}): Batch | ClusterBatch;
|
|
1043
1043
|
/**
|
|
1044
1044
|
* Deletes the JSON value at the specified `path` within the JSON document stored at `key`.
|
|
1045
1045
|
*
|
|
1046
|
-
* @param
|
|
1046
|
+
* @param batch - A batch to add commands to.
|
|
1047
1047
|
* @param key - The key of the JSON document.
|
|
1048
1048
|
* @param options - (Optional) Additional parameters:
|
|
1049
1049
|
* - (Optional) `path`: If `null`, deletes the entire JSON document at `key`.
|
|
1050
1050
|
*
|
|
1051
1051
|
* Command Response - The number of elements removed. If `key` or `path` doesn't exist, returns 0.
|
|
1052
1052
|
*/
|
|
1053
|
-
static del(
|
|
1053
|
+
static del(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1054
1054
|
path: GlideString;
|
|
1055
|
-
}):
|
|
1055
|
+
}): Batch | ClusterBatch;
|
|
1056
1056
|
/**
|
|
1057
1057
|
* Deletes the JSON value at the specified `path` within the JSON document stored at `key`. This command is
|
|
1058
1058
|
* an alias of {@link del}.
|
|
1059
1059
|
*
|
|
1060
|
-
* @param
|
|
1060
|
+
* @param batch - A batch to add commands to.
|
|
1061
1061
|
* @param key - The key of the JSON document.
|
|
1062
1062
|
* @param options - (Optional) Additional parameters:
|
|
1063
1063
|
* - (Optional) `path`: If `null`, deletes the entire JSON document at `key`.
|
|
1064
1064
|
*
|
|
1065
1065
|
* Command Response - The number of elements removed. If `key` or `path` doesn't exist, returns 0.
|
|
1066
1066
|
*/
|
|
1067
|
-
static forget(
|
|
1067
|
+
static forget(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1068
1068
|
path: GlideString;
|
|
1069
|
-
}):
|
|
1069
|
+
}): Batch | ClusterBatch;
|
|
1070
1070
|
/**
|
|
1071
1071
|
* Reports the type of values at the given path.
|
|
1072
1072
|
*
|
|
1073
|
-
* @param
|
|
1073
|
+
* @param batch - A batch to add commands to.
|
|
1074
1074
|
* @param key - The key of the JSON document.
|
|
1075
1075
|
* @param options - (Optional) Additional parameters:
|
|
1076
1076
|
* - (Optional) `path`: Defaults to root (`"."`) if not provided.
|
|
@@ -1086,14 +1086,14 @@ export declare class JsonBatch {
|
|
|
1086
1086
|
* - `null` if the document key does not exist.
|
|
1087
1087
|
* - `null` if the JSON path is invalid or does not exist.
|
|
1088
1088
|
*/
|
|
1089
|
-
static type(
|
|
1089
|
+
static type(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1090
1090
|
path: GlideString;
|
|
1091
|
-
}):
|
|
1091
|
+
}): Batch | ClusterBatch;
|
|
1092
1092
|
/**
|
|
1093
1093
|
* Clears arrays or objects at the specified JSON path in the document stored at `key`.
|
|
1094
1094
|
* Numeric values are set to `0`, boolean values are set to `false`, and string values are converted to empty strings.
|
|
1095
1095
|
*
|
|
1096
|
-
* @param
|
|
1096
|
+
* @param batch - A batch to add commands to.
|
|
1097
1097
|
* @param key - The key of the JSON document.
|
|
1098
1098
|
* @param options - (Optional) Additional parameters:
|
|
1099
1099
|
* - (Optional) `path`: The JSON path to the arrays or objects to be cleared. Defaults to root if not provided.
|
|
@@ -1103,9 +1103,9 @@ export declare class JsonBatch {
|
|
|
1103
1103
|
* If `path` doesn't exist, or the value at `path` is already empty (e.g., an empty array, object, or string), `0` is returned.
|
|
1104
1104
|
* If `key doesn't exist, an error is raised.
|
|
1105
1105
|
*/
|
|
1106
|
-
static clear(
|
|
1106
|
+
static clear(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1107
1107
|
path: GlideString;
|
|
1108
|
-
}):
|
|
1108
|
+
}): Batch | ClusterBatch;
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Retrieve the JSON value at the specified `path` within the JSON document stored at `key`.
|
|
1111
1111
|
* The returning result is in the Valkey or Redis OSS Serialization Protocol (RESP).
|
|
@@ -1117,7 +1117,7 @@ export declare class JsonBatch {
|
|
|
1117
1117
|
* - JSON arrays are represented as RESP arrays, where the first element is the simple string [, followed by the array's elements.
|
|
1118
1118
|
* - JSON objects are represented as RESP object, where the first element is the simple string {, followed by key-value pairs, each of which is a RESP bulk string.
|
|
1119
1119
|
*
|
|
1120
|
-
* @param
|
|
1120
|
+
* @param batch - A batch to add commands to.
|
|
1121
1121
|
* @param key - The key of the JSON document.
|
|
1122
1122
|
* @param options - (Optional) Additional parameters:
|
|
1123
1123
|
* - (Optional) `path`: The path within the JSON document, defaults to root (`"."`) if not provided.
|
|
@@ -1131,14 +1131,14 @@ export declare class JsonBatch {
|
|
|
1131
1131
|
* If multiple paths match, the value of the first JSON value match is returned. If `path` doesn't exist, an error is raised.
|
|
1132
1132
|
* - If `key` doesn't exist, `null` is returned.
|
|
1133
1133
|
*/
|
|
1134
|
-
static resp(
|
|
1134
|
+
static resp(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1135
1135
|
path: GlideString;
|
|
1136
|
-
}):
|
|
1136
|
+
}): Batch | ClusterBatch;
|
|
1137
1137
|
/**
|
|
1138
1138
|
* Returns the length of the JSON string value stored at the specified `path` within
|
|
1139
1139
|
* the JSON document stored at `key`.
|
|
1140
1140
|
*
|
|
1141
|
-
* @param
|
|
1141
|
+
* @param batch - A batch to add commands to.
|
|
1142
1142
|
* @param key - The key of the JSON document.
|
|
1143
1143
|
* @param options - (Optional) Additional parameters:
|
|
1144
1144
|
* - (Optional) `path`: The path within the JSON document, Defaults to root (`"."`) if not provided.
|
|
@@ -1154,13 +1154,13 @@ export declare class JsonBatch {
|
|
|
1154
1154
|
* - If the JSON value at`path` is not a string or if `path` doesn't exist, an error is raised.
|
|
1155
1155
|
* - If `key` doesn't exist, `null` is returned.
|
|
1156
1156
|
*/
|
|
1157
|
-
static strlen(
|
|
1157
|
+
static strlen(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1158
1158
|
path: GlideString;
|
|
1159
|
-
}):
|
|
1159
|
+
}): Batch | ClusterBatch;
|
|
1160
1160
|
/**
|
|
1161
1161
|
* Appends the specified `value` to the string stored at the specified `path` within the JSON document stored at `key`.
|
|
1162
1162
|
*
|
|
1163
|
-
* @param
|
|
1163
|
+
* @param batch - A batch to add commands to.
|
|
1164
1164
|
* @param key - The key of the JSON document.
|
|
1165
1165
|
* @param value - The value to append to the string. Must be wrapped with single quotes. For example, to append "foo", pass '"foo"'.
|
|
1166
1166
|
* @param options - (Optional) Additional parameters:
|
|
@@ -1177,14 +1177,14 @@ export declare class JsonBatch {
|
|
|
1177
1177
|
* - If the JSON value at `path` is not a string of if `path` doesn't exist, an error is raised.
|
|
1178
1178
|
* - If `key` doesn't exist, an error is raised.
|
|
1179
1179
|
*/
|
|
1180
|
-
static strappend(
|
|
1180
|
+
static strappend(batch: Batch | ClusterBatch, key: GlideString, value: GlideString, options?: {
|
|
1181
1181
|
path: GlideString;
|
|
1182
|
-
}):
|
|
1182
|
+
}): Batch | ClusterBatch;
|
|
1183
1183
|
/**
|
|
1184
1184
|
* Appends one or more `values` to the JSON array at the specified `path` within the JSON
|
|
1185
1185
|
* document stored at `key`.
|
|
1186
1186
|
*
|
|
1187
|
-
* @param
|
|
1187
|
+
* @param batch - A batch to add commands to.
|
|
1188
1188
|
* @param key - The key of the JSON document.
|
|
1189
1189
|
* @param path - The path within the JSON document.
|
|
1190
1190
|
* @param values - The JSON values to be appended to the array.
|
|
@@ -1202,11 +1202,11 @@ export declare class JsonBatch {
|
|
|
1202
1202
|
* exist or the value at `path` is not an array, an error is raised.
|
|
1203
1203
|
* - If the index is out of bounds or `key` doesn't exist, an error is raised.
|
|
1204
1204
|
*/
|
|
1205
|
-
static arrappend(
|
|
1205
|
+
static arrappend(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, values: GlideString[]): Batch | ClusterBatch;
|
|
1206
1206
|
/**
|
|
1207
1207
|
* Reports memory usage in bytes of a JSON object at the specified `path` within the JSON document stored at `key`.
|
|
1208
1208
|
*
|
|
1209
|
-
* @param
|
|
1209
|
+
* @param batch - A batch to add commands to.
|
|
1210
1210
|
* @param key - The key of the JSON document.
|
|
1211
1211
|
* @param value - The value to append to the string. Must be wrapped with single quotes. For example, to append "foo", pass '"foo"'.
|
|
1212
1212
|
* @param options - (Optional) Additional parameters:
|
|
@@ -1221,13 +1221,13 @@ export declare class JsonBatch {
|
|
|
1221
1221
|
* returns the data of the first matching object. If `path` doesn't exist, an error is raised.
|
|
1222
1222
|
* - If `key` doesn't exist, returns `null`.
|
|
1223
1223
|
*/
|
|
1224
|
-
static debugMemory(
|
|
1224
|
+
static debugMemory(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1225
1225
|
path: GlideString;
|
|
1226
|
-
}):
|
|
1226
|
+
}): Batch | ClusterBatch;
|
|
1227
1227
|
/**
|
|
1228
1228
|
* Reports the number of fields at the specified `path` within the JSON document stored at `key`.
|
|
1229
1229
|
*
|
|
1230
|
-
* @param
|
|
1230
|
+
* @param batch - A batch to add commands to.
|
|
1231
1231
|
* @param key - The key of the JSON document.
|
|
1232
1232
|
* @param value - The value to append to the string. Must be wrapped with single quotes. For example, to append "foo", pass '"foo"'.
|
|
1233
1233
|
* @param options - (Optional) Additional parameters:
|
|
@@ -1242,13 +1242,13 @@ export declare class JsonBatch {
|
|
|
1242
1242
|
* returns the data of the first matching object. If `path` doesn't exist, an error is raised.
|
|
1243
1243
|
* - If `key` doesn't exist, returns `null`.
|
|
1244
1244
|
*/
|
|
1245
|
-
static debugFields(
|
|
1245
|
+
static debugFields(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1246
1246
|
path: GlideString;
|
|
1247
|
-
}):
|
|
1247
|
+
}): Batch | ClusterBatch;
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Increments or decrements the JSON value(s) at the specified `path` by `number` within the JSON document stored at `key`.
|
|
1250
1250
|
*
|
|
1251
|
-
* @param
|
|
1251
|
+
* @param batch - A batch to add commands to.
|
|
1252
1252
|
* @param key - The key of the JSON document.
|
|
1253
1253
|
* @param path - The path within the JSON document.
|
|
1254
1254
|
* @param num - The number to increment or decrement by.
|
|
@@ -1265,11 +1265,11 @@ export declare class JsonBatch {
|
|
|
1265
1265
|
* - If `key` does not exist, an error is raised.
|
|
1266
1266
|
* - If the result is out of the range of 64-bit IEEE double, an error is raised.
|
|
1267
1267
|
*/
|
|
1268
|
-
static numincrby(
|
|
1268
|
+
static numincrby(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, num: number): Batch | ClusterBatch;
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Multiplies the JSON value(s) at the specified `path` by `number` within the JSON document stored at `key`.
|
|
1271
1271
|
*
|
|
1272
|
-
* @param
|
|
1272
|
+
* @param batch - A batch to add commands to.
|
|
1273
1273
|
* @param key - The key of the JSON document.
|
|
1274
1274
|
* @param path - The path within the JSON document.
|
|
1275
1275
|
* @param num - The number to multiply by.
|
|
@@ -1286,11 +1286,11 @@ export declare class JsonBatch {
|
|
|
1286
1286
|
* - If `key` does not exist, an error is raised.
|
|
1287
1287
|
* - If the result is out of the range of 64-bit IEEE double, an error is raised.
|
|
1288
1288
|
*/
|
|
1289
|
-
static nummultby(
|
|
1289
|
+
static nummultby(batch: Batch | ClusterBatch, key: GlideString, path: GlideString, num: number): Batch | ClusterBatch;
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Retrieves the number of key-value pairs in the object stored at the specified `path` within the JSON document stored at `key`.
|
|
1292
1292
|
*
|
|
1293
|
-
* @param
|
|
1293
|
+
* @param batch - A batch to add commands to.
|
|
1294
1294
|
* @param key - The key of the JSON document.
|
|
1295
1295
|
* @param options - (Optional) Additional parameters:
|
|
1296
1296
|
* - (Optional) `path`: The path within the JSON document, Defaults to root (`"."`) if not provided.
|
|
@@ -1306,13 +1306,13 @@ export declare class JsonBatch {
|
|
|
1306
1306
|
* - If the JSON value at `path` is not an object or if `path` doesn't exist, an error is raised.
|
|
1307
1307
|
* - If `key` doesn't exist, `null` is returned.
|
|
1308
1308
|
*/
|
|
1309
|
-
static objlen(
|
|
1309
|
+
static objlen(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1310
1310
|
path: GlideString;
|
|
1311
|
-
}):
|
|
1311
|
+
}): Batch | ClusterBatch;
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Retrieves key names in the object values at the specified `path` within the JSON document stored at `key`.
|
|
1314
1314
|
*
|
|
1315
|
-
* @param
|
|
1315
|
+
* @param batch - A batch to add commands to.
|
|
1316
1316
|
* @param key - The key of the JSON document.
|
|
1317
1317
|
* @param options - (Optional) Additional parameters:
|
|
1318
1318
|
* - (Optional) `path`: The path within the JSON document where the key names will be retrieved. Defaults to root (`"."`) if not provided.
|
|
@@ -1329,7 +1329,7 @@ export declare class JsonBatch {
|
|
|
1329
1329
|
* - If `path` doesn't exist, `null` is returned.
|
|
1330
1330
|
* - If `key` doesn't exist, `null` is returned.
|
|
1331
1331
|
*/
|
|
1332
|
-
static objkeys(
|
|
1332
|
+
static objkeys(batch: Batch | ClusterBatch, key: GlideString, options?: {
|
|
1333
1333
|
path: GlideString;
|
|
1334
|
-
}):
|
|
1334
|
+
}): Batch | ClusterBatch;
|
|
1335
1335
|
}
|