@golemio/pid 5.4.2-dev.2276050736 → 5.4.2
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.
- package/db/example/00_clear_test_data.sql +0 -1
- package/db/example/03_ropidgtfs_dump.sql +38 -43
- package/db/example/14_nightDelays.sql +8 -17
- package/db/example/redis/publicDelayCompObjectMock.json +0 -7
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +0 -8
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.d.ts +0 -2
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +6 -4
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +0 -2
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +1 -9
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/index.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/index.js +0 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/index.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/interfaces/IPublicDepartureDto.d.ts +0 -5
- package/dist/integration-engine/ropid-gtfs/interfaces/TripModelInterfaces.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +0 -5
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +0 -4
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.d.ts +0 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +0 -13
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +3 -1
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/helpers/TransferBoardIconsResolver.d.ts +3 -1
- package/dist/output-gateway/pid/helpers/TransferBoardIconsResolver.js +33 -5
- package/dist/output-gateway/pid/helpers/TransferBoardIconsResolver.js.map +1 -1
- package/dist/output-gateway/pid/interfaces/IV4TransferDto.d.ts +1 -4
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +1 -2
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.d.ts +0 -32
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js +0 -34
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/models/precomputed/DeparturesModel.d.ts +0 -2
- package/dist/schema-definitions/ropid-gtfs/models/precomputed/DeparturesModel.js +0 -17
- package/dist/schema-definitions/ropid-gtfs/models/precomputed/DeparturesModel.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/models/precomputed/interfaces/IDeparturesModel.d.ts +0 -6
- package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IDelayComputationDto.d.ts +0 -1
- package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto.d.ts +0 -5
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema.js +0 -2
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.js +0 -31
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.js.map +1 -1
- package/docs/assets/pid_precomputed_erd.png +0 -0
- package/docs/assets/pid_preset_logs_erd.png +0 -0
- package/docs/implementation_documentation.md +4 -4
- package/docs/openapi-output.yaml +0 -2
- package/package.json +3 -3
- package/db/migrations/postgresql/20251229142106-use-gtfs-icons-in-transferboards.js +0 -53
- package/db/migrations/postgresql/20260119180905-add-precomputed-trip-connections.js +0 -53
- package/db/migrations/postgresql/sqls/20251229142106-use-gtfs-icons-in-transferboards-down.sql +0 -1
- package/db/migrations/postgresql/sqls/20251229142106-use-gtfs-icons-in-transferboards-up.sql +0 -1
- package/db/migrations/postgresql/sqls/20260119180905-add-precomputed-trip-connections-down.sql +0 -72
- package/db/migrations/postgresql/sqls/20260119180905-add-precomputed-trip-connections-up.sql +0 -91
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.d.ts +0 -6
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.js +0 -46
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.js.map +0 -1
- package/docs/assets/pid_preset_logs_and_static_erd.png +0 -0
|
@@ -55,8 +55,6 @@ DeparturesModel.attributeModel = {
|
|
|
55
55
|
last_stop_sequence: sequelize_1.DataTypes.SMALLINT,
|
|
56
56
|
last_stop_id: sequelize_1.DataTypes.STRING(30),
|
|
57
57
|
cis_stop_group_id: sequelize_1.DataTypes.INTEGER,
|
|
58
|
-
trip_headsign_icons: sequelize_1.DataTypes.TEXT,
|
|
59
|
-
trip_connections: sequelize_1.DataTypes.JSONB,
|
|
60
58
|
};
|
|
61
59
|
DeparturesModel.jsonSchema = {
|
|
62
60
|
type: "object",
|
|
@@ -156,21 +154,6 @@ DeparturesModel.jsonSchema = {
|
|
|
156
154
|
cis_stop_group_id: {
|
|
157
155
|
type: "integer",
|
|
158
156
|
},
|
|
159
|
-
trip_headsign_icons: {
|
|
160
|
-
type: "string",
|
|
161
|
-
},
|
|
162
|
-
trip_connections: {
|
|
163
|
-
type: "array",
|
|
164
|
-
items: {
|
|
165
|
-
type: "object",
|
|
166
|
-
properties: {
|
|
167
|
-
from_trip_id: { type: "string" },
|
|
168
|
-
max_wait_sec: { type: "number" },
|
|
169
|
-
},
|
|
170
|
-
additionalProperties: false,
|
|
171
|
-
required: ["from_trip_id", "max_wait_sec"],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
157
|
},
|
|
175
158
|
required: ["stop_sequence", "stop_id", "trip_id", "trip_headsign"],
|
|
176
159
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturesModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/models/precomputed/DeparturesModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AACxF,uEAA+D;AAG/D,MAAa,eAAgB,SAAQ,iBAAsB;;AAA3D,
|
|
1
|
+
{"version":3,"file":"DeparturesModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/models/precomputed/DeparturesModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AACxF,uEAA+D;AAG/D,MAAa,eAAgB,SAAQ,iBAAsB;;AAA3D,0CA0LC;AAzLiB,0BAAU,GAAG,kC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AAQ;SACjB;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;SACjB;QACD,mBAAmB,EAAE;YACjB,IAAI,EAAE,SAAS;SAClB;QACD,iBAAiB,EAAE;YACf,IAAI,EAAE,SAAS;SAClB;QACD,iBAAiB,EAAE;YACf,IAAI,EAAE,SAAS;SAClB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;SACjB;QACD,eAAe,EAAE;YACb,IAAI,EAAE,QAAQ;SACjB;QACD,qBAAqB,EAAE;YACnB,IAAI,EAAE,SAAS;SAClB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,gBAAgB,EAAE;YACd,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,uBAAuB,EAAE;YACrB,IAAI,EAAE,QAAQ;SACjB;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,SAAS;SAClB;QACD,YAAY,EAAE;YACV,IAAI,EAAE,QAAQ;SACjB;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,SAAS;SAClB;QACD,YAAY,EAAE;YACV,IAAI,EAAE,QAAQ;SACjB;QACD,iBAAiB,EAAE;YACf,IAAI,EAAE,SAAS;SAClB;KACJ;IACD,QAAQ,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC;CACrE,CAAC"}
|
package/dist/schema-definitions/ropid-gtfs/models/precomputed/interfaces/IDeparturesModel.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { GtfsStopWheelchairBoardingEnum, GtfsTripWheelchairAccessEnum } from "../../../../../helpers/AccessibilityEnums";
|
|
2
2
|
import { GTFSRouteTypeEnum } from "../../../../../helpers/RouteTypeEnums";
|
|
3
|
-
export interface ITripConnection {
|
|
4
|
-
from_trip_id: string;
|
|
5
|
-
max_wait_sec: number;
|
|
6
|
-
}
|
|
7
3
|
export interface IDeparturesModel {
|
|
8
4
|
stop_sequence: number;
|
|
9
5
|
stop_headsign: string | null;
|
|
@@ -36,6 +32,4 @@ export interface IDeparturesModel {
|
|
|
36
32
|
last_stop_sequence: number | null;
|
|
37
33
|
last_stop_id: string | null;
|
|
38
34
|
cis_stop_group_id: number | null;
|
|
39
|
-
trip_headsign_icons: string | null;
|
|
40
|
-
trip_connections: ITripConnection[] | null;
|
|
41
35
|
}
|
package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto.d.ts
CHANGED
|
@@ -9,9 +9,4 @@ export interface IPublicGtfsDepartureCacheDto {
|
|
|
9
9
|
stop_sequence: number;
|
|
10
10
|
platform_code: string | null;
|
|
11
11
|
trip_headsign: string;
|
|
12
|
-
trip_headsign_icons: string | null;
|
|
13
|
-
connections: Array<{
|
|
14
|
-
from_trip_id: string;
|
|
15
|
-
max_wait_sec: number;
|
|
16
|
-
}> | null;
|
|
17
12
|
}
|
|
@@ -21,7 +21,6 @@ const delayComputationDtoSchema = {
|
|
|
21
21
|
arrival_time_seconds: { type: "integer" },
|
|
22
22
|
departure_time_seconds: { type: "integer" },
|
|
23
23
|
is_no_stop_waypoint: { type: "boolean" },
|
|
24
|
-
stop_icons: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
25
24
|
stop: {
|
|
26
25
|
type: "object",
|
|
27
26
|
properties: {
|
|
@@ -43,7 +42,6 @@ const delayComputationDtoSchema = {
|
|
|
43
42
|
"stop_sequence",
|
|
44
43
|
"arrival_time_seconds",
|
|
45
44
|
"departure_time_seconds",
|
|
46
|
-
"stop_icons",
|
|
47
45
|
],
|
|
48
46
|
},
|
|
49
47
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DelayComputationDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,yBAAyB,GAAyC;IACpE,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,2BAA2B;IAClC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,UAAU,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAChC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAClC,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACvC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;oBAChF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC3B,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAClC,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACzC,sBAAsB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC3C,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACxC,
|
|
1
|
+
{"version":3,"file":"DelayComputationDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,yBAAyB,GAAyC;IACpE,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,2BAA2B;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AoB;oBACpB,qBAAqB;oBACrB,wBAAwB;iBAC3B;aACJ;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACxB,MAAM,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;wBAC/C,QAAQ,EAAE,CAAC;wBACX,QAAQ,EAAE,CAAC;qBACd;iBACJ;gBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAC/B;SACJ;KACJ;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,QAAQ,CAAC;CACxE,CAAC;AAEoC,8DAAyB"}
|
|
@@ -51,37 +51,6 @@ const publicGtfsDepartureDtoSchema = {
|
|
|
51
51
|
trip_headsign: {
|
|
52
52
|
type: "string",
|
|
53
53
|
},
|
|
54
|
-
trip_headsign_icons: {
|
|
55
|
-
oneOf: [
|
|
56
|
-
{
|
|
57
|
-
type: "string",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
type: "null",
|
|
61
|
-
nullable: true,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
connections: {
|
|
66
|
-
oneOf: [
|
|
67
|
-
{
|
|
68
|
-
type: "array",
|
|
69
|
-
items: {
|
|
70
|
-
type: "object",
|
|
71
|
-
properties: {
|
|
72
|
-
from_trip_id: { type: "string" },
|
|
73
|
-
max_wait_sec: { type: "number" },
|
|
74
|
-
},
|
|
75
|
-
additionalProperties: false,
|
|
76
|
-
required: ["from_trip_id", "max_wait_sec"],
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: "null",
|
|
81
|
-
nullable: true,
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
54
|
},
|
|
86
55
|
required: [
|
|
87
56
|
"stop_id",
|
package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicGtfsDepartureDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,GAAmD;IACjF,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,kBAAkB,EAAE;gBAChB,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,QAAQ;aACjB;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;aACjB;
|
|
1
|
+
{"version":3,"file":"PublicGtfsDepartureDtoSchema.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.ts"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,GAAmD;IACjF,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,kBAAkB,EAAE;gBAChB,IAAI,EAAE,QAAQ;aACjB;YACD,gBAAgB,EAAE;gBACd,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,gBAAgB,EAAE;gBACd,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,QAAQ;aACjB;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,QAAQ,EAAE;YACN,SAAS;YACT,oBAAoB;YACpB,kBAAkB;YAClB,kBAAkB;YAClB,YAAY;YACZ,SAAS;YACT,eAAe;YACf,eAAe;YACf,eAAe;SAClB;KACJ;CACJ,CAAC;AACuC,oEAA4B"}
|
|
Binary file
|
|
Binary file
|
|
@@ -1239,10 +1239,10 @@ Worker má na starost stahování VYMI (JIS) událostí a infotextů, jejich tra
|
|
|
1239
1239
|
|
|
1240
1240
|
- GTFS JŘ<br/>
|
|
1241
1241
|

|
|
1242
|
-
- GTFS předpočítatné tabulky<br/>
|
|
1243
|
-

|
|
1244
|
+
- Preset logy<br/>
|
|
1245
|
+

|
|
1246
1246
|
- VYMI<br/>
|
|
1247
1247
|

|
|
1248
1248
|
- Polohy vozů (tabulky) <br/>
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -1468,7 +1468,6 @@ paths:
|
|
|
1468
1468
|
nullable: true
|
|
1469
1469
|
icons:
|
|
1470
1470
|
$ref: "#/components/schemas/Icons"
|
|
1471
|
-
description: "Icons for possible transfer types on the stop"
|
|
1472
1471
|
departures:
|
|
1473
1472
|
type: array
|
|
1474
1473
|
description: |
|
|
@@ -1541,7 +1540,6 @@ paths:
|
|
|
1541
1540
|
example: false
|
|
1542
1541
|
icons:
|
|
1543
1542
|
$ref: "#/components/schemas/Icons"
|
|
1544
|
-
description: "Icons for possible transfer types on last stop of the trip (connected to headsign of the trip)"
|
|
1545
1543
|
substitution_text:
|
|
1546
1544
|
type: object
|
|
1547
1545
|
required:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "5.4.2
|
|
3
|
+
"version": "5.4.2",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@commitlint/cli": "^11.0.0",
|
|
39
39
|
"@commitlint/config-conventional": "^11.0.0",
|
|
40
40
|
"@golemio/cli": "1.11.0",
|
|
41
|
-
"@golemio/core": "3.0.
|
|
41
|
+
"@golemio/core": "3.0.2",
|
|
42
42
|
"@golemio/db-common": "1.2.1",
|
|
43
43
|
"@golemio/eslint-config": "1.1.2",
|
|
44
44
|
"@types/chai": "4.2.3",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@golemio/core": "^3.0.1-dev.2 || ^3.0.0 || ^2.0.1"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.
|
|
80
|
+
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.5",
|
|
81
81
|
"@turf/turf": "^6.5.0",
|
|
82
82
|
"cheap-ruler": "^3.0.2",
|
|
83
83
|
"csv-parser": "^3.0.0",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dbm;
|
|
4
|
-
var type;
|
|
5
|
-
var seed;
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var path = require('path');
|
|
8
|
-
var Promise;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
-
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
-
*/
|
|
14
|
-
exports.setup = function(options, seedLink) {
|
|
15
|
-
dbm = options.dbmigrate;
|
|
16
|
-
type = dbm.dataType;
|
|
17
|
-
seed = seedLink;
|
|
18
|
-
Promise = options.Promise;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.up = function(db) {
|
|
22
|
-
var filePath = path.join(__dirname, 'sqls', '20251229142106-use-gtfs-icons-in-transferboards-up.sql');
|
|
23
|
-
return new Promise( function( resolve, reject ) {
|
|
24
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
-
if (err) return reject(err);
|
|
26
|
-
console.log('received data: ' + data);
|
|
27
|
-
|
|
28
|
-
resolve(data);
|
|
29
|
-
});
|
|
30
|
-
})
|
|
31
|
-
.then(function(data) {
|
|
32
|
-
return db.runSql(data);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.down = function(db) {
|
|
37
|
-
var filePath = path.join(__dirname, 'sqls', '20251229142106-use-gtfs-icons-in-transferboards-down.sql');
|
|
38
|
-
return new Promise( function( resolve, reject ) {
|
|
39
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
-
if (err) return reject(err);
|
|
41
|
-
console.log('received data: ' + data);
|
|
42
|
-
|
|
43
|
-
resolve(data);
|
|
44
|
-
});
|
|
45
|
-
})
|
|
46
|
-
.then(function(data) {
|
|
47
|
-
return db.runSql(data);
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports._meta = {
|
|
52
|
-
"version": 1
|
|
53
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dbm;
|
|
4
|
-
var type;
|
|
5
|
-
var seed;
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var path = require('path');
|
|
8
|
-
var Promise;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
-
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
-
*/
|
|
14
|
-
exports.setup = function(options, seedLink) {
|
|
15
|
-
dbm = options.dbmigrate;
|
|
16
|
-
type = dbm.dataType;
|
|
17
|
-
seed = seedLink;
|
|
18
|
-
Promise = options.Promise;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.up = function(db) {
|
|
22
|
-
var filePath = path.join(__dirname, 'sqls', '20260119180905-add-precomputed-trip-connections-up.sql');
|
|
23
|
-
return new Promise( function( resolve, reject ) {
|
|
24
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
-
if (err) return reject(err);
|
|
26
|
-
console.log('received data: ' + data);
|
|
27
|
-
|
|
28
|
-
resolve(data);
|
|
29
|
-
});
|
|
30
|
-
})
|
|
31
|
-
.then(function(data) {
|
|
32
|
-
return db.runSql(data);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.down = function(db) {
|
|
37
|
-
var filePath = path.join(__dirname, 'sqls', '20260119180905-add-precomputed-trip-connections-down.sql');
|
|
38
|
-
return new Promise( function( resolve, reject ) {
|
|
39
|
-
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
-
if (err) return reject(err);
|
|
41
|
-
console.log('received data: ' + data);
|
|
42
|
-
|
|
43
|
-
resolve(data);
|
|
44
|
-
});
|
|
45
|
-
})
|
|
46
|
-
.then(function(data) {
|
|
47
|
-
return db.runSql(data);
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports._meta = {
|
|
52
|
-
"version": 1
|
|
53
|
-
};
|
package/db/migrations/postgresql/sqls/20251229142106-use-gtfs-icons-in-transferboards-down.sql
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE ropidgtfs_precomputed_departures DROP COLUMN trip_headsign_icons;
|
package/db/migrations/postgresql/sqls/20251229142106-use-gtfs-icons-in-transferboards-up.sql
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE ropidgtfs_precomputed_departures ADD COLUMN trip_headsign_icons TEXT;
|
package/db/migrations/postgresql/sqls/20260119180905-add-precomputed-trip-connections-down.sql
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
ALTER TABLE ropidgtfs_precomputed_departures DROP COLUMN trip_connections;
|
|
2
|
-
|
|
3
|
-
-- Update procedures for working with tmp tables
|
|
4
|
-
|
|
5
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_cleanoldtables()
|
|
6
|
-
LANGUAGE plpgsql
|
|
7
|
-
SET search_path from CURRENT
|
|
8
|
-
AS $procedure$
|
|
9
|
-
begin
|
|
10
|
-
drop table if exists "ropidgtfs_agency_old";
|
|
11
|
-
drop table if exists "ropidgtfs_calendar_old";
|
|
12
|
-
drop table if exists "ropidgtfs_calendar_dates_old";
|
|
13
|
-
drop table if exists "ropidgtfs_shapes_old";
|
|
14
|
-
drop table if exists "ropidgtfs_stop_times_old";
|
|
15
|
-
drop table if exists "ropidgtfs_stops_old";
|
|
16
|
-
drop table if exists "ropidgtfs_routes_old";
|
|
17
|
-
drop table if exists "ropidgtfs_route_sub_agencies_old";
|
|
18
|
-
drop table if exists "ropidgtfs_transfers_old";
|
|
19
|
-
drop table if exists "ropidgtfs_trips_old";
|
|
20
|
-
drop table if exists "ropidgtfs_cis_stops_old";
|
|
21
|
-
drop table if exists "ropidgtfs_cis_stop_groups_old";
|
|
22
|
-
drop table if exists "ropidgtfs_run_numbers_old";
|
|
23
|
-
drop table if exists "ropidgtfs_ois_old";
|
|
24
|
-
drop table if exists "ropidgtfs_precomputed_services_calendar_old";
|
|
25
|
-
drop table if exists "ropidgtfs_precomputed_minmax_stop_sequences_old";
|
|
26
|
-
drop table if exists "ropidgtfs_precomputed_trip_schedule_old";
|
|
27
|
-
end
|
|
28
|
-
$procedure$
|
|
29
|
-
;
|
|
30
|
-
|
|
31
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_cleantmptables()
|
|
32
|
-
LANGUAGE plpgsql
|
|
33
|
-
SET search_path from CURRENT
|
|
34
|
-
AS $procedure$
|
|
35
|
-
begin
|
|
36
|
-
drop table if exists "ropidgtfs_agency_tmp";
|
|
37
|
-
drop table if exists "ropidgtfs_calendar_tmp";
|
|
38
|
-
drop table if exists "ropidgtfs_calendar_dates_tmp";
|
|
39
|
-
drop table if exists "ropidgtfs_shapes_tmp";
|
|
40
|
-
drop table if exists "ropidgtfs_stop_times_tmp";
|
|
41
|
-
drop table if exists "ropidgtfs_stops_tmp";
|
|
42
|
-
drop table if exists "ropidgtfs_routes_tmp";
|
|
43
|
-
drop table if exists "ropidgtfs_route_sub_agencies_tmp";
|
|
44
|
-
drop table if exists "ropidgtfs_transfers_tmp";
|
|
45
|
-
drop table if exists "ropidgtfs_trips_tmp";
|
|
46
|
-
drop table if exists "ropidgtfs_cis_stops_tmp";
|
|
47
|
-
drop table if exists "ropidgtfs_cis_stop_groups_tmp";
|
|
48
|
-
drop table if exists "ropidgtfs_run_numbers_tmp";
|
|
49
|
-
drop table if exists "ropidgtfs_ois_tmp";
|
|
50
|
-
drop table if exists "ropidgtfs_precomputed_services_calendar_tmp";
|
|
51
|
-
drop table if exists "ropidgtfs_precomputed_minmax_stop_sequences_tmp";
|
|
52
|
-
drop table if exists "ropidgtfs_precomputed_trip_schedule_tmp";
|
|
53
|
-
end
|
|
54
|
-
$procedure$
|
|
55
|
-
;
|
|
56
|
-
|
|
57
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_preparePrecomputedTmpTables()
|
|
58
|
-
LANGUAGE plpgsql
|
|
59
|
-
SET search_path FROM CURRENT
|
|
60
|
-
AS $procedure$
|
|
61
|
-
begin
|
|
62
|
-
create table "ropidgtfs_precomputed_services_calendar_tmp" (like "ropidgtfs_precomputed_services_calendar" including all);
|
|
63
|
-
create table "ropidgtfs_precomputed_minmax_stop_sequences_tmp" (like "ropidgtfs_precomputed_minmax_stop_sequences" including all);
|
|
64
|
-
create table "ropidgtfs_precomputed_trip_schedule_tmp" (like "ropidgtfs_precomputed_trip_schedule" including all);
|
|
65
|
-
end
|
|
66
|
-
$procedure$;
|
|
67
|
-
|
|
68
|
-
-- Drop created tables (along with their constraints and indexes)
|
|
69
|
-
|
|
70
|
-
DROP TABLE IF EXISTS ropidgtfs_precomputed_trip_connections_actual;
|
|
71
|
-
DROP TABLE IF EXISTS ropidgtfs_precomputed_trip_connections_tmp;
|
|
72
|
-
DROP TABLE IF EXISTS ropidgtfs_precomputed_trip_connections;
|
package/db/migrations/postgresql/sqls/20260119180905-add-precomputed-trip-connections-up.sql
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
ALTER TABLE ropidgtfs_precomputed_departures ADD COLUMN trip_connections JSONB NULL;
|
|
2
|
-
|
|
3
|
-
-- Create parent table for precomputed trip connection at one stop with indexes
|
|
4
|
-
|
|
5
|
-
CREATE TABLE ropidgtfs_precomputed_trip_connections (
|
|
6
|
-
to_stop_id varchar(255) NOT NULL,
|
|
7
|
-
to_trip_id varchar(255) NOT NULL,
|
|
8
|
-
connections jsonb NOT NULL,
|
|
9
|
-
CONSTRAINT ropidgtfs_precomputed_trip_connections_pk PRIMARY KEY (to_stop_id, to_trip_id)
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
CREATE INDEX ropidgtfs_precomputed_trip_connections_to_stop_id_idx ON ropidgtfs_precomputed_trip_connections USING btree (to_stop_id);
|
|
13
|
-
CREATE INDEX ropidgtfs_precomputed_trip_connections_to_trip_id_idx ON ropidgtfs_precomputed_trip_connections USING btree (to_trip_id);
|
|
14
|
-
|
|
15
|
-
-- Create child (actual) table for precomputed stop/trip connections
|
|
16
|
-
|
|
17
|
-
CREATE TABLE ropidgtfs_precomputed_trip_connections_actual (
|
|
18
|
-
LIKE ropidgtfs_precomputed_trip_connections INCLUDING ALL
|
|
19
|
-
) INHERITS (ropidgtfs_precomputed_trip_connections);
|
|
20
|
-
|
|
21
|
-
-- Update procedures for working with tmp tables
|
|
22
|
-
|
|
23
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_preparePrecomputedTmpTables()
|
|
24
|
-
LANGUAGE plpgsql
|
|
25
|
-
SET search_path FROM CURRENT
|
|
26
|
-
AS $procedure$
|
|
27
|
-
begin
|
|
28
|
-
create table "ropidgtfs_precomputed_services_calendar_tmp" (like "ropidgtfs_precomputed_services_calendar" including all);
|
|
29
|
-
create table "ropidgtfs_precomputed_minmax_stop_sequences_tmp" (like "ropidgtfs_precomputed_minmax_stop_sequences" including all);
|
|
30
|
-
create table "ropidgtfs_precomputed_trip_schedule_tmp" (like "ropidgtfs_precomputed_trip_schedule" including all);
|
|
31
|
-
create table "ropidgtfs_precomputed_trip_connections_tmp" (like "ropidgtfs_precomputed_trip_connections" including all);
|
|
32
|
-
end
|
|
33
|
-
$procedure$;
|
|
34
|
-
|
|
35
|
-
-- Update procedures for working with old tables
|
|
36
|
-
|
|
37
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_cleanoldtables()
|
|
38
|
-
LANGUAGE plpgsql
|
|
39
|
-
SET search_path from CURRENT
|
|
40
|
-
AS $procedure$
|
|
41
|
-
begin
|
|
42
|
-
drop table if exists "ropidgtfs_agency_old";
|
|
43
|
-
drop table if exists "ropidgtfs_calendar_old";
|
|
44
|
-
drop table if exists "ropidgtfs_calendar_dates_old";
|
|
45
|
-
drop table if exists "ropidgtfs_shapes_old";
|
|
46
|
-
drop table if exists "ropidgtfs_stop_times_old";
|
|
47
|
-
drop table if exists "ropidgtfs_stops_old";
|
|
48
|
-
drop table if exists "ropidgtfs_routes_old";
|
|
49
|
-
drop table if exists "ropidgtfs_route_sub_agencies_old";
|
|
50
|
-
drop table if exists "ropidgtfs_transfers_old";
|
|
51
|
-
drop table if exists "ropidgtfs_trips_old";
|
|
52
|
-
drop table if exists "ropidgtfs_cis_stops_old";
|
|
53
|
-
drop table if exists "ropidgtfs_cis_stop_groups_old";
|
|
54
|
-
drop table if exists "ropidgtfs_run_numbers_old";
|
|
55
|
-
drop table if exists "ropidgtfs_ois_old";
|
|
56
|
-
drop table if exists "ropidgtfs_precomputed_services_calendar_old";
|
|
57
|
-
drop table if exists "ropidgtfs_precomputed_minmax_stop_sequences_old";
|
|
58
|
-
drop table if exists "ropidgtfs_precomputed_trip_connections_old";
|
|
59
|
-
drop table if exists "ropidgtfs_precomputed_trip_schedule_old";
|
|
60
|
-
end
|
|
61
|
-
$procedure$
|
|
62
|
-
;
|
|
63
|
-
|
|
64
|
-
-- Update procedures for working with tmp tables
|
|
65
|
-
|
|
66
|
-
CREATE OR REPLACE PROCEDURE ropidgtfs_cleantmptables()
|
|
67
|
-
LANGUAGE plpgsql
|
|
68
|
-
SET search_path from CURRENT
|
|
69
|
-
AS $procedure$
|
|
70
|
-
begin
|
|
71
|
-
drop table if exists "ropidgtfs_agency_tmp";
|
|
72
|
-
drop table if exists "ropidgtfs_calendar_tmp";
|
|
73
|
-
drop table if exists "ropidgtfs_calendar_dates_tmp";
|
|
74
|
-
drop table if exists "ropidgtfs_shapes_tmp";
|
|
75
|
-
drop table if exists "ropidgtfs_stop_times_tmp";
|
|
76
|
-
drop table if exists "ropidgtfs_stops_tmp";
|
|
77
|
-
drop table if exists "ropidgtfs_routes_tmp";
|
|
78
|
-
drop table if exists "ropidgtfs_route_sub_agencies_tmp";
|
|
79
|
-
drop table if exists "ropidgtfs_transfers_tmp";
|
|
80
|
-
drop table if exists "ropidgtfs_trips_tmp";
|
|
81
|
-
drop table if exists "ropidgtfs_cis_stops_tmp";
|
|
82
|
-
drop table if exists "ropidgtfs_cis_stop_groups_tmp";
|
|
83
|
-
drop table if exists "ropidgtfs_run_numbers_tmp";
|
|
84
|
-
drop table if exists "ropidgtfs_ois_tmp";
|
|
85
|
-
drop table if exists "ropidgtfs_precomputed_services_calendar_tmp";
|
|
86
|
-
drop table if exists "ropidgtfs_precomputed_minmax_stop_sequences_tmp";
|
|
87
|
-
drop table if exists "ropidgtfs_precomputed_trip_connections_tmp";
|
|
88
|
-
drop table if exists "ropidgtfs_precomputed_trip_schedule_tmp";
|
|
89
|
-
end
|
|
90
|
-
$procedure$
|
|
91
|
-
;
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine/models";
|
|
2
|
-
import { SourceTableSuffixEnum } from "../../helpers/SourceTableSuffixEnum";
|
|
3
|
-
export declare class TripConnectionsRepository extends PostgresModel implements IModel {
|
|
4
|
-
constructor();
|
|
5
|
-
populate: (sourceTableSuffix: SourceTableSuffixEnum) => Promise<void>;
|
|
6
|
-
}
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TripConnectionsRepository = void 0;
|
|
4
|
-
const const_1 = require("../../../../schema-definitions/const");
|
|
5
|
-
const ropid_gtfs_1 = require("../../../../schema-definitions/ropid-gtfs");
|
|
6
|
-
const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
|
|
7
|
-
const models_1 = require("@golemio/core/dist/integration-engine/models");
|
|
8
|
-
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
9
|
-
const SourceTableSuffixEnum_1 = require("../../helpers/SourceTableSuffixEnum");
|
|
10
|
-
class TripConnectionsRepository extends models_1.PostgresModel {
|
|
11
|
-
constructor() {
|
|
12
|
-
super("TripConnectionsRepository", {
|
|
13
|
-
outputSequelizeAttributes: ropid_gtfs_1.RopidGTFS.tripConnections.outputSequelizeAttributes,
|
|
14
|
-
pgTableName: ropid_gtfs_1.RopidGTFS.tripConnections.pgTableName,
|
|
15
|
-
pgSchema: const_1.PG_SCHEMA,
|
|
16
|
-
savingType: "insertOnly",
|
|
17
|
-
attributesToRemove: ["id", "created_at", "updated_at"],
|
|
18
|
-
}, new golemio_validator_1.JSONSchemaValidator("TripConnectionsRepositoryValidator", ropid_gtfs_1.RopidGTFS.tripConnections.outputJsonSchema));
|
|
19
|
-
this.populate = async (sourceTableSuffix) => {
|
|
20
|
-
const sql = `
|
|
21
|
-
SELECT
|
|
22
|
-
to_stop_id,
|
|
23
|
-
to_trip_id,
|
|
24
|
-
JSONB_AGG(
|
|
25
|
-
JSON_BUILD_OBJECT(
|
|
26
|
-
'from_trip_id', from_trip_id,
|
|
27
|
-
'max_wait_sec', max_waiting_time
|
|
28
|
-
)
|
|
29
|
-
) AS "connections"
|
|
30
|
-
FROM "${const_1.PG_SCHEMA}".ropidgtfs_transfers${sourceTableSuffix}
|
|
31
|
-
WHERE "transfer_type" = '1'
|
|
32
|
-
GROUP BY "to_stop_id", "to_trip_id"
|
|
33
|
-
`;
|
|
34
|
-
try {
|
|
35
|
-
const tmpTable = ropid_gtfs_1.RopidGTFS.tripConnections.pgTableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
36
|
-
await this.sequelizeModel.sequelize.query(`INSERT INTO "${const_1.PG_SCHEMA}"."${tmpTable}" ${sql};`);
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
helpers_1.log.error(err);
|
|
40
|
-
throw err;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.TripConnectionsRepository = TripConnectionsRepository;
|
|
46
|
-
//# sourceMappingURL=TripConnectionsRepository.js.map
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TripConnectionsRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/TripConnectionsRepository.ts"],"names":[],"mappings":";;;AAAA,gEAAuC;AACvC,0EAA4C;AAC5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAClF,+EAA4E;AAE5E,MAAa,yBAA0B,SAAQ,sBAAa;IACxD;QACI,KAAK,CACD,2BAA2B,EAC3B;YACI,yBAAyB,EAAE,sBAAS,CAAC,eAAe,CAAC,yBAAyB;YAC9E,WAAW,EAAE,sBAAS,CAAC,eAAe,CAAC,WAAW;YAClD,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,oCAAoC,EAAE,sBAAS,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAC5G,CAAC;QAGC,aAAQ,GAAG,KAAK,EAAE,iBAAwC,EAAiB,EAAE;YAChF,MAAM,GAAG,GAAG;;;;;;;;;;oBAUA,iBAAS,wBAAwB,iBAAiB;;;SAG7D,CAAC;YAEF,IAAI,CAAC;gBACD,MAAM,QAAQ,GAAG,sBAAS,CAAC,eAAe,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEnF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC,gBAAgB,iBAAS,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;YACnG,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACX,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;YACd,CAAC;QACL,CAAC,CAAC;IA1BF,CAAC;CA2BJ;AAxCD,8DAwCC"}
|
|
Binary file
|