customInsert method
Future<int>
customInsert(
- String query, {
- List<
Variable< variables = const [],Object> > - Set<
TableInfo< ? updates,Table, dynamic> >
inherited
Executes a custom insert statement and returns the last inserted rowid.
You can tell drift which tables your query is going to affect by using the
updates parameter. Query-streams running on any of these tables will
then be re-run.
Implementation
Future<int> customInsert(String query,
{List<Variable> variables = const [], Set<TableInfo>? updates}) {
return _customWrite(
query,
variables,
updates,
UpdateKind.insert,
(executor, sql, vars) {
return executor.runInsert(sql, vars);
},
);
}