insert method
Future<int>
insert(
- String table,
- Map<
String, Object?> values, { - String? nullColumnHack,
- ConflictAlgorithm? conflictAlgorithm,
override
This method helps insert a map of values
into the specified table and returns the
id of the last inserted row.
var value = {
'age': 18,
'name': 'value'
};
int id = await db.insert(
'table',
value,
conflictAlgorithm: ConflictAlgorithm.replace,
);
0 could be returned for some specific conflict algorithms if not inserted.
Implementation
@override
Future<int> insert(
String table,
Map<String, Object?> values, {
String? nullColumnHack,
sqlite.ConflictAlgorithm? conflictAlgorithm,
}) =>
throw _dbNotEnabled();