【发布时间】:2021-06-18 05:26:57
【问题描述】:
执行插入查询时出错
final dbPath = await sql.getDatabasesPath();
final db = await sql.openDatabase(path.join(dbPath, 'history.db'),
onCreate: (db, version) {
return db.execute(
'CREATE TABLE history(id TEXT PRIMARY KEY, senderEmail TEXT, receiverEmail TEXT, amount REAL)');
}, version: 1);
await db.insert(table, data, conflictAlgorithm: ConflictAlgorithm.replace);
当我通过 ConflictAlgorithm.replace 时发生错误,说
未定义名称“冲突算法”。尝试将名称更正为已定义的名称,或定义名称
另外,我正在关注:
【问题讨论】: