withDeleted method

Query<T> withDeleted()

---------- SOFT DELETES ----------

Implementation

Query<T> withDeleted() {
  if (base.where != null) {
    base.where = base.where!.replaceAll(
      RegExp(
        '${model.table}\\.deleted_at\\s*(IS\\s+NOT\\s+NULL|IS\\s+NULL|=\\s*NULL|!=\\s*NULL|<>\\s*NULL)',
        caseSensitive: false,
      ),
      '1=1',
    );
  }
  return this;
}