get method

Future<JBDOC> get(
  1. String collection,
  2. int id
)

Get json body of document identified by id and stored in collection. Throws EJDB2Error not found exception if document is not found.

Implementation

Future<JBDOC> get(String collection, int id) => _mc
    .invokeMethod('get', [_handle, collection, id])
    .catchError(_errorHandler<JBDOC>())
    .then((v) => JBDOC(id, v as String));