mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-27 04:45:54 +01:00
Always record string.
This commit is contained in:
parent
9ec2701228
commit
1bdaf4aca2
@ -61,8 +61,8 @@ async function getProducer(): Promise<Producer> {
|
|||||||
return producer;
|
return producer;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDateFormat(date): string {
|
function getDateFormat(date, format?): string {
|
||||||
return dateFormat(date, 'UTC:yyyy-mm-dd HH:MM:ss');
|
return dateFormat(date, format ? format : 'UTC:yyyy-mm-dd HH:MM:ss');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendMessage(
|
async function sendMessage(
|
||||||
|
@ -36,13 +36,8 @@ async function relationalQuery(data: {
|
|||||||
id: uuid(),
|
id: uuid(),
|
||||||
websiteEventId: eventId,
|
websiteEventId: eventId,
|
||||||
websiteId,
|
websiteId,
|
||||||
key: a.key,
|
eventKey: a.key,
|
||||||
stringValue:
|
stringValue: a.value.toString(),
|
||||||
a.dynamicDataType === DATA_TYPE.string ||
|
|
||||||
a.dynamicDataType === DATA_TYPE.boolean ||
|
|
||||||
a.dynamicDataType === DATA_TYPE.array
|
|
||||||
? a.value
|
|
||||||
: null,
|
|
||||||
numericValue: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
|
numericValue: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
|
||||||
dateValue: a.dynamicDataType === DATA_TYPE.date ? new Date(a.value) : null,
|
dateValue: a.dynamicDataType === DATA_TYPE.date ? new Date(a.value) : null,
|
||||||
dataType: a.dynamicDataType,
|
dataType: a.dynamicDataType,
|
||||||
@ -76,11 +71,7 @@ async function clickhouseQuery(data: {
|
|||||||
event_name: eventName,
|
event_name: eventName,
|
||||||
event_key: a.key,
|
event_key: a.key,
|
||||||
string_value:
|
string_value:
|
||||||
a.dynamicDataType === DATA_TYPE.string ||
|
a.dynamicDataType === DATA_TYPE.date ? getDateFormat(a.value, 'isoDateTime') : a.value,
|
||||||
a.dynamicDataType === DATA_TYPE.boolean ||
|
|
||||||
a.dynamicDataType === DATA_TYPE.array
|
|
||||||
? a.value
|
|
||||||
: null,
|
|
||||||
number_value: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
|
number_value: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
|
||||||
date_value: a.dynamicDataType === DATA_TYPE.date ? getDateFormat(a.value) : null,
|
date_value: a.dynamicDataType === DATA_TYPE.date ? getDateFormat(a.value) : null,
|
||||||
data_type: a.dynamicDataType,
|
data_type: a.dynamicDataType,
|
||||||
|
Loading…
Reference in New Issue
Block a user