Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Upstream changes
Browse files Browse the repository at this point in the history
af6a7be7 - chore (drivers): extract drivers to a separate package (#1332)
2024-06-26 13:07:47 +0000 - Kevin
electric-sql/electric@af6a7be7
  • Loading branch information
davidmartos96 committed Jun 28, 2024
1 parent d271d60 commit ed17bd7
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 29 deletions.
1 change: 1 addition & 0 deletions packages/electricsql/lib/drivers/drivers.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export '../src/drivers/adapter.dart';
1 change: 1 addition & 0 deletions packages/electricsql/lib/src/client/model/client.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/src/client/model/sync.dart';
import 'package:electricsql/src/client/model/transform.dart' as transform_lib;
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/devtools/api/statements.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/migrators.dart';
import 'package:electricsql/src/devtools/shared.dart';
import 'package:electricsql/util.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:electricsql/src/util/types.dart';
// commit message: feat (client): flag to disable FKs on incoming TXs in SQLite
// https://github.com/electric-sql/electric/commit/f4f020d97916dd975661ea56ac2e08df3a70fab1

/// A `DatabaseAdapter` adapts a database client to provide the
/// normalised interface defined here.
abstract class DatabaseAdapter {
//db: AnyDatabase

Expand Down
1 change: 1 addition & 0 deletions packages/electricsql/lib/src/drivers/drift/drift.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:drift/drift.dart' hide Migrator;
import 'package:electricsql/drivers/drift.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/migrators.dart';
import 'package:electricsql/src/client/model/client.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'dart:async';

import 'package:drift/drift.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/migrators.dart';
import 'package:electricsql/src/client/conversions/postgres/mapping.dart'
as pg_mapping;
import 'package:electricsql/src/drivers/drift/drift.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/util/debug/debug.dart';
import 'package:electricsql/src/util/types.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/query_builder/builder.dart';
import 'package:electricsql/src/util/types.dart';
import 'package:sqlite3/sqlite3.dart' as sqlite;
Expand Down
1 change: 1 addition & 0 deletions packages/electricsql/lib/src/electric/electric.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/migrators.dart';
import 'package:electricsql/notifiers.dart';
Expand Down
1 change: 0 additions & 1 deletion packages/electricsql/lib/src/electric/index.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'adapter.dart';
export 'electric.dart'
show ElectrifyBaseOptions, ElectrifyOptions, electrifyBase;
export 'namespace.dart' show ElectricNamespace;
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/electric/mock.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/migrators.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/util/types.dart';

class MockDatabaseAdapter implements DatabaseAdapter {
Expand Down
1 change: 1 addition & 0 deletions packages/electricsql/lib/src/electric/namespace.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/satellite.dart';
import 'package:electricsql/src/devtools/devtools.dart' as devtools;
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/migrators/bundle.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/migrators/schema.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/satellite/mock.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'dart:async';
import 'dart:convert';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/auth/auth.dart';
import 'package:electricsql/src/client/model/schema.dart' hide Relation;
import 'package:electricsql/src/client/model/shapes.dart';
import 'package:electricsql/src/config/config.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/notifiers/notifiers.dart';
import 'package:electricsql/src/proto/satellite.pb.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/satellite/process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import 'dart:async';
import 'dart:convert';

import 'package:collection/collection.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/auth/auth.dart';
import 'package:electricsql/src/auth/secure.dart';
import 'package:electricsql/src/client/model/shapes.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/migrators/triggers.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/satellite/registry.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/client/model/schema.dart';
import 'package:electricsql/src/config/config.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/notifiers/notifiers.dart';
import 'package:electricsql/src/satellite/client.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/satellite/satellite.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/auth/auth.dart';
import 'package:electricsql/src/client/model/schema.dart';
import 'package:electricsql/src/client/model/shapes.dart';
import 'package:electricsql/src/config/config.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/notifiers/notifiers.dart';
import 'package:electricsql/src/satellite/shapes/types.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/lib/src/util/relations.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/proto/satellite.pb.dart';
import 'package:electricsql/src/satellite/config.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/drivers/common.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/util/types.dart';
import 'package:meta/meta.dart';
import 'package:sqlite3/sqlite3.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/drivers/drift_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:drift/backends.dart';
import 'package:drift/drift.dart';
import 'package:drift/native.dart';
import 'package:electricsql/drivers/drift.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/util/types.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/drivers/sqlite3_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/drivers/sqlite3/sqlite3_adapter.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/util/types.dart';
import 'package:sqlite3/sqlite3.dart';
import 'package:test/test.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/migrators/bundle.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/bundle.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:meta/meta.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library;

import 'package:electricsql/drivers/drift.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/bundle.dart';
import 'package:electricsql/src/util/random.dart';
import 'package:test/test.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library;

import 'package:electricsql/drivers/drift.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/bundle.dart';
import 'package:electricsql/src/satellite/config.dart';
import 'package:electricsql/src/util/random.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@Tags(['postgres'])
library;

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/drivers/drift/drift_adapter.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/migrators/triggers.dart';
import 'package:electricsql/src/satellite/config.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/drivers/sqlite3/sqlite3_adapter.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/bundle.dart';
import 'package:electricsql/src/util/random.dart';
import 'package:sqlite3/sqlite3.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/drivers/sqlite3/sqlite3_adapter.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/bundle.dart';
import 'package:electricsql/src/satellite/config.dart';
import 'package:electricsql/src/util/random.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/drivers/sqlite3.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/migrators/triggers.dart';
import 'package:electricsql/src/satellite/config.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/migrators/triggers.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/migrators/triggers.dart';
import 'package:electricsql/src/satellite/config.dart';
Expand Down
1 change: 1 addition & 0 deletions packages/electricsql/test/satellite/common.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:io';

import 'package:drift/drift.dart' show DatabaseConnectionUser;
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart' hide Relation;
import 'package:electricsql/migrators.dart';
import 'package:electricsql/satellite.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/merge_test.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'dart:convert';
import 'dart:typed_data';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/drivers/sqlite3.dart';
import 'package:electricsql/src/drivers/drift/drift_adapter.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/satellite/config.dart';
import 'package:electricsql/src/satellite/merge.dart';
Expand Down
1 change: 1 addition & 0 deletions packages/electricsql/test/satellite/process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:typed_data';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/electricsql.dart';
import 'package:electricsql/src/client/model/shapes.dart';
import 'package:electricsql/src/migrators/migrators.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/process_migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:async';
import 'dart:convert';

import 'package:collection/collection.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/notifiers/mock.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/process_tags.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'dart:convert';

import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/auth/auth.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/notifiers/mock.dart';
import 'package:electricsql/src/satellite/mock.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/process_timing.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ignore_for_file: unreachable_from_main

import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/notifiers/mock.dart';
import 'package:electricsql/src/satellite/config.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/registry_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/client/model/schema.dart';
import 'package:electricsql/src/config/config.dart';
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/electric/mock.dart';
import 'package:electricsql/src/migrators/migrators.dart';
import 'package:electricsql/src/migrators/mock.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/satellite/serialization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import 'dart:convert';
import 'dart:typed_data';

import 'package:collection/collection.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/client/conversions/types.dart';
import 'package:electricsql/src/client/model/schema.dart' hide Relation;
import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/proto/satellite.pb.dart';
import 'package:electricsql/src/satellite/client.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/electricsql/test/support/satellite_helpers.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';

import 'package:electricsql/src/electric/adapter.dart';
import 'package:electricsql/drivers/drivers.dart';
import 'package:electricsql/src/migrators/query_builder/query_builder.dart';
import 'package:electricsql/src/satellite/oplog.dart';
import 'package:electricsql/src/util/converters/helpers.dart';
Expand Down

0 comments on commit ed17bd7

Please sign in to comment.