doUpdateSQL method
FutureOr
doUpdateSQL(
- String entityName,
- String table,
- SQL sql,
- Object id,
- Transaction transaction,
- DBSQLiteConnectionWrapper connection, {
- bool allowAutoInsert = false,
override
Implementation
@override
FutureOr doUpdateSQL(
String entityName,
String table,
SQL sql,
Object id,
Transaction transaction,
DBSQLiteConnectionWrapper connection, {
bool allowAutoInsert = false,
}) {
if (sql.isDummy) return id;
var results = _select(connection, sql);
var affectedRows = connection.updatedRows;
if (affectedRows == 0 && results.isEmpty) {
return autoInsertAfterNoopUpdate(
transaction,
entityName,
table,
sql,
connection,
allowAutoInsert: allowAutoInsert,
logger: _log,
);
}
return _resolveResultID(connection, results, sql, id);
}