mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Updated Clickhouse number handling. Removed number formatting.
This commit is contained in:
parent
caa9da9166
commit
04e0b33622
15 changed files with 23 additions and 145 deletions
|
|
@ -85,17 +85,7 @@ async function clickhouseQuery(
|
|||
limit 500
|
||||
`,
|
||||
params,
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return {
|
||||
eventName: a.eventName,
|
||||
propertyName: a.propertyName,
|
||||
dataType: Number(a.dataType),
|
||||
propertyValue: a.propertyValue,
|
||||
total: Number(a.total),
|
||||
};
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
return rawQuery(
|
||||
|
|
@ -113,14 +103,5 @@ async function clickhouseQuery(
|
|||
limit 500
|
||||
`,
|
||||
params,
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return {
|
||||
eventName: a.eventName,
|
||||
propertyName: a.propertyName,
|
||||
dataType: Number(a.dataType),
|
||||
total: Number(a.total),
|
||||
};
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,13 +64,5 @@ async function clickhouseQuery(
|
|||
limit 500
|
||||
`,
|
||||
params,
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return {
|
||||
eventName: a.eventName,
|
||||
propertyName: a.propertyName,
|
||||
total: Number(a.total),
|
||||
};
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export async function getEventDataStats(
|
|||
return runQuery({
|
||||
[PRISMA]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
}).then(results => results[0]);
|
||||
}).then(results => results?.[0]);
|
||||
}
|
||||
|
||||
async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||
|
|
@ -68,13 +68,5 @@ async function clickhouseQuery(
|
|||
) as t
|
||||
`,
|
||||
params,
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return {
|
||||
events: Number(a.events),
|
||||
properties: Number(a.properties),
|
||||
records: Number(a.records),
|
||||
};
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,5 @@ function clickhouseQuery(
|
|||
startDate,
|
||||
endDate,
|
||||
},
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return { websiteId: a.websiteId, count: Number(a.count) };
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,12 +66,5 @@ async function clickhouseQuery(
|
|||
limit 100
|
||||
`,
|
||||
params,
|
||||
).then(result => {
|
||||
return Object.values(result).map((a: any) => {
|
||||
return {
|
||||
...a,
|
||||
total: Number(a.total),
|
||||
};
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue