Comments (2)
Hey @Jeremywhiteley there aren't current plans to support SQLite on the web until there's a suitable solution in sqflite, which has a long running thread about this. However, there looks like some very recent experimental work being done on this repo. If you want to give that a go, you just need to define the database factory:
dependencies:
universal_platform: ^0.1.3
sqflite_web:
git:
path: [email protected]:deakjahn/sqflite_web.git
And then in your Repository (untested code):
import 'package:sqflite_common/sqlite_api.dart';
import 'package:sqflite_web/sqflite_web.dart';
import 'package:universal_platform/universal_platform.dart'; // necessary for persistence to disk on Android/iOS
import 'brick.g.dart'; // of course, relative to your repository
MyOfflineFirstRepository(
sqliteProvider: SqliteProvider(
UniversalPlatform.isWeb ? inMemoryDatabasePath : 'my_custom_database.sqlite',
databaseFactory: UniversalPlatform.isWeb ? databaseFactoryWeb : null,
modelDictionary: sqliteModelDictionary,
)
)
I haven't read that discussion too closely, but there's a fair chance that your DB won't be persisted between sessions or tabs on the web. I'd also recommend giving feedback as you uncover bugs to that sqflite_web repo.
from brick.
Just wanted to though this out there and curious if it was considered.
Chrome is also remove WebSQL in favor of SQLite on the web:
from brick.
Related Issues (20)
- Converting object to an encodable object failed when adding a second item to an association HOT 7
- Add http ^1.0.0 support HOT 2
- Is this the same as realm db or couch db lite? HOT 4
- How to use with Firestore. HOT 1
- Subscribe is not listening to remote changes even when policy is set to OfflineFirstGetPolicy.awaitRemote HOT 6
- Feature: Synchronized app indicator HOT 1
- Deleting a document that has already been deleted from the server causes an error HOT 3
- Is this package still being maintain? HOT 1
- Changing the defaultHeaders cancels pending changes HOT 5
- Upgrade http package HOT 4
- Supported types are null, byte[], double, long, boolean and String) HOT 1
- Fields with OfflineFirst() are not updated with the main document when fetching from the server HOT 9
- Function afterSave() is generated wrong HOT 7
- databaseFactoryFfi not save data in local HOT 1
- Outdated package dependencies HOT 1
- Support to windows not work HOT 3
- Adapter file not generated when uniquely identified field is a class and no primitive HOT 14
- multipart request HOT 8
- Feature: Support for more database adapters HOT 2
- Relative imports in models are not correctly transferred to brick.g.dart HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brick.