insertMany method Null safety
InstanceTypes into the underlying database.
The Query must not have its values nor valueMap property set. This
operation will insert a row for each item in
objects to the database in
context. The return value is a Future that completes with the newly
final users = [ User()..email = 'firstname.lastname@example.org', User()..email = 'email@example.com', ]; final q = Query<User>(); var newUsers = await q.insertMany(users);
InstanceType has properties with Validate metadata, those
validations will be executed prior to sending the query to the database.
The method guaranties that either all rows will be inserted and returned or exception will be thrown and non of the rows will be written to the database.
Future<List<InstanceType>> insertMany(List<InstanceType> objects);