minor v1.4.0 #89

Merged
jkeffects merged 13 commits from develop into main 2025-04-16 15:01:06 +00:00
Showing only changes of commit 6d5d8d9ded - Show all commits

View file

@ -3,7 +3,7 @@ export interface DynamicQueryStructure {
select: string[] | "*"; select: string[] | "*";
table: string; table: string;
where?: Array<ConditionStructure>; where?: Array<ConditionStructure>;
join?: Array<DynamicQueryStructure & { foreignColumn: string }>; join?: Array<DynamicQueryStructure & JoinStructure>;
orderBy?: Array<OrderByStructure>; // only at top level orderBy?: Array<OrderByStructure>; // only at top level
} }
@ -48,6 +48,8 @@ export type WhereOperation =
| "timespanEq"; // Date before x years (YYYY-01-01 <bis> YYYY-12-31) | "timespanEq"; // Date before x years (YYYY-01-01 <bis> YYYY-12-31)
// TODO: age between | age equals | age greater | age smaller // TODO: age between | age equals | age greater | age smaller
export type JoinStructure = { foreignColumn: string; type: "defined" } | { condition: string; type: "custom" };
export type OrderByStructure = { export type OrderByStructure = {
id: string; id: string;
depth: number; depth: number;
@ -101,18 +103,21 @@ export const exampleQuery: DynamicQueryStructure = {
select: "*", select: "*",
table: "communication", table: "communication",
foreignColumn: "sendNewsletter", foreignColumn: "sendNewsletter",
type: "defined",
}, },
{ {
id: "91011", id: "91011",
select: "*", select: "*",
table: "membership", table: "membership",
foreignColumn: "memberships", foreignColumn: "memberships",
type: "defined",
join: [ join: [
{ {
id: "121314", id: "121314",
select: "*", select: "*",
table: "membership_status", table: "membership_status",
foreignColumn: "status", foreignColumn: "status",
type: "defined",
where: [ where: [
{ {
structureType: "condition", structureType: "condition",