update abstract method Null safety

Future<List<InstanceType>> update()

Updates InstanceTypes in the underlying database.

The Query must have its values or valueMap property set and should likely have its predicate or where set as well. This operation will update each row that matches the conditions in predicate/where with the values from values or valueMap. If no where or predicate is set, this method will throw an exception by default, assuming that you don't typically want to update every row in a database table. To specify otherwise, set canModifyAllInstances to true. The return value is a Future that completes with the any updated InstanceTypes. Example:

  var q = Query<User>()
    ..where.name = "Fred"
    ..values.name = "Joe";
  var usersNamedFredNowNamedJoe = await q.update();

If the InstanceType has properties with Validate metadata, those validations will be executed prior to sending the query to the database.

Implementation

Future<List<InstanceType>> update();