garbageCollectOplog method

  1. @visibleForTesting
Future<void> garbageCollectOplog(
  1. DateTime commitTimestamp
)

Implementation

@visibleForTesting
Future<void> garbageCollectOplog(DateTime commitTimestamp) async {
  final isoString = commitTimestamp.toISOStringUTC();
  final String oplog = '${opts.oplogTable}';
  String pos(int i) => builder.makePositionalParam(i);

  await adapter.run(
    Statement(
      'DELETE FROM $oplog WHERE timestamp = ${pos(1)}',
      <Object?>[isoString],
    ),
  );
}