mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +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
|
|
@ -4,6 +4,8 @@ import prisma from '@/lib/prisma';
|
|||
import { EVENT_COLUMNS, EVENT_TYPE } from '@/lib/constants';
|
||||
import { QueryFilters } from '@/lib/types';
|
||||
|
||||
const FUNCTION_NAME = 'getPageviewStats';
|
||||
|
||||
export async function getPageviewStats(...args: [websiteId: string, filters: QueryFilters]) {
|
||||
return runQuery({
|
||||
[PRISMA]: () => relationalQuery(...args),
|
||||
|
|
@ -35,6 +37,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
order by 1
|
||||
`,
|
||||
queryParams,
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -90,5 +93,5 @@ async function clickhouseQuery(
|
|||
`;
|
||||
}
|
||||
|
||||
return rawQuery(sql, queryParams);
|
||||
return rawQuery(sql, queryParams, FUNCTION_NAME);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue