update method

Future update(
  1. String thing,
  2. Map<String, dynamic> data
)

Updates all records in a table, or a specific record.

Implementation

Future<dynamic> update(String thing, Map<String, dynamic> data) {
  final id = _generateId();
  final completer = Completer();
  wait().then((_) {
    once(id, (res) => _output(res, 'update', thing, completer));
    _send(id, 'update', [thing, data]);
  });
  return completer.future;
}