Remove snake_case.
This commit is contained in:
@@ -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)}`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user