mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Remove snake_case.
This commit is contained in:
parent
e1f99a7d01
commit
a91386434d
21 changed files with 86 additions and 100 deletions
|
|
@ -9,20 +9,20 @@ export function getEvents(...args) {
|
|||
});
|
||||
}
|
||||
|
||||
function relationalQuery(websites, start_at) {
|
||||
function relationalQuery(websites, startAt) {
|
||||
return prisma.client.event.findMany({
|
||||
where: {
|
||||
websiteId: {
|
||||
in: websites,
|
||||
},
|
||||
createdAt: {
|
||||
gte: start_at,
|
||||
gte: startAt,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function clickhouseQuery(websites, start_at) {
|
||||
function clickhouseQuery(websites, startAt) {
|
||||
const { rawQuery, getDateFormat, getCommaSeparatedStringFormat } = clickhouse;
|
||||
|
||||
return rawQuery(
|
||||
|
|
@ -40,6 +40,6 @@ function clickhouseQuery(websites, start_at) {
|
|||
? `website_id in (${getCommaSeparatedStringFormat(websites)})`
|
||||
: '0 = 0'
|
||||
}
|
||||
and created_at >= ${getDateFormat(start_at)}`,
|
||||
and created_at >= ${getDateFormat(startAt)}`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,20 +9,20 @@ export async function getPageviews(...args) {
|
|||
});
|
||||
}
|
||||
|
||||
async function relationalQuery(websites, start_at) {
|
||||
async function relationalQuery(websites, startAt) {
|
||||
return prisma.client.pageview.findMany({
|
||||
where: {
|
||||
websiteId: {
|
||||
in: websites,
|
||||
},
|
||||
createdAt: {
|
||||
gte: start_at,
|
||||
gte: startAt,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(websites, start_at) {
|
||||
async function clickhouseQuery(websites, startAt) {
|
||||
const { rawQuery, getCommaSeparatedStringFormat } = clickhouse;
|
||||
|
||||
return rawQuery(
|
||||
|
|
@ -38,6 +38,6 @@ async function clickhouseQuery(websites, start_at) {
|
|||
? `website_id in (${getCommaSeparatedStringFormat(websites)})`
|
||||
: '0 = 0'
|
||||
}
|
||||
and created_at >= ${clickhouse.getDateFormat(start_at)}`,
|
||||
and created_at >= ${clickhouse.getDateFormat(startAt)}`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export async function getSessions(...args) {
|
|||
});
|
||||
}
|
||||
|
||||
async function relationalQuery(websites, start_at) {
|
||||
async function relationalQuery(websites, startAt) {
|
||||
return prisma.client.session.findMany({
|
||||
where: {
|
||||
...(websites && websites.length > 0
|
||||
|
|
@ -20,13 +20,13 @@ async function relationalQuery(websites, start_at) {
|
|||
}
|
||||
: {}),
|
||||
createdAt: {
|
||||
gte: start_at,
|
||||
gte: startAt,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(websites, start_at) {
|
||||
async function clickhouseQuery(websites, startAt) {
|
||||
const { rawQuery, getDateFormat, getCommaSeparatedStringFormat } = clickhouse;
|
||||
|
||||
return rawQuery(
|
||||
|
|
@ -47,6 +47,6 @@ async function clickhouseQuery(websites, start_at) {
|
|||
? `website_id in (${getCommaSeparatedStringFormat(websites)})`
|
||||
: '0 = 0'
|
||||
}
|
||||
and created_at >= ${getDateFormat(start_at)}`,
|
||||
and created_at >= ${getDateFormat(startAt)}`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue