You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a low priority point and doesn't affect the actual functionality (theoretically, right now).
The FTS5 index can be optimized with a special command as defined here.
At the moment this leads to following warning:
[WARNING] drift_dev on lib/features/bangs/data/database/database.dart:
line 75, column 41: Some columns are required but not present here. Expected values for trigger, website_name.
╷
75 │ INSERT INTO bang_fts(bang_fts) VALUES ('optimize');
│ ^^^^^^^^^^^^
╵
The table definition is as follows to understand the warning:
Thanks for offering your help! At the moment, the error is generated by _LintingVisitor.visitInsertStatement in drift_dev/lib/src/analysis/resolver/drift/sqlparser/drift_lints.dart. That's kind of misplaced, this particular error can be detected and raised by the LintingVisitor in the sqlparser package instead.
We need to recognize these scenarios for that linting step, and possibly also in the type inference visitor (TypeResolver in sqlparser).
I think a possible approach here would be to introduce a VirtualTable interface in sqlparser that extends Table. That could have optional methods used as hooks (e.g. validateInsert(InsertSource) and infertInsertTypes(InsertSource)) to customize the behavior of these steps for virtual tables. Let me know if that helps to get you started (I might be overlooking some complexity here), so if you have any questions or run into issues I'm happy to look at them.
This is a low priority point and doesn't affect the actual functionality (theoretically, right now).
The FTS5 index can be optimized with a special command as defined here.
At the moment this leads to following warning:
The table definition is as follows to understand the warning:
In fact, there are a few more special commands, that might not match the actual FTS columns and lead to warnings a s well (I do not use them): https://www.sqlite.org/fts5.html#special_insert_commands
The text was updated successfully, but these errors were encountered: