update method

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

Implementation

@override
Future<bool> update(
  String table,
  Map<String, Object?> values, {
  String? where,
  List<Object?>? whereArgs,
  ConflictAlgorithm? conflictAlgorithm,
}) async {
  try {
    final result = await database!.update(
      table,
      values,
      where: where,
      whereArgs: whereArgs,
      conflictAlgorithm: conflictAlgorithm ?? defaultConflictAlgorithm,
    );
    if (result == 1) {
      return true;
    } else {
      return false;
    }
  } catch (e) {
    throw DatabaseBridgeException(error: e);
  }
}