rawInsert abstract method
Executes a raw SQL INSERT query and returns the last inserted row ID.
int id1 = await database.rawInsert(
"INSERT INTO Test(name, value, num) VALUES('some name', 1234, 456.789)",
);
int id2 = await database.rawInsert(
'INSERT INTO Test(name, value, num) VALUES(?, ?, ?)',
['another name', 12345678, 3.1416],
);
0 could be returned for some specific conflict algorithms if not inserted.
Implementation
Future<int> rawInsert(String sql, [List<Object?>? arguments]);