queries property
Optionally, a list of named sql queries. During a build, drift will look at the defined sql, figure out what they do, and write appropriate methods in your generated database.
For instance, when using
@DriftDatabase(
tables: [Users],
queries: {
'userById': 'SELECT * FROM users WHERE id = ?',
},
)
Drift will generate two methods for you: userById(int id)
and
watchUserById(int id)
.
Implementation
final Map<String, String> queries;