mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
Add sql param logic.
This commit is contained in:
parent
cc46cfdcbf
commit
d93c2f9dd7
9 changed files with 46 additions and 32 deletions
|
|
@ -21,8 +21,8 @@ async function relationalQuery(
|
|||
sessionKey = 'session_id',
|
||||
},
|
||||
) {
|
||||
const { getDateQuery, parseFilters, rawQuery } = prisma;
|
||||
const params = [start_at, end_at];
|
||||
const { getDateQuery, parseFilters, rawQuery, toUuid } = prisma;
|
||||
const params = [websiteId, start_at, end_at];
|
||||
const { pageviewQuery, sessionQuery, joinSession } = parseFilters(
|
||||
'pageview',
|
||||
null,
|
||||
|
|
@ -37,8 +37,8 @@ async function relationalQuery(
|
|||
join website
|
||||
on pageview.website_id = website.website_id
|
||||
${joinSession}
|
||||
where website.website_uuid='${websiteId}'
|
||||
and pageview.created_at between $1 and $2
|
||||
where website.website_uuid = $1${toUuid()}
|
||||
and pageview.created_at between $2 and $3
|
||||
${pageviewQuery}
|
||||
${sessionQuery}
|
||||
group by 1`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue