aea.helpers.storage.backends.sqlite
This module contains sqlite storage backend implementation.
SqliteStorageBackend Objects
Sqlite storage backend.
__
init__
Init backend.
connect
Connect to backend.
disconnect
Disconnect the backend.
ensure_
collection
Create collection if not exits.
Arguments:
collection_name
: name of the collection.
put
Put object into collection.
Arguments:
collection_name
: str.object_id
: str object idobject_body
: python dict, json compatible.
get
Get object from the collection.
Arguments:
collection_name
: str.object_id
: str object id
Returns:
dict if object exists in collection otherwise None
remove
Remove object from the collection.
Arguments:
collection_name
: str.object_id
: str object id
find
Get objects from the collection by filtering by field value.
Arguments:
collection_name
: str.field
: field name to search: example "parent.field"equals
: value field should be equal to
Returns:
list of object ids and body
list
List all objects with keys from the collection.
Arguments:
collection_name
: str.
Returns:
Tuple of objects keys, bodies.