Simon Binder
Simon Binder
I suspect that this would happen because we somehow close the same database more than once. So far I didn't have access to a Mac so I couldn't verify this...
Yeah I can reproduce this on Android too. The cached in-memory database used by the tracker seems to always be empty after a stateless restart, it doesn't even contain the...
We can't really have those methods on the generated model, because from there it's not obvious which database to use for the actual query. We could add a `generateCRUD` parameter...
If you have a "primary" table per dao, you could use something like: ```dart abstract class CrudDao extends DatabaseAccessor { CrudDao(DB attachedDatabase) : super(attachedDatabase); TableInfo get primaryTable; Selectable selectAll() =>...
Right, but `AssessmentTypesDao` should inherit the right methods from `CrudDao`? E.g. you could use `yourDatabase.assessmentTypesDao.listAll()` and get a `Future`. I forgot to add the mixin though: ```dart @UseDao(tables: [AssessmentTypes]) class...
> Can I access that column in the abstract class even though the getter isn't defined for `Table`? You can use `primaryTable.columnsByName['id'] as Expression`.
Sure! You can use it like this: ```dart Future find(int id) { final idColumn = primaryTable.columnsByName['id'] as Expression; return (select(primaryTable)..where((_) => idColumn.equals(id))).getSingle(); } ```
Thanks for the report. Are all of those "database disk image is malformed" errors coming from the migration? Or are there any others that with a similar error message but...
You could use something like this to delete the entire database file if it has a lower schema version: ```dart import 'package:sqlite3/sqlite3.dart'; // This can be passed to the database's...
@zezo357 Are you using a `WebDatabase` or a `WasmDatabase`? In either way, if you have a way to reproduce this (just storing a large string? if so, how large?), can...