deleteRecords method

Future<SqlResponse<int>> deleteRecords(
  1. Where where(
    1. TDef e
    ), {
  2. PostgreSQLExecutionContext? cn = null,
})

Implementation

Future<SqlResponse<int>> deleteRecords(
  Where Function(TDef e) where, {
  PostgreSQLExecutionContext? cn = null,
}) async {
  var delete = getDelete();
  var from = getFrom(this.tableDefinition);
  var whereRequest = getWhere(where, this.tableDefinition);

  var deleteRequest = SqlRequest.bySqlRequests([delete, from, whereRequest]);

  var result = await runExecute(deleteRequest, cn);

  return result;
}