-
-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export 'unsupported.dart' | ||
if (dart.library.ffi) 'native.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:drift/backends.dart'; | ||
import 'package:drift/drift.dart'; | ||
import 'package:drift/native.dart'; | ||
|
||
QueryExecutor inMemoryExecutor() { | ||
return NativeDatabase.memory(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:drift/drift.dart'; | ||
|
||
Never _unsupported() { | ||
throw UnsupportedError( | ||
'No suitable database implementation was found on this platform.'); | ||
} | ||
|
||
// Depending on the platform the app is compiled to, the following stubs will | ||
// be replaced with the methods in native.dart or web.dart | ||
|
||
QueryExecutor inMemoryExecutor() { | ||
return _unsupported(); | ||
} | ||
Future<void> validateDatabaseSchema(GeneratedDatabase database) async { | ||
_unsupported(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters