Comments (3)
Using the watch() function in Drift does not seem to fire the callback for the update of the other table
It definitely should though! Are you defining the trigger in a .drift
file or are you creating it manually? For triggers that Drift knows about, stream updates should work.
I think update hooks could be a useful addition to this package regardless of Drift though.
from sqlite3.dart.
At the moment we're creating these triggers manually since they rely on a complex view that doesn't work in a .drift
file. We're just running these in a customStatement.
from sqlite3.dart.
I have implemented update hooks in 8d308c1.
At the moment we're creating these triggers manually since they rely on a complex view that doesn't work in a
.drift
file
If drift crashes or provides invalid analysis for a valid sqlite3 view, I'd love to take a look at that. If you're using customStatement
s to create triggers, you need to tell drift how these affect stream updates manually (the generator should otherwise be able to figure it out).
@override
StreamQueryUpdateRules get streamUpdateRules {
return StreamQueryUpdateRules(
[
...super.streamUpdateRules.rules,
WritePropagation(
on: TableUpdateQuery.onTable(tableThatTheTriggerIsListeningOn),
result: [
TableUpdate.onTable(tableThatMightBeWrittenInto),
],
)
],
);
}
from sqlite3.dart.
Related Issues (20)
- Release window bug HOT 4
- Parameterless prepared select throws (code 101) HOT 5
- Support for command line of dart at Linux HOT 17
- Issue with table with accents in 1.10.0 HOT 3
- database path can't contains characters HOT 1
- Failed to load dynamic library 'sqlite3.dll HOT 6
- Spellfix extension on android HOT 1
- Detect wasm version HOT 3
- Insert array to db HOT 4
- any small example of how to use sqlcipher on flutter HOT 3
- Unhandled Exception: SqliteException(5): while executing statement, database is locked, database is locked (code 5) HOT 15
- Package Broken HOT 1
- Support binding user-defined values to statements HOT 11
- "File not found" error with Flutter 3.10 HOT 5
- Performance question? HOT 6
- Error to load database on android HOT 4
- Is publishing an app with sqlite3_flutter_libs on the App Store allowed? HOT 1
- How to upgrade an existing database to add new column HOT 1
- openSQLiteOnWindows HOT 2
- Copying data from one database to another one using ATTACH 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 sqlite3.dart.