mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
update long numbers
This commit is contained in:
parent
0bdab474de
commit
842b0664c7
@ -9,6 +9,7 @@ enum ColumnType {
|
||||
Decimal = 'Decimal',
|
||||
ArrayNumber = 'Array of Numbers',
|
||||
ArrayText = 'Array of Text',
|
||||
LongNumber = 'Long Number',
|
||||
}
|
||||
|
||||
export default ColumnType;
|
||||
|
@ -249,6 +249,10 @@ export default class StatementGenerator<TBaseModel extends AnalyticsBaseModel> {
|
||||
.join(', ')})`;
|
||||
}
|
||||
|
||||
if(column.type === TableColumnType.JSON) {
|
||||
value = `'${JSON.stringify(value)}'`;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -395,6 +399,10 @@ export default class StatementGenerator<TBaseModel extends AnalyticsBaseModel> {
|
||||
return 'DateTime';
|
||||
}
|
||||
|
||||
if (type === TableColumnType.JSON) {
|
||||
return 'JSON';
|
||||
}
|
||||
|
||||
if (type === TableColumnType.NestedModel) {
|
||||
return 'Nested';
|
||||
}
|
||||
@ -407,6 +415,10 @@ export default class StatementGenerator<TBaseModel extends AnalyticsBaseModel> {
|
||||
return 'Array(String)';
|
||||
}
|
||||
|
||||
if(type === TableColumnType.LongNumber) {
|
||||
return 'Int128';
|
||||
}
|
||||
|
||||
throw new BadDataException('Unknown column type: ' + type);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ export default class Log extends AnalyticsBaseModel {
|
||||
title: 'Time (in Unix Nano)',
|
||||
description: 'When was the log created?',
|
||||
required: true,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
|
@ -68,7 +68,7 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
title: 'Time (in Unix Nano)',
|
||||
description: 'When did the Metric happen?',
|
||||
required: false,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
@ -76,7 +76,7 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
title: 'Start Time (in Unix Nano)',
|
||||
description: 'When did the Metric happen?',
|
||||
required: false,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
|
@ -68,7 +68,7 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
title: 'Time (in Unix Nano)',
|
||||
description: 'When did the Metric happen?',
|
||||
required: false,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
@ -76,7 +76,7 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
title: 'Start Time (in Unix Nano)',
|
||||
description: 'When did the Metric happen?',
|
||||
required: true,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
|
@ -151,7 +151,7 @@ export default class Span extends AnalyticsBaseModel {
|
||||
title: 'Start Time in Unix Nano',
|
||||
description: 'When did the span start?',
|
||||
required: false,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
@ -159,7 +159,7 @@ export default class Span extends AnalyticsBaseModel {
|
||||
title: 'End Time',
|
||||
description: 'When did the span end?',
|
||||
required: false,
|
||||
type: TableColumnType.Number,
|
||||
type: TableColumnType.LongNumber,
|
||||
}),
|
||||
|
||||
new AnalyticsTableColumn({
|
||||
|
Loading…
Reference in New Issue
Block a user