integration with parcoursmob
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 2m23s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 2m23s
This commit is contained in:
@@ -68,7 +68,6 @@ func NewPostgresqlStorage(cfg *viper.Viper) (PostgresqlStorage, error) {
|
||||
}
|
||||
|
||||
func (s PostgresqlStorage) CreateRegularRoutes(routes []*geojson.FeatureCollection) error {
|
||||
|
||||
log.Debug().Msg("Postgresql Storage - CreateRegularRoutes")
|
||||
|
||||
tx, err := s.DbConnection.Begin()
|
||||
@@ -175,6 +174,15 @@ func (s PostgresqlStorage) GetUserRegularRoutes(userid string) ([]*geojson.Featu
|
||||
return results, nil
|
||||
}
|
||||
|
||||
func (s PostgresqlStorage) DeleteRegularRoutes(ids []string) error {
|
||||
req := fmt.Sprintf(`delete from %s where id in $1`, s.Tables["regular_routes"])
|
||||
_, err := s.DbConnection.Exec(req, ids)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("error in postgresql request - delete regular routes")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (s PostgresqlStorage) GetDriverRegularRoutesForTile(day string, gridId int64) (regular_routes []*geojson.FeatureCollection, err error) {
|
||||
req := fmt.Sprintf(`select id, route
|
||||
from %s inner join %s on id = route_id
|
||||
@@ -434,8 +442,8 @@ func (s PostgresqlStorage) StoreRouteSchedules(journeys []internal.PlannedRouteS
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (s PostgresqlStorage) GetRouteSchedule(id string) (*internal.PlannedRouteSchedule, error) {
|
||||
req := fmt.Sprintf("select data from %s where id = $1", s.Tables["journeys_cache"])
|
||||
var jsonjourney []byte
|
||||
|
||||
Reference in New Issue
Block a user