-
I will be working on almost exclusively existing sqlite databases, I have a few questions about .drift files.
Thanks for a great piece of work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use
None is generated for that example in particular. Opening databases is a runtime-only matter, so it's ignored by the generator. The example on existing databases assumes that you already have a drift database class with generated code.
Of course! Personally I like to split related queries into different files for instance. The |
Beta Was this translation helpful? Give feedback.
You can use
WITH
at the end of a table's definition to specify an existing row class that you wrote yourself. The Dart class used must be imported into thedrift
file for this.You can also use
AS
at the end of a table to specify a custom data class name for drift to generate (e.g.CREATE TABLE my_table (...) AS MyTable
). More docs on this are here.None is generated for that example in particular. Opening databases is a runtime-only matter, so it's ignored by the g…