derhuerst/match-gtfs-rt-to-gtfs

allow customising the DB schema

Open

#8 geöffnet am 16. Feb. 2024

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1 Fork)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (5 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

This use case has been brought up in https://github.com/derhuerst/berlin-gtfs-rt-server/issues/9.

berlin-gtfs-rt-server uses hafas-gtfs-rt-feed underneath, which in turn uses gtfs-via-postgres & match-gtfs-rt-to-gtfs. The former already supports using a schema other than public, but match-gtfs-rt-to-gtfs doesn't support it yet.

Two places would have to be adapted:

  • The build-index command needs a new option (e.g. --db-schema).
  • The actual matching logic (index.js) needs a new option (e.g. dbSchema).

The name of the schema should be added to the DB queries in a secure manner, e.g. by using pg-format.

Contributor Guide