syncTable<T extends Table> method

  1. @override
Future<ShapeSubscription> syncTable<T extends Table>(
  1. T table, {
  2. SyncIncludeBuilder<T>? include,
  3. SyncWhereBuilder<T>? where,
  4. String? key,
})
override

Creates a Shape subscription. A shape is a set of related data that's synced onto the local device. https://electric-sql.com/docs/usage/data-access/shapes

Implementation

@override
Future<ShapeSubscription> syncTable<T extends Table>(
  T table, {
  SyncIncludeBuilder<T>? include,
  SyncWhereBuilder<T>? where,
  String? key,
}) {
  final shape = computeShapeForDrift<T>(
    db,
    table,
    include: include,
    where: where,
  );

  // print("SHAPE ${shape.toMap()}");

  return _baseClient.syncShapeInternal(shape, key);
}