Comments (1)
There's no way to do declare an inheritance structure for tables in drift files, they can't share a a common mixin for columns.
But while there is no way to do this with type safety, you can still access columns of abstract tables. For instance, if you had
CREATE TABLE todo_items (
status INTEGER ...,
...
);
CREATE TABLE task_items (
status INTEGER ...,
...
);
Then you can do
void doSomething(TableInfo data) {
if (data.columnsByName.containsKey('status')) {
// do something
}
}
from drift.
Related Issues (20)
- Simple count(*)? HOT 1
- The 'ie' suffix of the DataClass generated when executing build is automatically changed to 'y' HOT 1
- Implement Geopoly Interface HOT 1
- Incorrect Variable Bindings in Postgres Transactions HOT 4
- SqliteException(261): while executing, database is locked, database is locked (code 261) Causing statement: PRAGMA wal_checkpoint(PASSIVE);PRAGMA busy_timeout = 5000;PRAGMA journal_size_limit = 6144000;PRAGMA synchronous = normal;PRAGMA journal_mode = WAL; HOT 3
- `FOREIGN KEY` defined in the `.drift` file, in between the other column line then typed-class not getting generated... HOT 1
- Migration issues with Firefox HOT 1
- Documentation issue: Setup HOT 2
- File table and dart:io File clash HOT 4
- CRASH: Stack dump aborted because GetAndValidateThreadStackBounds failed. HOT 4
- NullAwareTypeConverter not usable from drift files when the column is non-nullable HOT 3
- Error while trying to run dart run moor_generator migrate HOT 4
- SqliteException(1): while preparing statement, near "RETURNING": syntax error, SQL logic error dart test HOT 2
- [Feature Request] Shared web indexedDB database without using Worker or SharedWorker HOT 8
- [Bug] 1 positional argument expected by 'AppDatabase.new', but 0 found. Try adding the missing argument. HOT 2
- Type clash after 2.16.0 upgrade (breaking change in drift_dev) HOT 2
- Dialect aware Postgres types not working for .drift files HOT 7
- A Optional Generated Wrapper for simple Statements HOT 27
- because framework depends on both package_info_plus ^5.0.1 and drift_dev ^2.16.0, version solving failed. HOT 1
- Postgres giving the error Unsupported type: Instance of 'UuidValue' when using where clause. HOT 5
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.