customInsert method
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<SchemaEntityWithResultSet>? updates,
}) async {
final result = await _customWrite(
query,
variables,
updates,
UpdateKind.insert,
false,
);
return result.lastInsertRowId ?? 0;
}