mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +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
|
|
@ -2,6 +2,8 @@ import prisma from '@/lib/prisma';
|
|||
import clickhouse from '@/lib/clickhouse';
|
||||
import { runQuery, PRISMA, CLICKHOUSE } from '@/lib/db';
|
||||
|
||||
const FUNCTION_NAME = 'getSessionData';
|
||||
|
||||
export async function getSessionData(...args: [websiteId: string, sessionId: string]) {
|
||||
return runQuery({
|
||||
[PRISMA]: () => relationalQuery(...args),
|
||||
|
|
@ -29,6 +31,7 @@ async function relationalQuery(websiteId: string, sessionId: string) {
|
|||
order by data_key asc
|
||||
`,
|
||||
{ websiteId, sessionId },
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -52,5 +55,6 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
|
|||
order by data_key asc
|
||||
`,
|
||||
{ websiteId, sessionId },
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue