Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ abstract class IsolateConnectionFactory<Database extends sqlite.CommonDatabase>
SerializedPortClient get upstreamPort;

factory IsolateConnectionFactory(
{required openFactory,
required mutex,
{required dynamic /* platform-specific type */ openFactory,
required dynamic /* platform-specific type */ mutex,
required SerializedPortClient upstreamPort}) {
return IsolateConnectionFactoryImpl(
openFactory: openFactory,
Expand Down
4 changes: 2 additions & 2 deletions packages/sqlite_async/lib/src/common/port_channel_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ParentPortClient implements PortClient {
_close();
}

tieToIsolate(Isolate isolate) {
void tieToIsolate(Isolate isolate) {
_isolateDebugName = isolate.debugName;
isolate.addErrorListener(_errorPort.sendPort);
isolate.addOnExitListener(_receivePort.sendPort, response: _closeMessage);
Expand Down Expand Up @@ -207,7 +207,7 @@ class RequestPortServer {

RequestPortServer(this.port);

open(Future<Object?> Function(Object? message) handle) {
PortServer open(Future<Object?> Function(Object? message) handle) {
return PortServer.forSendPort(port, handle);
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sqlite_async/lib/src/common/port_channel_stub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ParentPortClient implements PortClient {
_stub();
}

tieToIsolate(Isolate isolate) {
void tieToIsolate(Isolate isolate) {
_stub();
}
}
Expand Down Expand Up @@ -97,7 +97,7 @@ class RequestPortServer {

RequestPortServer(this.port);

open(Future<Object?> Function(Object? message) handle) {
PortServer open(Future<Object?> Function(Object? message) handle) {
_stub();
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlite_async/lib/src/common/sqlite_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class SqliteDatabase
///
/// A maximum of [maxReaders] concurrent read transactions are allowed.
factory SqliteDatabase(
{required path,
{required String path,
int maxReaders = SqliteDatabase.defaultMaxReaders,
SqliteOptions options = const SqliteOptions.defaults()}) {
return SqliteDatabaseImpl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SqliteDatabaseImpl
int maxReaders;

factory SqliteDatabaseImpl(
{required path,
{required String path,
int maxReaders = SqliteDatabase.defaultMaxReaders,
SqliteOptions options = const SqliteOptions.defaults()}) {
throw UnimplementedError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SqliteDatabaseImpl
///
/// A maximum of [maxReaders] concurrent read transactions are allowed.
factory SqliteDatabaseImpl(
{required path,
{required String path,
int maxReaders = SqliteDatabase.defaultMaxReaders,
SqliteOptions options = const SqliteOptions.defaults()}) {
final factory =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _IsolateUpdateListener {
return controller.stream;
}

close() {
void close() {
client.fire(UnsubscribeToUpdates(port.sendPort));
controller.close();
port.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class SharedMutex implements Mutex {
}, zoneValues: {this: true});
}

_unlock() {
void _unlock() {
client.fire(const _UnlockMessage());
}

Expand Down
8 changes: 4 additions & 4 deletions packages/sqlite_async/lib/src/sqlite_migrations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SqliteMigrations {

SqliteMigrations({this.migrationTable = "_migrations"});

add(SqliteMigration migration) {
void add(SqliteMigration migration) {
assert(
migrations.isEmpty || migrations.last.toVersion < migration.toVersion);

Expand All @@ -48,7 +48,7 @@ class SqliteMigrations {
}

/// The current version as specified by the migrations.
get version {
int get version {
return migrations.isEmpty ? 0 : migrations.last.toVersion;
}

Expand All @@ -68,7 +68,7 @@ class SqliteMigrations {
}
}

_validateCreateDatabase() {
void _validateCreateDatabase() {
if (createDatabase != null) {
if (createDatabase!.downMigration != null) {
throw MigrationError("createDatabase may not contain down migrations");
Expand Down Expand Up @@ -229,7 +229,7 @@ class SqliteDownMigration {
SqliteDownMigration({required this.toVersion});

/// Add an statement to execute to downgrade the database version.
add(String sql, [List<Object?>? params]) {
void add(String sql, [List<Object?>? params]) {
_statements.add(_SqliteMigrationStatement(sql, params ?? []));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SqliteDatabaseImpl
///
/// A maximum of [maxReaders] concurrent read transactions are allowed.
factory SqliteDatabaseImpl(
{required path,
{required String path,
int maxReaders = SqliteDatabase.defaultMaxReaders,
SqliteOptions options = const SqliteOptions.defaults()}) {
final factory =
Expand Down
4 changes: 2 additions & 2 deletions packages/sqlite_async/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies:
dev_dependencies:
build_runner: ^2.4.14
build_web_compilers: ^4.1.1
build_test: ^2.2.3
lints: ^5.0.0
build_test: ^3.5.0
lints: ^6.0.0
test: ^1.21.0
test_api: ^0.7.0
glob: ^2.1.1
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlite_async/test/watch_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'utils/test_utils_impl.dart';

final testUtils = TestUtils();

createTables(SqliteDatabase db) async {
Future<void> createTables(SqliteDatabase db) async {
await db.writeTransaction((tx) async {
await tx.execute(
'CREATE TABLE assets(id INTEGER PRIMARY KEY AUTOINCREMENT, make TEXT, customer_id INTEGER)');
Expand Down