Files
klz-cables.com/.pnpm-store/v10/files/72/4d283d44fd16d71c4563bc99c3614471b7c62ba115509cde1705a52d9d5fc50b90bd171c44c68110461a88e2342317bcad211fd9842744c70fde0d4e73c67d
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

46 lines
1.1 KiB
Plaintext

import { buildOrderBy } from './buildOrderBy.js';
import { parseParams } from './parseParams.js';
export const buildQuery = function buildQuery({ adapter, aliasTable, fields, joins = [], locale, parentIsLocalized, selectLocale, sort, tableName, where: incomingWhere }) {
const selectFields = {
id: adapter.tables[tableName].id
};
let where;
const context = {
sort
};
if (incomingWhere && Object.keys(incomingWhere).length > 0) {
where = parseParams({
adapter,
aliasTable,
context,
fields,
joins,
locale,
parentIsLocalized,
selectFields,
selectLocale,
tableName,
where: incomingWhere
});
}
const orderBy = buildOrderBy({
adapter,
aliasTable,
fields,
joins,
locale,
parentIsLocalized,
rawSort: context.rawSort,
selectFields,
sort: context.sort,
tableName
});
return {
joins,
orderBy,
selectFields,
where
};
};
//# sourceMappingURL=buildQuery.js.map