SqlWriteResult constructor
Creates write metadata with the number of changed rows and generated ID.
Implementation
SqlWriteResult({required this.affectedRows, this.lastInsertId}) {
if (affectedRows < 0) {
throw ArgumentError.value(
affectedRows,
'affectedRows',
'Must not be negative.',
);
}
final id = lastInsertId;
if (id != null && id < 0) {
throw ArgumentError.value(id, 'lastInsertId', 'Must not be negative.');
}
}