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 clickhouse from '@/lib/clickhouse';
|
|||
import { CLICKHOUSE, PRISMA, runQuery } from '@/lib/db';
|
||||
import { QueryFilters } from '@/lib/types';
|
||||
|
||||
const FUNCTION_NAME = 'getEventDataEvents';
|
||||
|
||||
export interface WebsiteEventData {
|
||||
eventName?: string;
|
||||
propertyName: string;
|
||||
|
|
@ -44,6 +46,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
order by 1 asc, 2 asc, 3 asc, 5 desc
|
||||
`,
|
||||
queryParams,
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -59,11 +62,10 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
on website_event.event_id = event_data.website_event_id
|
||||
where event_data.website_id = {{websiteId::uuid}}
|
||||
and event_data.created_at between {{startDate}} and {{endDate}}
|
||||
group by website_event.event_name, event_data.data_key, event_data.data_type
|
||||
order by 1 asc, 2 asc
|
||||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -93,6 +95,7 @@ async function clickhouseQuery(
|
|||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -111,5 +114,6 @@ async function clickhouseQuery(
|
|||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
FUNCTION_NAME,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue