MCPcopy Create free account
hub / github.com/axe-api/axe-api / addSoftDeleteQuery

Function addSoftDeleteQuery

packages/axe-api/src/Handlers/Helpers.ts:254–267  ·  view source on GitHub ↗
(
  model: IModelService,
  conditions: IQuery | null,
  query: Knex.QueryBuilder,
)

Source from the content-addressed store, hash-verified

252};
253
254export const addSoftDeleteQuery = (
255 model: IModelService,
256 conditions: IQuery | null,
257 query: Knex.QueryBuilder,
258) => {
259 if (conditions !== null && conditions?.trashed === true) {
260 valideteQueryFeature(model, QueryFeature.Trashed);
261 return;
262 }
263
264 if (model.instance.deletedAtColumn) {
265 query.whereNull(model.instance.deletedAtColumn);
266 }
267};
268
269export const getRelatedData = async (
270 version: IVersion,

Callers 5

PreparePhase.tsFile · 0.90
PreparePhase.tsFile · 0.90
PreparePhase.tsFile · 0.90
PrepareGetPhase.tsFile · 0.90
PreparePhase.tsFile · 0.90

Calls 1

valideteQueryFeatureFunction · 0.90

Tested by

no test coverage detected