updateRecords method

Future<SqlResponse<List<TModel>>> updateRecords({
  1. required UpdateCustom<TDef> set(
    1. TDef e
    ),
  2. required Where where(
    1. TDef e
    ),
  3. PostgreSQLExecutionContext? cn = null,
})

Updates records and returns a list of all updated records

Implementation

Future<SqlResponse<List<TModel>>> updateRecords({
  required UpdateCustom<TDef> Function(TDef e) set,
  required Where Function(TDef e) where,
  PostgreSQLExecutionContext? cn = null,
}) async {
  var request = _updateRecordsGetRequest(set, where);

  request = request.appendSql("\n returning *;");

  var result = await runQueryToTModel(request, cn);
  return result;
}