position method

Future<int?> position()

The last sequence this consumer has delivered, or null when it has never delivered anything: a destination with no position yet, which has none of the history and needs a backfill.

Implementation

Future<int?> position() async {
  await capture._ensureReady();
  final List<Map<String, Object?>> rows = await _records.find(
    DVCapture.checkpointTable,
    where: _mine,
    fields: const <String>['change_seq'],
  );
  return rows.isEmpty ? null : _asInt(rows.first['change_seq']);
}