updateOrCreate method

Future<int> updateOrCreate({
  1. required Map<String, Object?> check,
  2. required Map<String, Object?> inserts,
})
inherited

Update data if exists and if not, create new row.

var userEloquent = UserEloquent();

// if row where name is john exists, update 'password' column. If not, create row where name is john and password is 'pass'.
userEloquent.updateOrCreate(check:{'name':'john'},inserts:{'password':'pass'});

Implementation

Future<int> updateOrCreate(
    {required Map<String, Object?> check,
    required Map<String, Object?> inserts}) async {
  throw UnimplementedError();
}