dbfinder

package
v0.0.0-...-94d593c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAXLIMIT = 100_000

Maximum query result limit

Functions

func AgencySelect

func AgencySelect(limit *int, after *model.Cursor, ids []int, active bool, permFilter *model.PermFilter, where *model.AgencyFilter) sq.SelectBuilder

func CensusGeographySelect

func CensusGeographySelect(param *model.CensusGeographyParam, entityIds []int) sq.SelectBuilder

func CensusValueSelect

func CensusValueSelect(param *model.CensusValueParam, geoids []string) sq.SelectBuilder

func FeedSelect

func FeedSelect(limit *int, after *model.Cursor, ids []int, permFilter *model.PermFilter, where *model.FeedFilter) sq.SelectBuilder

func FeedVersionGeometrySelect

func FeedVersionGeometrySelect(ids []int) sq.SelectBuilder

func FeedVersionSelect

func FeedVersionSelect(limit *int, after *model.Cursor, ids []int, permFilter *model.PermFilter, where *model.FeedVersionFilter) sq.SelectBuilder

func FeedVersionServiceLevelSelect

func FeedVersionServiceLevelSelect(limit *int, after *model.Cursor, ids []int, permFilter *model.PermFilter, where *model.FeedVersionServiceLevelFilter) sq.SelectBuilder

func In

func In[T any](col string, val []T) sq.Sqlizer

func OperatorSelect

func OperatorSelect(limit *int, after *model.Cursor, ids []int, permFilter *model.PermFilter, where *model.OperatorFilter) sq.SelectBuilder

func OperatorSelectBase

func OperatorSelectBase(distinct bool, where *model.OperatorFilter) sq.SelectBuilder

func OperatorsByAgencyID

func OperatorsByAgencyID(limit *int, after *model.Cursor, agencyIds []int) sq.SelectBuilder

func PathwaySelect

func PathwaySelect(limit *int, after *model.Cursor, ids []int, permFilter *model.PermFilter, where *model.PathwayFilter) sq.SelectBuilder

func PlaceSelect

func PlaceSelect(limit *int, after *model.Cursor, ids []int, level *model.PlaceAggregationLevel, permFilter *model.PermFilter, where *model.PlaceFilter) sq.SelectBuilder

func RouteSelect

func RouteSelect(limit *int, after *model.Cursor, ids []int, active bool, permFilter *model.PermFilter, where *model.RouteFilter) sq.SelectBuilder

func RouteStopBufferSelect

func RouteStopBufferSelect(param model.RouteStopBufferParam) sq.SelectBuilder

func StopDeparturesSelect

func StopDeparturesSelect(spairs []FVPair, where *model.StopTimeFilter) sq.SelectBuilder

func StopSelect

func StopSelect(limit *int, after *model.Cursor, ids []int, active bool, permFilter *model.PermFilter, where *model.StopFilter) sq.SelectBuilder

func StopTimeFilterExpand

func StopTimeFilterExpand(where *model.StopTimeFilter, fvsw *model.ServiceWindow) []*model.StopTimeFilter

func StopTimeSelect

func StopTimeSelect(tpairs []FVPair, spairs []FVPair, where *model.TripStopTimeFilter) sq.SelectBuilder

func TripSelect

func TripSelect(limit *int, after *model.Cursor, ids []int, active bool, permFilter *model.PermFilter, where *model.TripFilter, fvsw *model.ServiceWindow) sq.SelectBuilder

Types

type FVPair

type FVPair struct {
	EntityID      int
	FeedVersionID int
}

type FeedVersionGeometry

type FeedVersionGeometry struct {
	FeedVersionID int
	Geometry      *tt.Polygon
}

type Finder

type Finder struct {
	Clock clock.Clock
	// contains filtered or unexported fields
}

func NewFinder

func NewFinder(db sqlx.Ext) *Finder

func (*Finder) AgenciesByFeedVersionID

func (f *Finder) AgenciesByFeedVersionID(ctx context.Context, params []model.AgencyParam) ([][]*model.Agency, []error)

func (*Finder) AgenciesByID

func (f *Finder) AgenciesByID(ctx context.Context, ids []int) ([]*model.Agency, []error)

func (*Finder) AgenciesByOnestopID

func (f *Finder) AgenciesByOnestopID(ctx context.Context, params []model.AgencyParam) ([][]*model.Agency, []error)

func (*Finder) AgencyPlacesByAgencyID

func (f *Finder) AgencyPlacesByAgencyID(ctx context.Context, params []model.AgencyPlaceParam) ([][]*model.AgencyPlace, []error)

func (*Finder) CalendarDatesByServiceID

func (f *Finder) CalendarDatesByServiceID(ctx context.Context, params []model.CalendarDateParam) ([][]*model.CalendarDate, []error)

func (*Finder) CalendarsByID

func (f *Finder) CalendarsByID(ctx context.Context, ids []int) ([]*model.Calendar, []error)

func (*Finder) CensusFieldsByTableID

func (f *Finder) CensusFieldsByTableID(ctx context.Context, params []model.CensusFieldParam) ([][]*model.CensusField, []error)

func (*Finder) CensusGeographiesByEntityID

func (f *Finder) CensusGeographiesByEntityID(ctx context.Context, params []model.CensusGeographyParam) ([][]*model.CensusGeography, []error)

func (*Finder) CensusTableByID

func (f *Finder) CensusTableByID(ctx context.Context, ids []int) ([]*model.CensusTable, []error)

func (*Finder) CensusValuesByGeographyID

func (f *Finder) CensusValuesByGeographyID(ctx context.Context, params []model.CensusValueParam) ([][]*model.CensusValue, []error)

func (*Finder) DBX

func (f *Finder) DBX() sqlx.Ext

func (*Finder) FeedFetchesByFeedID

func (f *Finder) FeedFetchesByFeedID(ctx context.Context, params []model.FeedFetchParam) ([][]*model.FeedFetch, []error)

func (*Finder) FeedInfosByFeedVersionID

func (f *Finder) FeedInfosByFeedVersionID(ctx context.Context, params []model.FeedInfoParam) ([][]*model.FeedInfo, []error)

func (*Finder) FeedStatesByFeedID

func (f *Finder) FeedStatesByFeedID(ctx context.Context, ids []int) ([]*model.FeedState, []error)

func (*Finder) FeedVersionFileInfosByFeedVersionID

func (f *Finder) FeedVersionFileInfosByFeedVersionID(ctx context.Context, params []model.FeedVersionFileInfoParam) ([][]*model.FeedVersionFileInfo, []error)

func (*Finder) FeedVersionGeometryByID

func (f *Finder) FeedVersionGeometryByID(ctx context.Context, ids []int) ([]*tt.Polygon, []error)

func (*Finder) FeedVersionGtfsImportByFeedVersionID

func (f *Finder) FeedVersionGtfsImportByFeedVersionID(ctx context.Context, ids []int) ([]*model.FeedVersionGtfsImport, []error)

func (*Finder) FeedVersionServiceLevelsByFeedVersionID

func (f *Finder) FeedVersionServiceLevelsByFeedVersionID(ctx context.Context, params []model.FeedVersionServiceLevelParam) ([][]*model.FeedVersionServiceLevel, []error)

func (*Finder) FeedVersionServiceWindowByFeedVersionID

func (f *Finder) FeedVersionServiceWindowByFeedVersionID(ctx context.Context, ids []int) ([]*model.FeedVersionServiceWindow, []error)

func (*Finder) FeedVersionsByFeedID

func (f *Finder) FeedVersionsByFeedID(ctx context.Context, params []model.FeedVersionParam) ([][]*model.FeedVersion, []error)

func (*Finder) FeedVersionsByID

func (f *Finder) FeedVersionsByID(ctx context.Context, ids []int) ([]*model.FeedVersion, []error)

func (*Finder) FeedsByID

func (f *Finder) FeedsByID(ctx context.Context, ids []int) ([]*model.Feed, []error)

func (*Finder) FeedsByOperatorOnestopID

func (f *Finder) FeedsByOperatorOnestopID(ctx context.Context, params []model.FeedParam) ([][]*model.Feed, []error)

func (*Finder) FindAgencies

func (f *Finder) FindAgencies(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.AgencyFilter) ([]*model.Agency, error)

func (*Finder) FindFeedVersionServiceWindow

func (f *Finder) FindFeedVersionServiceWindow(ctx context.Context, fvid int) (*model.ServiceWindow, error)

func (*Finder) FindFeedVersions

func (f *Finder) FindFeedVersions(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.FeedVersionFilter) ([]*model.FeedVersion, error)

func (*Finder) FindFeeds

func (f *Finder) FindFeeds(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.FeedFilter) ([]*model.Feed, error)

func (*Finder) FindOperators

func (f *Finder) FindOperators(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.OperatorFilter) ([]*model.Operator, error)

func (*Finder) FindPlaces

func (f *Finder) FindPlaces(ctx context.Context, limit *int, after *model.Cursor, ids []int, level *model.PlaceAggregationLevel, where *model.PlaceFilter) ([]*model.Place, error)

func (*Finder) FindRoutes

func (f *Finder) FindRoutes(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.RouteFilter) ([]*model.Route, error)

func (*Finder) FindStops

func (f *Finder) FindStops(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.StopFilter) ([]*model.Stop, error)

func (*Finder) FindTrips

func (f *Finder) FindTrips(ctx context.Context, limit *int, after *model.Cursor, ids []int, where *model.TripFilter) ([]*model.Trip, error)

func (*Finder) FrequenciesByTripID

func (f *Finder) FrequenciesByTripID(ctx context.Context, params []model.FrequencyParam) ([][]*model.Frequency, []error)

func (*Finder) LevelCreate

func (f *Finder) LevelCreate(ctx context.Context, input model.LevelSetInput) (int, error)

func (*Finder) LevelDelete

func (f *Finder) LevelDelete(ctx context.Context, id int) error

func (*Finder) LevelUpdate

func (f *Finder) LevelUpdate(ctx context.Context, input model.LevelSetInput) (int, error)

func (*Finder) LevelsByID

func (f *Finder) LevelsByID(ctx context.Context, ids []int) ([]*model.Level, []error)

func (*Finder) LevelsByParentStationID

func (f *Finder) LevelsByParentStationID(ctx context.Context, params []model.LevelParam) ([][]*model.Level, []error)

func (*Finder) LoadAdmins

func (f *Finder) LoadAdmins() error

func (*Finder) OperatorsByAgencyID

func (f *Finder) OperatorsByAgencyID(ctx context.Context, ids []int) ([]*model.Operator, []error)

func (*Finder) OperatorsByCOIF

func (f *Finder) OperatorsByCOIF(ctx context.Context, ids []int) ([]*model.Operator, []error)

func (*Finder) OperatorsByFeedID

func (f *Finder) OperatorsByFeedID(ctx context.Context, params []model.OperatorParam) ([][]*model.Operator, []error)

func (*Finder) PathwayCreate

func (f *Finder) PathwayCreate(ctx context.Context, input model.PathwaySetInput) (int, error)

func (*Finder) PathwayDelete

func (f *Finder) PathwayDelete(ctx context.Context, id int) error

func (*Finder) PathwayUpdate

func (f *Finder) PathwayUpdate(ctx context.Context, input model.PathwaySetInput) (int, error)

func (*Finder) PathwaysByFromStopID

func (f *Finder) PathwaysByFromStopID(ctx context.Context, params []model.PathwayParam) ([][]*model.Pathway, []error)

func (*Finder) PathwaysByID

func (f *Finder) PathwaysByID(ctx context.Context, ids []int) ([]*model.Pathway, []error)

func (*Finder) PathwaysByToStopID

func (f *Finder) PathwaysByToStopID(ctx context.Context, params []model.PathwayParam) ([][]*model.Pathway, []error)

func (*Finder) PermFilter

func (f *Finder) PermFilter(ctx context.Context) *model.PermFilter

func (*Finder) RouteAttributesByRouteID

func (f *Finder) RouteAttributesByRouteID(ctx context.Context, ids []int) ([]*model.RouteAttribute, []error)

func (*Finder) RouteGeometriesByRouteID

func (f *Finder) RouteGeometriesByRouteID(ctx context.Context, params []model.RouteGeometryParam) ([][]*model.RouteGeometry, []error)

func (*Finder) RouteHeadwaysByRouteID

func (f *Finder) RouteHeadwaysByRouteID(ctx context.Context, params []model.RouteHeadwayParam) ([][]*model.RouteHeadway, []error)

func (*Finder) RouteStopBuffer

func (f *Finder) RouteStopBuffer(ctx context.Context, param *model.RouteStopBufferParam) ([]*model.RouteStopBuffer, error)

func (*Finder) RouteStopPatternsByRouteID

func (f *Finder) RouteStopPatternsByRouteID(ctx context.Context, params []model.RouteStopPatternParam) ([][]*model.RouteStopPattern, []error)

func (*Finder) RouteStopsByRouteID

func (f *Finder) RouteStopsByRouteID(ctx context.Context, params []model.RouteStopParam) ([][]*model.RouteStop, []error)

func (*Finder) RouteStopsByStopID

func (f *Finder) RouteStopsByStopID(ctx context.Context, params []model.RouteStopParam) ([][]*model.RouteStop, []error)

func (*Finder) RoutesByAgencyID

func (f *Finder) RoutesByAgencyID(ctx context.Context, params []model.RouteParam) ([][]*model.Route, []error)

func (*Finder) RoutesByFeedVersionID

func (f *Finder) RoutesByFeedVersionID(ctx context.Context, params []model.RouteParam) ([][]*model.Route, []error)

func (*Finder) RoutesByID

func (f *Finder) RoutesByID(ctx context.Context, ids []int) ([]*model.Route, []error)

func (*Finder) SegmentPatternsByRouteID

func (f *Finder) SegmentPatternsByRouteID(ctx context.Context, params []model.SegmentPatternParam) ([][]*model.SegmentPattern, []error)

func (*Finder) SegmentPatternsBySegmentID

func (f *Finder) SegmentPatternsBySegmentID(ctx context.Context, params []model.SegmentPatternParam) ([][]*model.SegmentPattern, []error)

func (*Finder) SegmentsByFeedVersionID

func (f *Finder) SegmentsByFeedVersionID(ctx context.Context, params []model.SegmentParam) ([][]*model.Segment, []error)

func (*Finder) SegmentsByID

func (f *Finder) SegmentsByID(ctx context.Context, ids []int) ([]*model.Segment, []error)

func (*Finder) SegmentsByRouteID

func (f *Finder) SegmentsByRouteID(ctx context.Context, params []model.SegmentParam) ([][]*model.Segment, []error)

func (*Finder) ShapesByID

func (f *Finder) ShapesByID(ctx context.Context, ids []int) ([]*model.Shape, []error)

func (*Finder) StopCreate

func (f *Finder) StopCreate(ctx context.Context, input model.StopSetInput) (int, error)

func (*Finder) StopDelete

func (f *Finder) StopDelete(ctx context.Context, id int) error

func (*Finder) StopExternalReferencesByStopID

func (f *Finder) StopExternalReferencesByStopID(ctx context.Context, ids []int) ([]*model.StopExternalReference, []error)

func (*Finder) StopObservationsByStopID

func (f *Finder) StopObservationsByStopID(ctx context.Context, params []model.StopObservationParam) ([][]*model.StopObservation, []error)

func (*Finder) StopPlacesByStopID

func (f *Finder) StopPlacesByStopID(ctx context.Context, params []model.StopPlaceParam) ([]*model.StopPlace, []error)

func (*Finder) StopTimesByStopID

func (f *Finder) StopTimesByStopID(ctx context.Context, params []model.StopTimeParam) ([][]*model.StopTime, []error)

func (*Finder) StopTimesByTripID

func (f *Finder) StopTimesByTripID(ctx context.Context, params []model.TripStopTimeParam) ([][]*model.StopTime, []error)

func (*Finder) StopUpdate

func (f *Finder) StopUpdate(ctx context.Context, input model.StopSetInput) (int, error)

func (*Finder) StopsByFeedVersionID

func (f *Finder) StopsByFeedVersionID(ctx context.Context, params []model.StopParam) ([][]*model.Stop, []error)

func (*Finder) StopsByID

func (f *Finder) StopsByID(ctx context.Context, ids []int) ([]*model.Stop, []error)

func (*Finder) StopsByLevelID

func (f *Finder) StopsByLevelID(ctx context.Context, params []model.StopParam) ([][]*model.Stop, []error)

func (*Finder) StopsByParentStopID

func (f *Finder) StopsByParentStopID(ctx context.Context, params []model.StopParam) ([][]*model.Stop, []error)

func (*Finder) StopsByRouteID

func (f *Finder) StopsByRouteID(ctx context.Context, params []model.StopParam) ([][]*model.Stop, []error)

func (*Finder) TargetStopsByStopID

func (f *Finder) TargetStopsByStopID(ctx context.Context, ids []int) ([]*model.Stop, []error)

func (*Finder) TripsByFeedVersionID

func (f *Finder) TripsByFeedVersionID(ctx context.Context, params []model.TripParam) ([][]*model.Trip, []error)

func (*Finder) TripsByID

func (f *Finder) TripsByID(ctx context.Context, ids []int) (ents []*model.Trip, errs []error)

func (*Finder) TripsByRouteID

func (f *Finder) TripsByRouteID(ctx context.Context, params []model.TripParam) ([][]*model.Trip, []error)

func (*Finder) ValidationReportErrorExemplarsByValidationReportErrorGroupID

func (f *Finder) ValidationReportErrorExemplarsByValidationReportErrorGroupID(ctx context.Context, params []model.ValidationReportErrorExemplarParam) ([][]*model.ValidationReportError, []error)

func (*Finder) ValidationReportErrorGroupsByValidationReportID

func (f *Finder) ValidationReportErrorGroupsByValidationReportID(ctx context.Context, params []model.ValidationReportErrorGroupParam) ([][]*model.ValidationReportErrorGroup, []error)

func (*Finder) ValidationReportsByFeedVersionID

func (f *Finder) ValidationReportsByFeedVersionID(ctx context.Context, params []model.ValidationReportParam) ([][]*model.ValidationReport, []error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL