update method

Future<int> update(
  1. Map<String, Object?> values, {
  2. String? where,
  3. List<Object?>? whereArgs,
  4. ConflictAlgorithm? conflictAlgorithm,
})

Update

Implementation

Future<int> update(Map<String, Object?> values,
    {String? where, List<Object?>? whereArgs, ConflictAlgorithm? conflictAlgorithm}) async {
  batch?.update(tableName, values, where: where, whereArgs: whereArgs, conflictAlgorithm: conflictAlgorithm);
  if (batch != null) return 0; // fake result, please get the real result from `batch.commit()`
  return await executor.update(tableName, values,
      where: where, whereArgs: whereArgs, conflictAlgorithm: conflictAlgorithm);
}