@@ -49,14 +49,18 @@ print(jb.read(MY_BOX_ID, limit=1))
4949print (jb.read(MY_BOX_ID , skip = 1 ))
5050
5151# update data
52- data = {" name" : " Bob" , " age" : " 25 " }
52+ data = {" name" : " Bob" , " age" : 23 }
5353jb.update(data, MY_BOX_ID , record_ids[0 ])
5454
5555# read updated data
56+ print (jb.read(MY_BOX_ID ))
5657print (jb.read(MY_BOX_ID , record_ids[0 ]))
5758
59+ # delete records matching to query
60+ print (jb.delete(MY_BOX_ID , query = " age:=23" ))
61+ 5862# delete records
59- jb.delete(MY_BOX_ID , record_ids)
63+ jb.delete(MY_BOX_ID , record_ids[ 1 ] )
6064```
6165
6266## Query Params
@@ -92,6 +96,11 @@ You can combine multiple fields by separating them with commas as shown below:
9296name:arya%20stark,age:>13,isalive:true
9397```
9498
99+ #### Deleting records
100+ There are two ways to delete records (see examples above for both)
101+ * Provide the ` record_id `
102+ * Provide a ` query ` parameter, with the same syntax used for filtering on read
103+ 95104## Use your own instance of jsonbox
96105```
97106jb = JsonBox(service_host="https://my-jsonbox-server.com")
0 commit comments