mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Added more function names to queries.
This commit is contained in:
parent
cd6ad0add2
commit
da572864ac
25 changed files with 118 additions and 20 deletions
|
|
@ -3,6 +3,8 @@ import prisma from '@/lib/prisma';
|
|||
import clickhouse from '@/lib/clickhouse';
|
||||
import { CLICKHOUSE, PRISMA, runQuery } from '@/lib/db';
|
||||
|
||||
const FUNCTION_NAME = 'getEventData';
|
||||
|
||||
export async function getEventData(...args: [eventId: string]): Promise<EventData[]> {
|
||||
return runQuery({
|
||||
[PRISMA]: () => relationalQuery(...args),
|
||||
|
|
@ -30,6 +32,7 @@ async function relationalQuery(eventId: string) {
|
|||
where event_id = {{eventId::uuid}}
|
||||
`,
|
||||
{ eventId },
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -53,5 +56,6 @@ async function clickhouseQuery(eventId: string): Promise<EventData[]> {
|
|||
where event_id = {eventId:UUID}
|
||||
`,
|
||||
{ eventId },
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue