mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
update api to new CH columns
This commit is contained in:
parent
36edbe2f4c
commit
96add409b6
19 changed files with 74 additions and 48 deletions
|
|
@ -45,11 +45,11 @@ async function relationalQuery(
|
|||
}
|
||||
|
||||
async function clickhouseQuery(
|
||||
website_id,
|
||||
website_uuid,
|
||||
{ start_at, end_at, timezone = 'UTC', unit = 'day', count = '*', filters = {} },
|
||||
) {
|
||||
const { parseFilters, rawQuery, getDateStringQuery, getDateQuery, getBetweenDates } = clickhouse;
|
||||
const params = [website_id];
|
||||
const params = [website_uuid];
|
||||
const { pageviewQuery, sessionQuery } = parseFilters(null, filters, params);
|
||||
|
||||
return rawQuery(
|
||||
|
|
@ -59,7 +59,7 @@ async function clickhouseQuery(
|
|||
from
|
||||
(select
|
||||
${getDateQuery('created_at', unit, timezone)} t,
|
||||
count(${count !== '*' ? 'distinct session_uuid' : count}) y
|
||||
count(${count !== '*' ? 'distinct session_id' : count}) y
|
||||
from event
|
||||
where event_name = ''
|
||||
and website_id= $1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue