@tmlmobilidade/databases 20260513.1439.37 → 20260513.1602.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,9 +9,9 @@ declare class SimplifiedVehicleEventsNewClass extends ClickHouseInterfaceTemplat
9
9
  private static _instance;
10
10
  readonly databaseName = "operation";
11
11
  readonly engine: ClickHouseTableEngine;
12
- readonly orderBy = "(trip_id, vehicle_id, agency_id, created_at)";
12
+ readonly orderBy = "(operational_date, trip_id, vehicle_id, agency_id, created_at)";
13
13
  readonly partitionBy = "toYYYYMM(fromUnixTimestamp64Milli(created_at))";
14
- readonly primaryKey = "(trip_id, vehicle_id)";
14
+ readonly primaryKey = "(operational_date, trip_id, vehicle_id)";
15
15
  readonly schema: ClickHouseSchema<{
16
16
  _id: string;
17
17
  created_at: number & {
@@ -27,6 +27,9 @@ declare class SimplifiedVehicleEventsNewClass extends ClickHouseInterfaceTemplat
27
27
  stop_id: string | null;
28
28
  trip_id: string;
29
29
  vehicle_id: string;
30
+ operational_date: string & {
31
+ __brand: "OperationalDate";
32
+ };
30
33
  bearing: number | null;
31
34
  odometer: number | null;
32
35
  speed: number | null;
@@ -12,6 +12,7 @@ const tableSchema = {
12
12
  created_at: { type: 'Int64' },
13
13
  latitude: { type: 'Float64' },
14
14
  longitude: { type: 'Float64' },
15
+ operational_date: { type: 'Date' },
15
16
  received_at: { type: 'Int64' },
16
17
  trip_id: { type: 'String' },
17
18
  vehicle_id: { type: 'String' },
@@ -32,9 +33,9 @@ class SimplifiedVehicleEventsNewClass extends ClickHouseInterfaceTemplate {
32
33
  static _instance = null;
33
34
  databaseName = 'operation';
34
35
  engine = 'ReplacingMergeTree';
35
- orderBy = '(trip_id, vehicle_id, agency_id, created_at)';
36
+ orderBy = '(operational_date, trip_id, vehicle_id, agency_id, created_at)';
36
37
  partitionBy = 'toYYYYMM(fromUnixTimestamp64Milli(created_at))';
37
- primaryKey = '(trip_id, vehicle_id)';
38
+ primaryKey = '(operational_date, trip_id, vehicle_id)';
38
39
  schema = tableSchema;
39
40
  tableName = 'simplified_vehicle_events';
40
41
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/databases",
3
- "version": "20260513.1439.37",
3
+ "version": "20260513.1602.22",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"