EJDB2 class

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

close() Future<void>
Closes database instance.
createQuery(String query, [String collection]) JQL
Create instance of query specified for collection. If collection is not specified a query spec must contain collection name, eg: @mycollection/[foo=bar]
del(String collection, int id) Future<void>
Remove document identified by id from specified collection.
delIgnoreNotFound(String collection, int id) Future<void>
Remove document identified by id from specified collection. Doesn't raise error if document is not found.
ensureFloatIndex(String coll, String path, [bool unique]) Future<void>
ensureIntIndex(String coll, String path, [bool unique]) Future<void>
ensureStringIndex(String coll, String path, [bool unique]) Future<void>
get(String collection, int id) Future<JBDOC>
Get json body of document identified by id and stored in collection. Throws EJDB2Error not found exception if document is not found.
getOptional(String collection, int id) Future<Optional<JBDOC>>
Get json body of document identified by id and stored in collection.
info() Future
Get json body of database metadata.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onlineBackup(String fileName) Future<int>
Creates an online database backup image and copies it into the specified fileName. During online backup phase read/write database operations are allowed and not blocked for significant amount of time. Returns future with backup finish time as number of milliseconds since epoch.
patch(String collection, dynamic json, int id, [bool upsert = false]) Future<void>
Apply rfc6902/rfc6901 JSON patch to the document identified by id.
patchOrPut(String collection, dynamic json, int id) Future<void>
Apply JSON merge patch (rfc7396) to the document identified by id or insert new document under specified id.
put(String collection, dynamic json, [int id]) Future<int>
Save json document under specified id or create a new document with new generated id. Returns future holding actual document id.
removeCollection(String collection) Future<void>
Removes database collection.
removeFloatIndex(String coll, String path, [bool unique]) Future<void>
removeIntIndex(String coll, String path, [bool unique]) Future<void>
removeStringIndex(String coll, String path, [bool unique]) Future<void>
renameCollection(String oldName, String newName) Future<void>
Renames database collection.
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited
operator [](String query) JQL
Create instance of query.