PysonDB-V2
Quick walk through of all the methods
{
"version": 2,
"keys": [],
"data": {}
}
add
231541323453553701
{
"version": 2,
"keys": [
"age",
"knows_python",
"name"
],
"data": {
"231541323453553701": {
"name": "adwaith",
"age": 4,
"knows_python": true
}
}
}
add_many
None
{'330993934764646664': {'name': 'mathew', 'age': 22, 'knows_python': False}, '131457970736078364': {'name': 'abi', 'age': 19, 'knows_python': True}}
{
"version": 2,
"keys": [
"age",
"knows_python",
"name"
],
"data": {
"231541323453553701": {
"name": "adwaith",
"age": 4,
"knows_python": true
},
"263597723557497291": {
"name": "fredy",
"age": 19,
"knows_python": true
},
"299482429835276227": {
"name": "kenny",
"age": 19,
"knows_python": false
},
"330993934764646664": {
"name": "mathew",
"age": 22,
"knows_python": false
},
"131457970736078364": {
"name": "abi",
"age": 19,
"knows_python": true
}
}
}
get_by_id
{'name': 'fredy', 'age': 19, 'knows_python': True}
get_by_query
{'231541323453553701': {'name': 'adwaith', 'age': 4, 'knows_python': True}, '330993934764646664': {'name': 'mathew', 'age': 22, 'knows_python': False}}
get_all
{
"231541323453553701":{
"name":"adwaith",
"age":4,
"knows_python":true
},
"263597723557497291":{
"name":"fredy",
"age":19,
"knows_python":true
},
"299482429835276227":{
"name":"kenny",
"age":19,
"knows_python":false
},
"330993934764646664":{
"name":"mathew",
"age":22,
"knows_python":false
},
"131457970736078364":{
"name":"abi",
"age":19,
"knows_python":true
}
}
update_by_id
{'name': 'adwaith', 'age': 18, 'knows_python': True}
update_by_query
['131457970736078364']
{
"version": 2,
"keys": [
"age",
"knows_python",
"name"
],
"data": {
"231541323453553701": {
"name": "adwaith",
"age": 18,
"knows_python": true
},
"263597723557497291": {
"name": "fredy",
"age": 19,
"knows_python": true
},
"299482429835276227": {
"name": "kenny",
"age": 19,
"knows_python": false
},
"330993934764646664": {
"name": "mathew",
"age": 22,
"knows_python": false
},
"131457970736078364": {
"name": "abi",
"age": 19,
"knows_python": false
}
}
}
delete_by_id
{
"version": 2,
"keys": [
"age",
"knows_python",
"name"
],
"data": {
"231541323453553701": {
"name": "adwaith",
"age": 18,
"knows_python": true
},
"263597723557497291": {
"name": "fredy",
"age": 19,
"knows_python": true
},
"299482429835276227": {
"name": "kenny",
"age": 19,
"knows_python": false
},
"330993934764646664": {
"name": "mathew",
"age": 22,
"knows_python": false
}
}
}
delete_by_query
['299482429835276227', '330993934764646664']
{
"version": 2,
"keys": [
"age",
"knows_python",
"name"
],
"data": {
"231541323453553701": {
"name": "adwaith",
"age": 18,
"knows_python": true
},
"263597723557497291": {
"name": "fredy",
"age": 19,
"knows_python": true
}
}
}
purge
{
"version": 2,
"keys": [],
"data": {}
}
For more docs click here