@@ -105,13 +105,13 @@ def setDecoder(self, decoder):
105
105
self ._decoder = decoder
106
106
self ._decode = self ._decoder .decode
107
107
108
- def JSONDel (self , name , path = Path .rootPath ()):
108
+ def jsondel (self , name , path = Path .rootPath ()):
109
109
"""
110
110
Deletes the JSON value stored at key ``name`` under ``path``
111
111
"""
112
112
return self .execute_command ('JSON.DEL' , name , str_path (path ))
113
113
114
- def JSONGet (self , name , * args ):
114
+ def jsonget (self , name , * args ):
115
115
"""
116
116
Get the object stored as a JSON value at key ``name``
117
117
``args`` is zero or more paths, and defaults to root path
@@ -124,7 +124,7 @@ def JSONGet(self, name, *args):
124
124
pieces .append (str_path (p ))
125
125
return self .execute_command ('JSON.GET' , * pieces )
126
126
127
- def JSONMGet (self , path , * args ):
127
+ def jsonmget (self , path , * args ):
128
128
"""
129
129
Gets the objects stored as a JSON values under ``path`` from
130
130
keys ``args``
@@ -134,7 +134,7 @@ def JSONMGet(self, path, *args):
134
134
pieces .append (str_path (path ))
135
135
return self .execute_command ('JSON.MGET' , * pieces )
136
136
137
- def JSONSet (self , name , path , obj , nx = False , xx = False ):
137
+ def jsonset (self , name , path , obj , nx = False , xx = False ):
138
138
"""
139
139
Set the JSON value at key ``name`` under the ``path`` to ``obj``
140
140
``nx`` if set to True, set ``value`` only if it does not exist
@@ -152,41 +152,41 @@ def JSONSet(self, name, path, obj, nx=False, xx=False):
152
152
pieces .append ('XX' )
153
153
return self .execute_command ('JSON.SET' , * pieces )
154
154
155
- def JSONType (self , name , path = Path .rootPath ()):
155
+ def jsontype (self , name , path = Path .rootPath ()):
156
156
"""
157
157
Gets the type of the JSON value under ``path`` from key ``name``
158
158
"""
159
159
return self .execute_command ('JSON.TYPE' , name , str_path (path ))
160
160
161
- def JSONNumIncrBy (self , name , path , number ):
161
+ def jsonnumincrby (self , name , path , number ):
162
162
"""
163
163
Increments the numeric (integer or floating point) JSON value under
164
164
``path`` at key ``name`` by the provided ``number``
165
165
"""
166
166
return self .execute_command ('JSON.NUMINCRBY' , name , str_path (path ), self ._encode (number ))
167
167
168
- def JSONNumMultBy (self , name , path , number ):
168
+ def jsonnummultby (self , name , path , number ):
169
169
"""
170
170
Multiplies the numeric (integer or floating point) JSON value under
171
171
``path`` at key ``name`` with the provided ``number``
172
172
"""
173
173
return self .execute_command ('JSON.NUMMULTBY' , name , str_path (path ), self ._encode (number ))
174
174
175
- def JSONStrAppend (self , name , string , path = Path .rootPath ()):
175
+ def jsonstrappend (self , name , string , path = Path .rootPath ()):
176
176
"""
177
177
Appends to the string JSON value under ``path`` at key ``name`` the
178
178
provided ``string``
179
179
"""
180
180
return self .execute_command ('JSON.STRAPPEND' , name , str_path (path ), self ._encode (string ))
181
181
182
- def JSONStrLen (self , name , path = Path .rootPath ()):
182
+ def jsonstrlen (self , name , path = Path .rootPath ()):
183
183
"""
184
184
Returns the length of the string JSON value under ``path`` at key
185
185
``name``
186
186
"""
187
187
return self .execute_command ('JSON.STRLEN' , name , str_path (path ))
188
188
189
- def JSONArrAppend (self , name , path = Path .rootPath (), * args ):
189
+ def jsonarrappend (self , name , path = Path .rootPath (), * args ):
190
190
"""
191
191
Appends the objects ``args`` to the array under the ``path` in key
192
192
``name``
@@ -196,15 +196,15 @@ def JSONArrAppend(self, name, path=Path.rootPath(), *args):
196
196
pieces .append (self ._encode (o ))
197
197
return self .execute_command ('JSON.ARRAPPEND' , * pieces )
198
198
199
- def JSONArrIndex (self , name , path , scalar , start = 0 , stop = - 1 ):
199
+ def jsonarrindex (self , name , path , scalar , start = 0 , stop = - 1 ):
200
200
"""
201
201
Returns the index of ``scalar`` in the JSON array under ``path`` at key
202
202
``name``. The search can be limited using the optional inclusive
203
203
``start`` and exclusive ``stop`` indices.
204
204
"""
205
205
return self .execute_command ('JSON.ARRINDEX' , name , str_path (path ), self ._encode (scalar ), start , stop )
206
206
207
- def JSONArrInsert (self , name , path , index , * args ):
207
+ def jsonarrinsert (self , name , path , index , * args ):
208
208
"""
209
209
Inserts the objects ``args`` to the array at index ``index`` under the
210
210
``path` in key ``name``
@@ -214,35 +214,35 @@ def JSONArrInsert(self, name, path, index, *args):
214
214
pieces .append (self ._encode (o ))
215
215
return self .execute_command ('JSON.ARRINSERT' , * pieces )
216
216
217
- def JSONArrLen (self , name , path = Path .rootPath ()):
217
+ def jsonarrlen (self , name , path = Path .rootPath ()):
218
218
"""
219
219
Returns the length of the array JSON value under ``path`` at key
220
220
``name``
221
221
"""
222
222
return self .execute_command ('JSON.ARRLEN' , name , str_path (path ))
223
223
224
- def JSONArrPop (self , name , path = Path .rootPath (), index = - 1 ):
224
+ def jsonarrpop (self , name , path = Path .rootPath (), index = - 1 ):
225
225
"""
226
226
Pops the element at ``index`` in the array JSON value under ``path`` at
227
227
key ``name``
228
228
"""
229
229
return self .execute_command ('JSON.ARRPOP' , name , str_path (path ), index )
230
230
231
- def JSONArrTrim (self , name , path , start , stop ):
231
+ def jsonarrtrim (self , name , path , start , stop ):
232
232
"""
233
233
Trim the array JSON value under ``path`` at key ``name`` to the
234
234
inclusive range given by ``start`` and ``stop``
235
235
"""
236
236
return self .execute_command ('JSON.ARRTRIM' , name , str_path (path ), start , stop )
237
237
238
- def JSONObjKeys (self , name , path = Path .rootPath ()):
238
+ def jsonobjkeys (self , name , path = Path .rootPath ()):
239
239
"""
240
240
Returns the key names in the dictionary JSON value under ``path`` at key
241
241
``name``
242
242
"""
243
243
return self .execute_command ('JSON.OBJKEYS' , name , str_path (path ))
244
244
245
- def JSONObjLen (self , name , path = Path .rootPath ()):
245
+ def jsonobjlen (self , name , path = Path .rootPath ()):
246
246
"""
247
247
Returns the length of the dictionary JSON value under ``path`` at key
248
248
``name``
0 commit comments