Implement Drift database backend as alternative to ObjectBox - #199
Open
mpeter50 wants to merge 22 commits into
Open
Implement Drift database backend as alternative to ObjectBox#199mpeter50 wants to merge 22 commits into
mpeter50 wants to merge 22 commits into
Conversation
…ntation to Drift models, and update the database schema.
… database constructor parameter.
…hance documentation for its generated model files.
- Created drift/web/backend.dart with full FMTCBackendInternal implementation using WasmDatabase - Uses WasmSqlite3.loadFromUrl for in-memory databases, WasmDatabase.open for persistent - Import/export throws UnsupportedError on web (no file system access) - Thread-safe impl shares DB instance (web has no true isolates) - Updated export_external.dart with conditional Drift import (web vs native) - Added sqlite3 ^2.7.5 dependency for WASM support
…lify the web backend's `realSize` method.
do not search for files in places where not needed errors: example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_macos_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_macos_test.dart`. example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_utils_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_utils_test.dart`. example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_windows_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/file_picker_windows_test.dart`. example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/dialog_handler_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/dialog_handler_test.dart`. example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/kdialog_handler_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/kdialog_handler_test.dart`. example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/qarma_and_zenity_handler_test.dart objectbox_generator:resolver E Could not resolve annotation for `library asset:flutter_map_tile_caching/example/windows/flutter/ephemeral/.plugin_symlinks/file_picker/test/linux/qarma_and_zenity_handler_test.dart`.
caused an error in exports
what for? some automation did that
defaults are defined in db schema, but for the inert to work, they need to be present in the query too
not needed anymore
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The motivation for this pull request is to add support for a free software database backend, resolving #197 and potentially other issues.
The current ObjectBox database backend is not free software, and it includes binary blobs, making it unauditable, which is critical for distributors that do not allow binary blobs in releases, like F-droid. This situation might invalidate the GPL license on this repository.
The advantages of Drift over ObjectBox is that it is free software, and is not burdened with the above issues.
This branch is very much experimental for now. It builds upon #196, making it compile and run.
A through review is needed before a possible merging, and probably quite some changes, but the current state seems to be functional when used in the EveryDoor mapping app for Android.
Things that need to be verified include correct functionality, and whether objectbox was indeed completely removed.
Currently this branch completely removes ObjectBox, but that is not necessary if Flutter's build system can be configured to produce different release flavors with different dependencies. It may also be possible to move the objectbox backend to a different package.
Any reviews and suggestions are welcome. I'll try to respond to them, but do know that I dont have any more Flutter/Dart experience than what I obtained while making these patches.