Skip to content
Discussion options

You must be logged in to vote

Mostly for legacy reasons, package:sqlite3_web appends a drift_db/ prefix to paths resolved in OPFS. I think it would be reasonable to at least add an option to disable that and let you specify the full database path instead.

If it's possible for you to put these database files into the drift_db/ directory in OPFS, you can open them directly with this package. You can use a custom open factory to ensure that OPFS gets used, but it would already be preferred by default:

final class _OpenOpfsFactory extends WebSqliteOpenFactory {
  _OpenOpfsFactory(String path, SqliteOptions options)
      : super(path: path, sqliteOptions: options);

  @override
  Future<ConnectToRecommendedResult> connect…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Embers-of-the-Fire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants