getPendingIds method

  1. @override
Future<Set<String>> getPendingIds(
  1. String table
)
override

Get a set of record IDs that have pending sync entries for a specific table. Useful for batching checks during pulls to avoid N+1 query bottlenecks.

Implementation

@override
Future<Set<String>> getPendingIds(String table) async {
  final rows = await _db.customSelect(
    'SELECT record_id FROM dynos_sync_queue WHERE table_name = ? AND synced_at IS NULL',
    variables: [Variable.withString(table)],
  ).get();
  return rows.map((r) => r.read<String>('record_id')).toSet();
}