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
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
import type { asc, desc, SQL, Table } from 'drizzle-orm';
|
|
import type { PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
import type { FlattenedField, Sort, Where } from 'payload';
|
|
import type { DrizzleAdapter, GenericColumn, GenericTable } from '../types.js';
|
|
export type BuildQueryJoinAliases = {
|
|
condition: SQL;
|
|
queryPath?: string;
|
|
table: GenericTable | PgTableWithColumns<any>;
|
|
type?: 'innerJoin' | 'leftJoin' | 'rightJoin';
|
|
}[];
|
|
type BuildQueryArgs = {
|
|
adapter: DrizzleAdapter;
|
|
aliasTable?: Table;
|
|
fields: FlattenedField[];
|
|
joins?: BuildQueryJoinAliases;
|
|
locale?: string;
|
|
parentIsLocalized?: boolean;
|
|
selectLocale?: boolean;
|
|
sort?: Sort;
|
|
tableName: string;
|
|
where: Where;
|
|
};
|
|
export type BuildQueryResult = {
|
|
joins: BuildQueryJoinAliases;
|
|
orderBy: {
|
|
column: GenericColumn;
|
|
order: typeof asc | typeof desc;
|
|
}[];
|
|
selectFields: Record<string, GenericColumn>;
|
|
where: SQL;
|
|
};
|
|
export declare const buildQuery: ({ adapter, aliasTable, fields, joins, locale, parentIsLocalized, selectLocale, sort, tableName, where: incomingWhere, }: BuildQueryArgs) => BuildQueryResult;
|
|
export {};
|
|
//# sourceMappingURL=buildQuery.d.ts.map |