get table definition
This commit is contained in:
parent
717de68f4e
commit
9944fb931a
2 changed files with 40 additions and 5 deletions
|
@ -2,7 +2,7 @@ export interface DynamicQueryStructure {
|
|||
select: string[] | "*";
|
||||
table: string;
|
||||
where?: Partial<ConditionStructure>;
|
||||
join?: Array<DynamicQueryStructure>;
|
||||
join?: Array<DynamicQueryStructure & { foreignColumn: string }>;
|
||||
orderBy?: { [key: string]: "ASC" | "DESC" };
|
||||
}
|
||||
|
||||
|
@ -40,17 +40,18 @@ const exampleQuery: DynamicQueryStructure = {
|
|||
table: "member",
|
||||
where: {
|
||||
AND: {
|
||||
mail: { eq: 1 },
|
||||
mail: { endsWith: "@gmail.com" },
|
||||
OR: {
|
||||
firstname: { eq: "hi" },
|
||||
lastname: { eq: "ho" },
|
||||
firstname: { startsWith: "J" },
|
||||
lastname: { endsWith: "K" },
|
||||
},
|
||||
},
|
||||
},
|
||||
join: [
|
||||
{
|
||||
select: "*",
|
||||
table: "adress",
|
||||
table: "communication",
|
||||
foreignColumn: "sendNewsletter",
|
||||
},
|
||||
],
|
||||
orderBy: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue