Comments (4)
- I haven't experimented with how nesting would be done. It's isn't supported in my current implementation. Even so there wouldn't be any circular recursion issues.
- Once
withReferences
is called, it uses whatever filters and ordering were applied to the manager and wraps it in a new class. It will then run queries to get the referenced objects and attach them to a record. So filters and ordering can't be applied to what references get returned. Serverpod allows filtering what references are returned, but it's not type safe. I think it's worth it to have all-or-nothing and be type-safe
from drift.
@simolus3 Check this out #2984
from drift.
The API looks convincing, but I think I need some more details that aren't clear to me (but probably important to get right/clarified first):
- How (if at all) does this chain multiple reference links (e.g. if categories had outgoing references as well)? How do we deal with circular references (or self-references in a table)
- How does this play along with the rest of the manager API, in particular the methods to write filters? Will they still only use the primary table or is there a different state for joins as well?
from drift.
I'll have a PR in a couple of minutes which will allow you to experiment with it.
Although modular will prob not work (temporarily)
from drift.
Related Issues (20)
- Add Code Generation for json_serializable HOT 2
- android::register_android_database_SQLiteConnection Android Crash HOT 2
- insertOnConflictUpdate behaves as an insert HOT 8
- Adding unique key that is case-insensitive HOT 1
- `pragma legacy_alter_table = 1` not supported in Turso HOT 4
- [WEB] Can't run a transaction inside `exclusively` HOT 1
- v2.19.0 introduced a breaking change HOT 3
- 404 link in QueryExecutor class documentation HOT 1
- Renew DriftDatabase usage example HOT 1
- feat: Declare column on table with `late final`
- Unhandled Exception: Bad state: Tried to send Request ... over isolate channel, but the connection was closed! HOT 3
- DevTools extension not working in 2.19.1 HOT 1
- [Android web] wasm issue HOT 8
- Schema dump fails in flutter with drift_dev 2.19 HOT 2
- Seeing multiple instances of SqliteException(13), SqliteException(14), and SqliteException(5) in the wild HOT 9
- CountAll not available HOT 5
- Columns from queries are suddenly nullable since Drift 2.19 HOT 6
- DB stops HOT 8
- Setup doc contains unexecutable code. HOT 3
- Drift file generating incorrect typings HOT 4
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 drift.