Added more function names to queries.
This commit is contained in:
1 parent
cd6ad0add2
commit
da572864ac
25 files changed
+118
-20
No files matched your search
@@ -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,
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user