insert method

Future<List<UserInfo>> insert(
  1. DatabaseSession session,
  2. List<UserInfo> rows, {
  3. Transaction? transaction,
  4. bool ignoreConflicts = false,
})

Inserts all UserInfos in the list and returns the inserted rows.

The returned UserInfos will have their id fields set.

This is an atomic operation, meaning that if one of the rows fails to insert, none of the rows will be inserted.

If ignoreConflicts is set to true, rows that conflict with existing rows are silently skipped, and only the successfully inserted rows are returned.

Implementation

Future<List<UserInfo>> insert(
  _i1.DatabaseSession session,
  List<UserInfo> rows, {
  _i1.Transaction? transaction,
  bool ignoreConflicts = false,
}) async {
  return session.db.insert<UserInfo>(
    rows,
    transaction: transaction,
    ignoreConflicts: ignoreConflicts,
  );
}