db

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agency

type Agency struct {
	Pk       int64
	ID       string
	SystemPk int64
	Name     string
	Url      string
	Timezone string
	Language pgtype.Text
	Phone    pgtype.Text
	FareUrl  pgtype.Text
	Email    pgtype.Text
	FeedPk   int64
}

type Alert

type Alert struct {
	Pk          int64
	ID          string
	SystemPk    int64
	Cause       string
	Effect      string
	Header      string
	Description string
	Url         string
	Hash        string
	FeedPk      int64
}

type AlertActivePeriod

type AlertActivePeriod struct {
	Pk       int64
	AlertPk  int64
	StartsAt pgtype.Timestamptz
	EndsAt   pgtype.Timestamptz
}

type AlertAgency

type AlertAgency struct {
	AlertPk  int64
	AgencyPk int64
}

type AlertRoute

type AlertRoute struct {
	AlertPk int64
	RoutePk int64
}

type AlertRouteType added in v0.6.1

type AlertRouteType struct {
	AlertPk   int64
	RouteType string
}

type AlertStop

type AlertStop struct {
	AlertPk int64
	StopPk  int64
}

type AlertTrip

type AlertTrip struct {
	AlertPk         int64
	TripPk          pgtype.Int8
	ScheduledTripPk pgtype.Int8
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type DeleteScheduledServicesParams added in v0.6.1

type DeleteScheduledServicesParams struct {
	FeedPk            int64
	SystemPk          int64
	UpdatedServiceIds []string
}

type DeleteServiceMapParams

type DeleteServiceMapParams struct {
	ConfigPk int64
	RoutePk  int64
}

type DeleteShapesParams added in v0.6.1

type DeleteShapesParams struct {
	FeedPk          int64
	SystemPk        int64
	UpdatedShapeIds []string
}

type DeleteStaleAgenciesParams

type DeleteStaleAgenciesParams struct {
	FeedPk           int64
	UpdatedAgencyPks []int64
}

type DeleteStaleAlertsParams

type DeleteStaleAlertsParams struct {
	FeedPk          int64
	UpdatedAlertPks []int64
}

type DeleteStaleRoutesParams

type DeleteStaleRoutesParams struct {
	FeedPk          int64
	UpdatedRoutePks []int64
}

type DeleteStaleStopsParams

type DeleteStaleStopsParams struct {
	FeedPk         int64
	UpdatedStopPks []int64
}

type DeleteStaleTripsParams

type DeleteStaleTripsParams struct {
	FeedPk         int64
	UpdatedTripPks []int64
}

type DeleteVehiclesParams added in v0.6.1

type DeleteVehiclesParams struct {
	SystemPk   int64
	FeedPk     int64
	VehicleIds []string
	TripPks    []int64
}

type EstimateHeadwaysForRoutesParams

type EstimateHeadwaysForRoutesParams struct {
	RoutePks    []int64
	PresentTime pgtype.Timestamptz
}

type EstimateHeadwaysForRoutesRow

type EstimateHeadwaysForRoutesRow struct {
	RoutePk          int64
	EstimatedHeadway int32
}

type Feed

type Feed struct {
	Pk                   int64
	ID                   string
	SystemPk             int64
	Config               string
	LastContentHash      pgtype.Text
	LastUpdate           pgtype.Timestamptz
	LastSuccessfulUpdate pgtype.Timestamptz
	LastSkippedUpdate    pgtype.Timestamptz
	LastFailedUpdate     pgtype.Timestamptz
}

type GetAgencyParams

type GetAgencyParams struct {
	SystemPk int64
	AgencyID string
}

type GetAlertInSystemParams

type GetAlertInSystemParams struct {
	SystemPk int64
	AlertID  string
}

type GetDestinationsForTripsRow

type GetDestinationsForTripsRow struct {
	TripPk        int64
	DestinationPk int64
}

type GetFeedParams

type GetFeedParams struct {
	SystemID string
	FeedID   string
}

type GetRouteParams

type GetRouteParams struct {
	SystemPk int64
	RouteID  string
}

type GetScheduledServiceParams added in v0.6.1

type GetScheduledServiceParams struct {
	SystemPk int64
	ID       string
}

type GetScheduledTripParams added in v0.6.1

type GetScheduledTripParams struct {
	SystemPk int64
	TripID   string
}

type GetShapeParams added in v0.6.1

type GetShapeParams struct {
	SystemPk int64
	ShapeID  string
}

type GetStopParams

type GetStopParams struct {
	SystemID string
	StopID   string
}

type GetTripParams

type GetTripParams struct {
	TripID   string
	RoutePk  int64
	SystemPk int64
}

type GetTripRow

type GetTripRow struct {
	Pk               int64
	ID               string
	RoutePk          int64
	DirectionID      pgtype.Bool
	StartedAt        pgtype.Timestamptz
	GtfsHash         string
	FeedPk           int64
	VehicleID        pgtype.Text
	VehicleLocation  types.Geography
	VehicleBearing   pgtype.Float4
	VehicleUpdatedAt pgtype.Timestamptz
	ShapeID          pgtype.Text
}

type GetVehicleParams

type GetVehicleParams struct {
	SystemPk  int64
	VehicleID pgtype.Text
}

type GetVehicleRow

type GetVehicleRow struct {
	Pk                  int64
	ID                  pgtype.Text
	SystemPk            int64
	TripPk              pgtype.Int8
	Label               pgtype.Text
	LicensePlate        pgtype.Text
	CurrentStatus       pgtype.Text
	Bearing             pgtype.Float4
	Odometer            pgtype.Float8
	Speed               pgtype.Float4
	CongestionLevel     string
	UpdatedAt           pgtype.Timestamptz
	CurrentStopPk       pgtype.Int8
	CurrentStopSequence pgtype.Int4
	OccupancyStatus     pgtype.Text
	FeedPk              int64
	OccupancyPercentage pgtype.Int4
	Location            types.Geography
	StopID              pgtype.Text
	StopName            pgtype.Text
	TripID              pgtype.Text
	TripDirectionID     pgtype.Bool
	RouteID             pgtype.Text
	RouteColor          pgtype.Text
}

type InsertAgencyParams

type InsertAgencyParams struct {
	ID       string
	SystemPk int64
	FeedPk   int64
	Name     string
	Url      string
	Timezone string
	Language pgtype.Text
	Phone    pgtype.Text
	FareUrl  pgtype.Text
	Email    pgtype.Text
}

type InsertAlertActivePeriodParams

type InsertAlertActivePeriodParams struct {
	AlertPk  int64
	StartsAt pgtype.Timestamptz
	EndsAt   pgtype.Timestamptz
}

type InsertAlertAgencyParams

type InsertAlertAgencyParams struct {
	AlertPk  int64
	AgencyPk int64
}

type InsertAlertParams

type InsertAlertParams struct {
	ID          string
	SystemPk    int64
	FeedPk      int64
	Cause       string
	Effect      string
	Header      string
	Description string
	Url         string
	Hash        string
}

type InsertAlertRouteParams

type InsertAlertRouteParams struct {
	AlertPk int64
	RoutePk int64
}

type InsertAlertRouteTypeParams added in v0.6.1

type InsertAlertRouteTypeParams struct {
	AlertPk   int64
	RouteType string
}

type InsertAlertStopParams

type InsertAlertStopParams struct {
	AlertPk int64
	StopPk  int64
}

type InsertAlertTripParams added in v0.6.1

type InsertAlertTripParams struct {
	AlertPk         int64
	TripPk          pgtype.Int8
	ScheduledTripPk pgtype.Int8
}

type InsertFeedParams

type InsertFeedParams struct {
	ID       string
	SystemPk int64
	Config   string
}

type InsertRouteParams

type InsertRouteParams struct {
	ID                string
	SystemPk          int64
	FeedPk            int64
	Color             string
	TextColor         string
	ShortName         pgtype.Text
	LongName          pgtype.Text
	Description       pgtype.Text
	Url               pgtype.Text
	SortOrder         pgtype.Int4
	Type              string
	ContinuousPickup  string
	ContinuousDropOff string
	AgencyPk          int64
}

type InsertScheduledServiceAdditionParams added in v0.6.1

type InsertScheduledServiceAdditionParams struct {
	ServicePk int64
	Date      pgtype.Date
}

type InsertScheduledServiceParams added in v0.6.1

type InsertScheduledServiceParams struct {
	ID        string
	SystemPk  int64
	Monday    pgtype.Bool
	Tuesday   pgtype.Bool
	Wednesday pgtype.Bool
	Thursday  pgtype.Bool
	Friday    pgtype.Bool
	Saturday  pgtype.Bool
	Sunday    pgtype.Bool
	StartDate pgtype.Date
	EndDate   pgtype.Date
	FeedPk    int64
}

type InsertScheduledServiceRemovalParams added in v0.6.1

type InsertScheduledServiceRemovalParams struct {
	ServicePk int64
	Date      pgtype.Date
}

type InsertScheduledTripFrequencyParams added in v0.6.1

type InsertScheduledTripFrequencyParams struct {
	TripPk         int64
	StartTime      int32
	EndTime        int32
	Headway        int32
	FrequencyBased bool
}

type InsertScheduledTripParams added in v0.6.1

type InsertScheduledTripParams struct {
	ID                   string
	RoutePk              int64
	ServicePk            int64
	ShapePk              pgtype.Int8
	DirectionID          pgtype.Bool
	BikesAllowed         pgtype.Bool
	BlockID              pgtype.Text
	Headsign             pgtype.Text
	ShortName            pgtype.Text
	WheelchairAccessible pgtype.Bool
}

type InsertScheduledTripStopTimeParams added in v0.6.1

type InsertScheduledTripStopTimeParams struct {
	TripPk                int64
	StopPk                int64
	ArrivalTime           pgtype.Int4
	DepartureTime         pgtype.Int4
	StopSequence          int32
	ContinuousDropOff     string
	ContinuousPickup      string
	DropOffType           string
	ExactTimes            bool
	Headsign              pgtype.Text
	PickupType            string
	ShapeDistanceTraveled pgtype.Float8
}

type InsertServiceMapConfigParams

type InsertServiceMapConfigParams struct {
	ID       string
	SystemPk int64
	Config   []byte
}

type InsertServiceMapParams

type InsertServiceMapParams struct {
	ConfigPk int64
	RoutePk  int64
}

type InsertServiceMapStopParams

type InsertServiceMapStopParams struct {
	MapPk    int64
	StopPk   int64
	Position int32
}

type InsertShapeParams added in v0.6.1

type InsertShapeParams struct {
	ID       string
	SystemPk int64
	FeedPk   int64
	Shape    []byte
}

type InsertStopHeadSignRuleParams

type InsertStopHeadSignRuleParams struct {
	FeedPk   int64
	Priority int32
	StopPk   int64
	Track    pgtype.Text
	Headsign string
}

type InsertStopParams

type InsertStopParams struct {
	ID                 string
	SystemPk           int64
	FeedPk             int64
	Name               pgtype.Text
	Location           types.Geography
	Url                pgtype.Text
	Code               pgtype.Text
	Description        pgtype.Text
	PlatformCode       pgtype.Text
	Timezone           pgtype.Text
	Type               string
	WheelchairBoarding pgtype.Bool
	ZoneID             pgtype.Text
}

type InsertSystemParams

type InsertSystemParams struct {
	ID     string
	Name   string
	Status string
}

type InsertTransferParams

type InsertTransferParams struct {
	SystemPk        pgtype.Int8
	FeedPk          int64
	FromStopPk      int64
	ToStopPk        int64
	Type            string
	MinTransferTime pgtype.Int4
}

type InsertTripParams

type InsertTripParams struct {
	ID          string
	RoutePk     int64
	FeedPk      int64
	DirectionID pgtype.Bool
	StartedAt   pgtype.Timestamptz
	GtfsHash    string
}

type InsertTripStopTimeParams

type InsertTripStopTimeParams struct {
	StopPk               int64
	TripPk               int64
	ArrivalTime          pgtype.Timestamptz
	ArrivalDelay         pgtype.Int4
	ArrivalUncertainty   pgtype.Int4
	DepartureTime        pgtype.Timestamptz
	DepartureDelay       pgtype.Int4
	DepartureUncertainty pgtype.Int4
	StopSequence         int32
	Track                pgtype.Text
	Headsign             pgtype.Text
	Past                 bool
}

type InsertVehicleParams

type InsertVehicleParams struct {
	ID                  pgtype.Text
	SystemPk            int64
	TripPk              pgtype.Int8
	Label               pgtype.Text
	LicensePlate        pgtype.Text
	CurrentStatus       pgtype.Text
	Location            types.Geography
	Bearing             pgtype.Float4
	Odometer            pgtype.Float8
	Speed               pgtype.Float4
	CongestionLevel     string
	UpdatedAt           pgtype.Timestamptz
	CurrentStopPk       pgtype.Int8
	CurrentStopSequence pgtype.Int4
	OccupancyStatus     pgtype.Text
	FeedPk              int64
	OccupancyPercentage pgtype.Int4
}

type ListActiveAlertsForAgenciesParams

type ListActiveAlertsForAgenciesParams struct {
	AgencyPks   []int64
	PresentTime pgtype.Timestamptz
}

type ListActiveAlertsForAgenciesRow

type ListActiveAlertsForAgenciesRow struct {
	ID     string
	Cause  string
	Effect string
}

type ListActiveAlertsForRoutesParams

type ListActiveAlertsForRoutesParams struct {
	RoutePks    []int64
	PresentTime pgtype.Timestamptz
}

type ListActiveAlertsForRoutesRow

type ListActiveAlertsForRoutesRow struct {
	RoutePk int64
	ID      string
	Cause   string
	Effect  string
}

type ListActiveAlertsForStopsParams

type ListActiveAlertsForStopsParams struct {
	StopPks     []int64
	PresentTime pgtype.Timestamptz
}

type ListActiveAlertsForStopsRow

type ListActiveAlertsForStopsRow struct {
	StopPk   int64
	Pk       int64
	ID       string
	Cause    string
	Effect   string
	StartsAt pgtype.Timestamptz
	EndsAt   pgtype.Timestamptz
}

type ListActivePeriodsForAlertsRow

type ListActivePeriodsForAlertsRow struct {
	Pk       int64
	StartsAt pgtype.Timestamptz
	EndsAt   pgtype.Timestamptz
}

type ListAlertPksAndHashesParams

type ListAlertPksAndHashesParams struct {
	AlertIds []string
	SystemPk int64
}

type ListAlertPksAndHashesRow

type ListAlertPksAndHashesRow struct {
	ID   string
	Pk   int64
	Hash string
}

type ListAlertsInSystemAndByIDsParams

type ListAlertsInSystemAndByIDsParams struct {
	SystemPk int64
	Ids      []string
}

type ListAlertsWithActivePeriodsAndAllInformedEntitiesRow added in v0.6.1

type ListAlertsWithActivePeriodsAndAllInformedEntitiesRow struct {
	ID             string
	Cause          string
	Effect         string
	Header         string
	Description    string
	Url            string
	ActivePeriods  []pgtype.Range[pgtype.Timestamptz]
	Agencies       []string
	Routes         []string
	Stops          []string
	Trips          []string
	ScheduledTrips []string
	RouteTypes     []string
}

type ListRoutesByPkRow

type ListRoutesByPkRow struct {
	Pk       int64
	ID       string
	Color    string
	SystemID string
}

type ListRoutesInAgencyRow

type ListRoutesInAgencyRow struct {
	ID    string
	Color string
}

type ListScheduledServicesRow added in v0.6.1

type ListScheduledServicesRow struct {
	Pk        int64
	ID        string
	SystemPk  int64
	Monday    pgtype.Bool
	Tuesday   pgtype.Bool
	Wednesday pgtype.Bool
	Thursday  pgtype.Bool
	Friday    pgtype.Bool
	Saturday  pgtype.Bool
	Sunday    pgtype.Bool
	EndDate   pgtype.Date
	StartDate pgtype.Date
	FeedPk    int64
	Additions []pgtype.Date
	Removals  []pgtype.Date
}

type ListScheduledTripFrequenciesRow added in v0.6.1

type ListScheduledTripFrequenciesRow struct {
	Pk             int64
	TripPk         int64
	Headway        int32
	FrequencyBased bool
	StartTime      int32
	EndTime        int32
	TripID         string
}

type ListScheduledTripStopTimesRow added in v0.6.1

type ListScheduledTripStopTimesRow struct {
	Pk                    int64
	TripPk                int64
	StopPk                int64
	StopSequence          int32
	ContinuousDropOff     string
	ContinuousPickup      string
	DropOffType           string
	ExactTimes            bool
	Headsign              pgtype.Text
	PickupType            string
	ShapeDistanceTraveled pgtype.Float8
	ArrivalTime           pgtype.Int4
	DepartureTime         pgtype.Int4
	TripID                string
	StopID                string
}

type ListScheduledTripsRow added in v0.6.1

type ListScheduledTripsRow struct {
	Pk                   int64
	ID                   string
	RoutePk              int64
	ServicePk            int64
	DirectionID          pgtype.Bool
	BikesAllowed         pgtype.Bool
	BlockID              pgtype.Text
	Headsign             pgtype.Text
	ShortName            pgtype.Text
	WheelchairAccessible pgtype.Bool
	ShapePk              pgtype.Int8
	RouteID              string
	ServiceID            string
}

type ListServiceMapsConfigIDsForStopsRow

type ListServiceMapsConfigIDsForStopsRow struct {
	Pk int64
	ID string
}

type ListServiceMapsForRoutesRow

type ListServiceMapsForRoutesRow struct {
	RoutePk  int64
	ConfigID string
	Position pgtype.Int4
	StopID   pgtype.Text
	StopName pgtype.Text
}

type ListServiceMapsForStopsRow

type ListServiceMapsForStopsRow struct {
	StopPk   int64
	ConfigID string
	RoutePk  int64
}

type ListShapesAndTripsRow added in v0.6.1

type ListShapesAndTripsRow struct {
	Pk       int64
	ID       string
	SystemPk int64
	FeedPk   int64
	Shape    []byte
	TripID   string
}

type ListShapesParams added in v0.6.1

type ListShapesParams struct {
	SystemPk               int64
	FirstShapeID           string
	OnlyReturnSpecifiedIds bool
	ShapeIds               []string
	NumShapes              int32
}

type ListStopPksForRealtimeMapRow

type ListStopPksForRealtimeMapRow struct {
	TripPk      int64
	DirectionID pgtype.Bool
	StopPk      int64
}

type ListStopsByPkRow

type ListStopsByPkRow struct {
	Pk       int64
	StopID   string
	Name     pgtype.Text
	SystemID string
}

type ListStopsParams

type ListStopsParams struct {
	SystemPk               int64
	FirstStopID            string
	OnlyReturnSpecifiedIds bool
	StopIds                []string
	NumStops               int32
}

type ListStopsTimesForTripRow

type ListStopsTimesForTripRow struct {
	Pk                   int64
	StopPk               int64
	TripPk               int64
	ArrivalTime          pgtype.Timestamptz
	ArrivalDelay         pgtype.Int4
	ArrivalUncertainty   pgtype.Int4
	DepartureTime        pgtype.Timestamptz
	DepartureDelay       pgtype.Int4
	DepartureUncertainty pgtype.Int4
	StopSequence         int32
	Track                pgtype.Text
	Headsign             pgtype.Text
	Past                 bool
	StopID               string
	StopName             pgtype.Text
}

type ListStops_GeographicParams

type ListStops_GeographicParams struct {
	SystemPk    int64
	MaxDistance float64
	MaxResults  int32
	Base        types.Geography
}

type ListTransfersInSystemRow

type ListTransfersInSystemRow struct {
	Pk              int64
	SystemPk        pgtype.Int8
	FromStopPk      int64
	ToStopPk        int64
	Type            string
	MinTransferTime pgtype.Int4
	Distance        pgtype.Int4
	FeedPk          int64
	FromStopID      string
	FromStopName    pgtype.Text
	FromSystemID    string
	ToStopID        string
	ToStopName      pgtype.Text
	ToSystemID      string
}

type ListTripPksInSystemParams

type ListTripPksInSystemParams struct {
	TripIds  []string
	SystemPk int64
}

type ListTripPksInSystemRow

type ListTripPksInSystemRow struct {
	ID string
	Pk int64
}

type ListTripStopTimesByStopsRow

type ListTripStopTimesByStopsRow struct {
	Pk                   int64
	StopPk               int64
	TripPk               int64
	ArrivalTime          pgtype.Timestamptz
	ArrivalDelay         pgtype.Int4
	ArrivalUncertainty   pgtype.Int4
	DepartureTime        pgtype.Timestamptz
	DepartureDelay       pgtype.Int4
	DepartureUncertainty pgtype.Int4
	StopSequence         int32
	Track                pgtype.Text
	Headsign             pgtype.Text
	Past                 bool
	Pk_2                 int64
	ID                   string
	RoutePk              int64
	DirectionID          pgtype.Bool
	StartedAt            pgtype.Timestamptz
	GtfsHash             string
	FeedPk               int64
	VehicleID            pgtype.Text
	VehicleLocation      types.Geography
	VehicleBearing       pgtype.Float4
	VehicleUpdatedAt     pgtype.Timestamptz
}

type ListTripStopTimesForUpdateRow

type ListTripStopTimesForUpdateRow struct {
	Pk           int64
	TripPk       int64
	StopPk       int64
	StopSequence int32
	Past         bool
}

type ListTripsParams added in v0.6.1

type ListTripsParams struct {
	RoutePks []int64
	SystemPk int64
}

type ListTripsRow

type ListTripsRow struct {
	Pk               int64
	ID               string
	RoutePk          int64
	DirectionID      pgtype.Bool
	StartedAt        pgtype.Timestamptz
	GtfsHash         string
	FeedPk           int64
	VehicleID        pgtype.Text
	VehicleLocation  types.Geography
	VehicleBearing   pgtype.Float4
	VehicleUpdatedAt pgtype.Timestamptz
	ShapeID          pgtype.Text
}

type ListVehiclesParams

type ListVehiclesParams struct {
	SystemPk               int64
	FirstVehicleID         pgtype.Text
	OnlyReturnSpecifiedIds bool
	VehicleIds             []string
	NumVehicles            int32
}

type ListVehiclesRow

type ListVehiclesRow struct {
	Pk                  int64
	ID                  pgtype.Text
	SystemPk            int64
	TripPk              pgtype.Int8
	Label               pgtype.Text
	LicensePlate        pgtype.Text
	CurrentStatus       pgtype.Text
	Bearing             pgtype.Float4
	Odometer            pgtype.Float8
	Speed               pgtype.Float4
	CongestionLevel     string
	UpdatedAt           pgtype.Timestamptz
	CurrentStopPk       pgtype.Int8
	CurrentStopSequence pgtype.Int4
	OccupancyStatus     pgtype.Text
	FeedPk              int64
	OccupancyPercentage pgtype.Int4
	Location            types.Geography
	StopID              pgtype.Text
	StopName            pgtype.Text
	TripID              pgtype.Text
	TripDirectionID     pgtype.Bool
	RouteID             pgtype.Text
	RouteColor          pgtype.Text
}

type ListVehicles_GeographicParams

type ListVehicles_GeographicParams struct {
	MaxDistance float64
	NumVehicles int32
	Base        types.Geography
	SystemPk    int64
}

type ListVehicles_GeographicRow

type ListVehicles_GeographicRow struct {
	Pk                  int64
	ID                  pgtype.Text
	SystemPk            int64
	TripPk              pgtype.Int8
	Label               pgtype.Text
	LicensePlate        pgtype.Text
	CurrentStatus       pgtype.Text
	Bearing             pgtype.Float4
	Odometer            pgtype.Float8
	Speed               pgtype.Float4
	CongestionLevel     string
	UpdatedAt           pgtype.Timestamptz
	CurrentStopPk       pgtype.Int8
	CurrentStopSequence pgtype.Int4
	OccupancyStatus     pgtype.Text
	FeedPk              int64
	OccupancyPercentage pgtype.Int4
	Location            types.Geography
	StopID              pgtype.Text
	StopName            pgtype.Text
	TripID              pgtype.Text
	TripDirectionID     pgtype.Bool
	RouteID             pgtype.Text
	RouteColor          pgtype.Text
}

type MapAgencyPkToIdRow

type MapAgencyPkToIdRow struct {
	Pk int64
	ID string
}

type MapRouteIDToPkInSystemParams

type MapRouteIDToPkInSystemParams struct {
	SystemPk        int64
	FilterByRouteID bool
	RouteIds        []string
}

type MapRouteIDToPkInSystemRow

type MapRouteIDToPkInSystemRow struct {
	Pk int64
	ID string
}

type MapScheduledTripIDToPkInSystemParams added in v0.6.1

type MapScheduledTripIDToPkInSystemParams struct {
	SystemPk       int64
	FilterByTripID bool
	TripIds        []string
}

type MapScheduledTripIDToPkInSystemRow added in v0.6.1

type MapScheduledTripIDToPkInSystemRow struct {
	ID string
	Pk int64
}

type MapScheduledTripIDToRoutePkInSystemParams added in v0.6.1

type MapScheduledTripIDToRoutePkInSystemParams struct {
	SystemPk       int64
	FilterByTripID bool
	TripIds        []string
}

type MapScheduledTripIDToRoutePkInSystemRow added in v0.6.1

type MapScheduledTripIDToRoutePkInSystemRow struct {
	ID      string
	RoutePk int64
}

type MapStopIDAndPkToStationPkParams

type MapStopIDAndPkToStationPkParams struct {
	SystemPk       int64
	FilterByStopPk bool
	StopPks        []int64
}

type MapStopIDAndPkToStationPkRow

type MapStopIDAndPkToStationPkRow struct {
	StopID    string
	StopPk    int64
	StationPk int64
}

type MapStopIDToPkParams

type MapStopIDToPkParams struct {
	SystemPk       int64
	FilterByStopID bool
	StopIds        []string
}

type MapStopIDToPkRow

type MapStopIDToPkRow struct {
	Pk int64
	ID string
}

type MapStopPkToChildPksRow

type MapStopPkToChildPksRow struct {
	ParentPk pgtype.Int8
	ChildPk  int64
}

type MapStopPkToDescendentPksRow

type MapStopPkToDescendentPksRow struct {
	RootStopPk       int64
	DescendentStopPk int64
}

type MapTripIDToPkInSystemParams

type MapTripIDToPkInSystemParams struct {
	TripIds  []string
	SystemPk int64
}

type MapTripIDToPkInSystemRow

type MapTripIDToPkInSystemRow struct {
	ID string
	Pk int64
}

type MapTripPkToVehicleIDParams added in v0.6.1

type MapTripPkToVehicleIDParams struct {
	VehicleIds []string
	SystemPk   int64
}

type MapTripPkToVehicleIDRow added in v0.6.1

type MapTripPkToVehicleIDRow struct {
	ID     pgtype.Text
	TripPk pgtype.Int8
}

type MarkFailedUpdateParams

type MarkFailedUpdateParams struct {
	UpdateTime pgtype.Timestamptz
	FeedPk     int64
}

type MarkSkippedUpdateParams

type MarkSkippedUpdateParams struct {
	UpdateTime pgtype.Timestamptz
	FeedPk     int64
}

type MarkSuccessfulUpdateParams

type MarkSuccessfulUpdateParams struct {
	ContentHash pgtype.Text
	UpdateTime  pgtype.Timestamptz
	FeedPk      int64
}

type MarkTripStopTimesPastBatchResults

type MarkTripStopTimesPastBatchResults struct {
	// contains filtered or unexported fields
}

func (*MarkTripStopTimesPastBatchResults) Close

func (*MarkTripStopTimesPastBatchResults) Exec

func (b *MarkTripStopTimesPastBatchResults) Exec(f func(int, error))

type MarkTripStopTimesPastParams

type MarkTripStopTimesPastParams struct {
	TripPk              int64
	CurrentStopSequence int32
}

type Querier

type Querier interface {
	CountAgenciesInSystem(ctx context.Context, systemPk int64) (int64, error)
	CountFeedsInSystem(ctx context.Context, systemPk int64) (int64, error)
	CountRoutesInSystem(ctx context.Context, systemPk int64) (int64, error)
	CountStopsInSystem(ctx context.Context, systemPk int64) (int64, error)
	CountTransfersInSystem(ctx context.Context, systemPk pgtype.Int8) (int64, error)
	DeleteAlerts(ctx context.Context, alertPks []int64) error
	DeleteFeed(ctx context.Context, pk int64) error
	DeleteScheduledServices(ctx context.Context, arg DeleteScheduledServicesParams) error
	DeleteServiceMap(ctx context.Context, arg DeleteServiceMapParams) error
	DeleteServiceMapConfig(ctx context.Context, pk int64) error
	DeleteShapes(ctx context.Context, arg DeleteShapesParams) error
	DeleteStaleAgencies(ctx context.Context, arg DeleteStaleAgenciesParams) error
	DeleteStaleAlerts(ctx context.Context, arg DeleteStaleAlertsParams) error
	DeleteStaleRoutes(ctx context.Context, arg DeleteStaleRoutesParams) error
	DeleteStaleStops(ctx context.Context, arg DeleteStaleStopsParams) error
	DeleteStaleTrips(ctx context.Context, arg DeleteStaleTripsParams) ([]int64, error)
	DeleteStopHeadsignRules(ctx context.Context, feedPk int64) error
	DeleteSystem(ctx context.Context, pk int64) error
	DeleteTransfers(ctx context.Context, feedPk int64) error
	DeleteTripStopTimes(ctx context.Context, pks []int64) error
	DeleteVehicles(ctx context.Context, arg DeleteVehiclesParams) error
	EstimateHeadwaysForRoutes(ctx context.Context, arg EstimateHeadwaysForRoutesParams) ([]EstimateHeadwaysForRoutesRow, error)
	GetAgency(ctx context.Context, arg GetAgencyParams) (Agency, error)
	GetAlertInSystem(ctx context.Context, arg GetAlertInSystemParams) (Alert, error)
	GetDestinationsForTrips(ctx context.Context, tripPks []int64) ([]GetDestinationsForTripsRow, error)
	GetFeed(ctx context.Context, arg GetFeedParams) (Feed, error)
	GetRoute(ctx context.Context, arg GetRouteParams) (Route, error)
	GetScheduledService(ctx context.Context, arg GetScheduledServiceParams) (ScheduledService, error)
	GetScheduledTrip(ctx context.Context, arg GetScheduledTripParams) (ScheduledTrip, error)
	GetShape(ctx context.Context, arg GetShapeParams) (Shape, error)
	GetStop(ctx context.Context, arg GetStopParams) (Stop, error)
	GetSystem(ctx context.Context, id string) (System, error)
	GetTrip(ctx context.Context, arg GetTripParams) (GetTripRow, error)
	GetVehicle(ctx context.Context, arg GetVehicleParams) (GetVehicleRow, error)
	InsertAgency(ctx context.Context, arg InsertAgencyParams) (int64, error)
	InsertAlert(ctx context.Context, arg InsertAlertParams) (int64, error)
	InsertAlertActivePeriod(ctx context.Context, arg InsertAlertActivePeriodParams) error
	InsertAlertAgency(ctx context.Context, arg InsertAlertAgencyParams) error
	InsertAlertRoute(ctx context.Context, arg InsertAlertRouteParams) error
	InsertAlertRouteType(ctx context.Context, arg InsertAlertRouteTypeParams) error
	InsertAlertStop(ctx context.Context, arg InsertAlertStopParams) error
	InsertAlertTrip(ctx context.Context, arg InsertAlertTripParams) error
	InsertFeed(ctx context.Context, arg InsertFeedParams) error
	InsertRoute(ctx context.Context, arg InsertRouteParams) (int64, error)
	InsertScheduledService(ctx context.Context, arg InsertScheduledServiceParams) (int64, error)
	InsertScheduledServiceAddition(ctx context.Context, arg InsertScheduledServiceAdditionParams) error
	InsertScheduledServiceRemoval(ctx context.Context, arg InsertScheduledServiceRemovalParams) error
	InsertScheduledTrip(ctx context.Context, arg []InsertScheduledTripParams) (int64, error)
	InsertScheduledTripFrequency(ctx context.Context, arg InsertScheduledTripFrequencyParams) error
	InsertScheduledTripStopTime(ctx context.Context, arg []InsertScheduledTripStopTimeParams) (int64, error)
	InsertServiceMap(ctx context.Context, arg InsertServiceMapParams) (int64, error)
	InsertServiceMapConfig(ctx context.Context, arg InsertServiceMapConfigParams) error
	InsertServiceMapStop(ctx context.Context, arg []InsertServiceMapStopParams) (int64, error)
	InsertShape(ctx context.Context, arg InsertShapeParams) (int64, error)
	InsertStop(ctx context.Context, arg InsertStopParams) (int64, error)
	InsertStopHeadSignRule(ctx context.Context, arg InsertStopHeadSignRuleParams) error
	InsertSystem(ctx context.Context, arg InsertSystemParams) (int64, error)
	InsertTransfer(ctx context.Context, arg InsertTransferParams) error
	InsertTrip(ctx context.Context, arg InsertTripParams) (int64, error)
	InsertTripStopTime(ctx context.Context, arg []InsertTripStopTimeParams) (int64, error)
	InsertVehicle(ctx context.Context, arg InsertVehicleParams) error
	ListActiveAlertsForAgencies(ctx context.Context, arg ListActiveAlertsForAgenciesParams) ([]ListActiveAlertsForAgenciesRow, error)
	// ListActiveAlertsForRoutes returns preview information about active alerts for the provided routes.
	ListActiveAlertsForRoutes(ctx context.Context, arg ListActiveAlertsForRoutesParams) ([]ListActiveAlertsForRoutesRow, error)
	ListActiveAlertsForStops(ctx context.Context, arg ListActiveAlertsForStopsParams) ([]ListActiveAlertsForStopsRow, error)
	ListActivePeriodsForAlerts(ctx context.Context, pks []int64) ([]ListActivePeriodsForAlertsRow, error)
	ListAgencies(ctx context.Context, systemPk int64) ([]Agency, error)
	ListAgenciesByPk(ctx context.Context, pk []int64) ([]Agency, error)
	ListAlertPksAndHashes(ctx context.Context, arg ListAlertPksAndHashesParams) ([]ListAlertPksAndHashesRow, error)
	ListAlertsInSystem(ctx context.Context, systemPk int64) ([]Alert, error)
	ListAlertsInSystemAndByIDs(ctx context.Context, arg ListAlertsInSystemAndByIDsParams) ([]Alert, error)
	ListAlertsWithActivePeriodsAndAllInformedEntities(ctx context.Context, systemPk int64) ([]ListAlertsWithActivePeriodsAndAllInformedEntitiesRow, error)
	ListFeeds(ctx context.Context, systemPk int64) ([]Feed, error)
	ListRoutes(ctx context.Context, systemPk int64) ([]Route, error)
	ListRoutesByPk(ctx context.Context, routePks []int64) ([]ListRoutesByPkRow, error)
	ListRoutesInAgency(ctx context.Context, agencyPk int64) ([]ListRoutesInAgencyRow, error)
	ListScheduledServices(ctx context.Context, systemPk int64) ([]ListScheduledServicesRow, error)
	ListScheduledTripFrequencies(ctx context.Context, systemPk int64) ([]ListScheduledTripFrequenciesRow, error)
	ListScheduledTripStopTimes(ctx context.Context, systemPk int64) ([]ListScheduledTripStopTimesRow, error)
	ListScheduledTrips(ctx context.Context, systemPk int64) ([]ListScheduledTripsRow, error)
	ListServiceMapConfigsInSystem(ctx context.Context, systemPk int64) ([]ServiceMapConfig, error)
	ListServiceMapsConfigIDsForStops(ctx context.Context, stopPks []int64) ([]ListServiceMapsConfigIDsForStopsRow, error)
	// TODO: make this better?
	ListServiceMapsForRoutes(ctx context.Context, routePks []int64) ([]ListServiceMapsForRoutesRow, error)
	ListServiceMapsForStops(ctx context.Context, stopPks []int64) ([]ListServiceMapsForStopsRow, error)
	ListShapes(ctx context.Context, arg ListShapesParams) ([]Shape, error)
	ListShapesAndTrips(ctx context.Context, systemPk int64) ([]ListShapesAndTripsRow, error)
	ListStopHeadsignRulesForStops(ctx context.Context, stopPks []int64) ([]StopHeadsignRule, error)
	ListStopPksForRealtimeMap(ctx context.Context, routePk int64) ([]ListStopPksForRealtimeMapRow, error)
	ListStops(ctx context.Context, arg ListStopsParams) ([]Stop, error)
	ListStopsByPk(ctx context.Context, stopPks []int64) ([]ListStopsByPkRow, error)
	ListStopsTimesForTrip(ctx context.Context, tripPk int64) ([]ListStopsTimesForTripRow, error)
	ListStops_Geographic(ctx context.Context, arg ListStops_GeographicParams) ([]Stop, error)
	ListSystems(ctx context.Context) ([]System, error)
	ListTransfersFromStops(ctx context.Context, fromStopPks []int64) ([]Transfer, error)
	ListTransfersInSystem(ctx context.Context, systemPk pgtype.Int8) ([]ListTransfersInSystemRow, error)
	ListTripPksInSystem(ctx context.Context, arg ListTripPksInSystemParams) ([]ListTripPksInSystemRow, error)
	ListTripStopTimesByStops(ctx context.Context, stopPks []int64) ([]ListTripStopTimesByStopsRow, error)
	ListTripStopTimesForUpdate(ctx context.Context, tripPks []int64) ([]ListTripStopTimesForUpdateRow, error)
	ListTrips(ctx context.Context, arg ListTripsParams) ([]ListTripsRow, error)
	ListVehicles(ctx context.Context, arg ListVehiclesParams) ([]ListVehiclesRow, error)
	ListVehicles_Geographic(ctx context.Context, arg ListVehicles_GeographicParams) ([]ListVehicles_GeographicRow, error)
	MapAgencyPkToId(ctx context.Context, systemPk int64) ([]MapAgencyPkToIdRow, error)
	MapRouteIDToPkInSystem(ctx context.Context, arg MapRouteIDToPkInSystemParams) ([]MapRouteIDToPkInSystemRow, error)
	MapScheduledTripIDToPkInSystem(ctx context.Context, arg MapScheduledTripIDToPkInSystemParams) ([]MapScheduledTripIDToPkInSystemRow, error)
	MapScheduledTripIDToRoutePkInSystem(ctx context.Context, arg MapScheduledTripIDToRoutePkInSystemParams) ([]MapScheduledTripIDToRoutePkInSystemRow, error)
	MapStopIDAndPkToStationPk(ctx context.Context, arg MapStopIDAndPkToStationPkParams) ([]MapStopIDAndPkToStationPkRow, error)
	MapStopIDToPk(ctx context.Context, arg MapStopIDToPkParams) ([]MapStopIDToPkRow, error)
	MapStopPkToChildPks(ctx context.Context, stopPks []int64) ([]MapStopPkToChildPksRow, error)
	MapStopPkToDescendentPks(ctx context.Context, stopPks []int64) ([]MapStopPkToDescendentPksRow, error)
	MapTripIDToPkInSystem(ctx context.Context, arg MapTripIDToPkInSystemParams) ([]MapTripIDToPkInSystemRow, error)
	MapTripPkToVehicleID(ctx context.Context, arg MapTripPkToVehicleIDParams) ([]MapTripPkToVehicleIDRow, error)
	MarkFailedUpdate(ctx context.Context, arg MarkFailedUpdateParams) error
	MarkSkippedUpdate(ctx context.Context, arg MarkSkippedUpdateParams) error
	MarkSuccessfulUpdate(ctx context.Context, arg MarkSuccessfulUpdateParams) error
	MarkTripStopTimesPast(ctx context.Context, arg []MarkTripStopTimesPastParams) *MarkTripStopTimesPastBatchResults
	UpdateAgency(ctx context.Context, arg UpdateAgencyParams) error
	UpdateFeed(ctx context.Context, arg UpdateFeedParams) error
	UpdateRoute(ctx context.Context, arg UpdateRouteParams) error
	UpdateServiceMapConfig(ctx context.Context, arg UpdateServiceMapConfigParams) error
	UpdateStop(ctx context.Context, arg UpdateStopParams) error
	UpdateStop_Parent(ctx context.Context, arg UpdateStop_ParentParams) error
	UpdateSystem(ctx context.Context, arg UpdateSystemParams) error
	UpdateSystemStatus(ctx context.Context, arg UpdateSystemStatusParams) error
	UpdateTrip(ctx context.Context, arg []UpdateTripParams) *UpdateTripBatchResults
	UpdateTripStopTime(ctx context.Context, arg UpdateTripStopTimeParams) error
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CountAgenciesInSystem

func (q *Queries) CountAgenciesInSystem(ctx context.Context, systemPk int64) (int64, error)

func (*Queries) CountFeedsInSystem

func (q *Queries) CountFeedsInSystem(ctx context.Context, systemPk int64) (int64, error)

func (*Queries) CountRoutesInSystem

func (q *Queries) CountRoutesInSystem(ctx context.Context, systemPk int64) (int64, error)

func (*Queries) CountStopsInSystem

func (q *Queries) CountStopsInSystem(ctx context.Context, systemPk int64) (int64, error)

func (*Queries) CountTransfersInSystem

func (q *Queries) CountTransfersInSystem(ctx context.Context, systemPk pgtype.Int8) (int64, error)

func (*Queries) DeleteAlerts

func (q *Queries) DeleteAlerts(ctx context.Context, alertPks []int64) error

func (*Queries) DeleteFeed

func (q *Queries) DeleteFeed(ctx context.Context, pk int64) error

func (*Queries) DeleteScheduledServices added in v0.6.1

func (q *Queries) DeleteScheduledServices(ctx context.Context, arg DeleteScheduledServicesParams) error

func (*Queries) DeleteServiceMap

func (q *Queries) DeleteServiceMap(ctx context.Context, arg DeleteServiceMapParams) error

func (*Queries) DeleteServiceMapConfig

func (q *Queries) DeleteServiceMapConfig(ctx context.Context, pk int64) error

func (*Queries) DeleteShapes added in v0.6.1

func (q *Queries) DeleteShapes(ctx context.Context, arg DeleteShapesParams) error

func (*Queries) DeleteStaleAgencies

func (q *Queries) DeleteStaleAgencies(ctx context.Context, arg DeleteStaleAgenciesParams) error

func (*Queries) DeleteStaleAlerts

func (q *Queries) DeleteStaleAlerts(ctx context.Context, arg DeleteStaleAlertsParams) error

func (*Queries) DeleteStaleRoutes

func (q *Queries) DeleteStaleRoutes(ctx context.Context, arg DeleteStaleRoutesParams) error

func (*Queries) DeleteStaleStops

func (q *Queries) DeleteStaleStops(ctx context.Context, arg DeleteStaleStopsParams) error

func (*Queries) DeleteStaleTrips

func (q *Queries) DeleteStaleTrips(ctx context.Context, arg DeleteStaleTripsParams) ([]int64, error)

func (*Queries) DeleteStopHeadsignRules

func (q *Queries) DeleteStopHeadsignRules(ctx context.Context, feedPk int64) error

func (*Queries) DeleteSystem

func (q *Queries) DeleteSystem(ctx context.Context, pk int64) error

func (*Queries) DeleteTransfers

func (q *Queries) DeleteTransfers(ctx context.Context, feedPk int64) error

func (*Queries) DeleteTripStopTimes

func (q *Queries) DeleteTripStopTimes(ctx context.Context, pks []int64) error

func (*Queries) DeleteVehicles added in v0.6.1

func (q *Queries) DeleteVehicles(ctx context.Context, arg DeleteVehiclesParams) error

func (*Queries) EstimateHeadwaysForRoutes

func (q *Queries) EstimateHeadwaysForRoutes(ctx context.Context, arg EstimateHeadwaysForRoutesParams) ([]EstimateHeadwaysForRoutesRow, error)

func (*Queries) GetAgency

func (q *Queries) GetAgency(ctx context.Context, arg GetAgencyParams) (Agency, error)

func (*Queries) GetAlertInSystem

func (q *Queries) GetAlertInSystem(ctx context.Context, arg GetAlertInSystemParams) (Alert, error)

func (*Queries) GetDestinationsForTrips

func (q *Queries) GetDestinationsForTrips(ctx context.Context, tripPks []int64) ([]GetDestinationsForTripsRow, error)

func (*Queries) GetFeed

func (q *Queries) GetFeed(ctx context.Context, arg GetFeedParams) (Feed, error)

func (*Queries) GetRoute

func (q *Queries) GetRoute(ctx context.Context, arg GetRouteParams) (Route, error)

func (*Queries) GetScheduledService added in v0.6.1

func (q *Queries) GetScheduledService(ctx context.Context, arg GetScheduledServiceParams) (ScheduledService, error)

func (*Queries) GetScheduledTrip added in v0.6.1

func (q *Queries) GetScheduledTrip(ctx context.Context, arg GetScheduledTripParams) (ScheduledTrip, error)

func (*Queries) GetShape added in v0.6.1

func (q *Queries) GetShape(ctx context.Context, arg GetShapeParams) (Shape, error)

func (*Queries) GetStop

func (q *Queries) GetStop(ctx context.Context, arg GetStopParams) (Stop, error)

func (*Queries) GetSystem

func (q *Queries) GetSystem(ctx context.Context, id string) (System, error)

func (*Queries) GetTrip

func (q *Queries) GetTrip(ctx context.Context, arg GetTripParams) (GetTripRow, error)

func (*Queries) GetVehicle

func (q *Queries) GetVehicle(ctx context.Context, arg GetVehicleParams) (GetVehicleRow, error)

func (*Queries) InsertAgency

func (q *Queries) InsertAgency(ctx context.Context, arg InsertAgencyParams) (int64, error)

func (*Queries) InsertAlert

func (q *Queries) InsertAlert(ctx context.Context, arg InsertAlertParams) (int64, error)

func (*Queries) InsertAlertActivePeriod

func (q *Queries) InsertAlertActivePeriod(ctx context.Context, arg InsertAlertActivePeriodParams) error

func (*Queries) InsertAlertAgency

func (q *Queries) InsertAlertAgency(ctx context.Context, arg InsertAlertAgencyParams) error

func (*Queries) InsertAlertRoute

func (q *Queries) InsertAlertRoute(ctx context.Context, arg InsertAlertRouteParams) error

func (*Queries) InsertAlertRouteType added in v0.6.1

func (q *Queries) InsertAlertRouteType(ctx context.Context, arg InsertAlertRouteTypeParams) error

func (*Queries) InsertAlertStop

func (q *Queries) InsertAlertStop(ctx context.Context, arg InsertAlertStopParams) error

func (*Queries) InsertAlertTrip added in v0.6.1

func (q *Queries) InsertAlertTrip(ctx context.Context, arg InsertAlertTripParams) error

func (*Queries) InsertFeed

func (q *Queries) InsertFeed(ctx context.Context, arg InsertFeedParams) error

func (*Queries) InsertRoute

func (q *Queries) InsertRoute(ctx context.Context, arg InsertRouteParams) (int64, error)

func (*Queries) InsertScheduledService added in v0.6.1

func (q *Queries) InsertScheduledService(ctx context.Context, arg InsertScheduledServiceParams) (int64, error)

func (*Queries) InsertScheduledServiceAddition added in v0.6.1

func (q *Queries) InsertScheduledServiceAddition(ctx context.Context, arg InsertScheduledServiceAdditionParams) error

func (*Queries) InsertScheduledServiceRemoval added in v0.6.1

func (q *Queries) InsertScheduledServiceRemoval(ctx context.Context, arg InsertScheduledServiceRemovalParams) error

func (*Queries) InsertScheduledTrip added in v0.6.1

func (q *Queries) InsertScheduledTrip(ctx context.Context, arg []InsertScheduledTripParams) (int64, error)

func (*Queries) InsertScheduledTripFrequency added in v0.6.1

func (q *Queries) InsertScheduledTripFrequency(ctx context.Context, arg InsertScheduledTripFrequencyParams) error

func (*Queries) InsertScheduledTripStopTime added in v0.6.1

func (q *Queries) InsertScheduledTripStopTime(ctx context.Context, arg []InsertScheduledTripStopTimeParams) (int64, error)

func (*Queries) InsertServiceMap

func (q *Queries) InsertServiceMap(ctx context.Context, arg InsertServiceMapParams) (int64, error)

func (*Queries) InsertServiceMapConfig

func (q *Queries) InsertServiceMapConfig(ctx context.Context, arg InsertServiceMapConfigParams) error

func (*Queries) InsertServiceMapStop

func (q *Queries) InsertServiceMapStop(ctx context.Context, arg []InsertServiceMapStopParams) (int64, error)

func (*Queries) InsertShape added in v0.6.1

func (q *Queries) InsertShape(ctx context.Context, arg InsertShapeParams) (int64, error)

func (*Queries) InsertStop

func (q *Queries) InsertStop(ctx context.Context, arg InsertStopParams) (int64, error)

func (*Queries) InsertStopHeadSignRule

func (q *Queries) InsertStopHeadSignRule(ctx context.Context, arg InsertStopHeadSignRuleParams) error

func (*Queries) InsertSystem

func (q *Queries) InsertSystem(ctx context.Context, arg InsertSystemParams) (int64, error)

func (*Queries) InsertTransfer

func (q *Queries) InsertTransfer(ctx context.Context, arg InsertTransferParams) error

func (*Queries) InsertTrip

func (q *Queries) InsertTrip(ctx context.Context, arg InsertTripParams) (int64, error)

func (*Queries) InsertTripStopTime

func (q *Queries) InsertTripStopTime(ctx context.Context, arg []InsertTripStopTimeParams) (int64, error)

func (*Queries) InsertVehicle

func (q *Queries) InsertVehicle(ctx context.Context, arg InsertVehicleParams) error

func (*Queries) ListActiveAlertsForRoutes

func (q *Queries) ListActiveAlertsForRoutes(ctx context.Context, arg ListActiveAlertsForRoutesParams) ([]ListActiveAlertsForRoutesRow, error)

ListActiveAlertsForRoutes returns preview information about active alerts for the provided routes.

func (*Queries) ListActiveAlertsForStops

func (q *Queries) ListActiveAlertsForStops(ctx context.Context, arg ListActiveAlertsForStopsParams) ([]ListActiveAlertsForStopsRow, error)

func (*Queries) ListActivePeriodsForAlerts

func (q *Queries) ListActivePeriodsForAlerts(ctx context.Context, pks []int64) ([]ListActivePeriodsForAlertsRow, error)

func (*Queries) ListAgencies

func (q *Queries) ListAgencies(ctx context.Context, systemPk int64) ([]Agency, error)

func (*Queries) ListAgenciesByPk

func (q *Queries) ListAgenciesByPk(ctx context.Context, pk []int64) ([]Agency, error)

func (*Queries) ListAlertPksAndHashes

func (q *Queries) ListAlertPksAndHashes(ctx context.Context, arg ListAlertPksAndHashesParams) ([]ListAlertPksAndHashesRow, error)

func (*Queries) ListAlertsInSystem

func (q *Queries) ListAlertsInSystem(ctx context.Context, systemPk int64) ([]Alert, error)

func (*Queries) ListAlertsInSystemAndByIDs

func (q *Queries) ListAlertsInSystemAndByIDs(ctx context.Context, arg ListAlertsInSystemAndByIDsParams) ([]Alert, error)

func (*Queries) ListAlertsWithActivePeriodsAndAllInformedEntities added in v0.6.1

func (q *Queries) ListAlertsWithActivePeriodsAndAllInformedEntities(ctx context.Context, systemPk int64) ([]ListAlertsWithActivePeriodsAndAllInformedEntitiesRow, error)

func (*Queries) ListFeeds

func (q *Queries) ListFeeds(ctx context.Context, systemPk int64) ([]Feed, error)

func (*Queries) ListRoutes

func (q *Queries) ListRoutes(ctx context.Context, systemPk int64) ([]Route, error)

func (*Queries) ListRoutesByPk

func (q *Queries) ListRoutesByPk(ctx context.Context, routePks []int64) ([]ListRoutesByPkRow, error)

func (*Queries) ListRoutesInAgency

func (q *Queries) ListRoutesInAgency(ctx context.Context, agencyPk int64) ([]ListRoutesInAgencyRow, error)

func (*Queries) ListScheduledServices added in v0.6.1

func (q *Queries) ListScheduledServices(ctx context.Context, systemPk int64) ([]ListScheduledServicesRow, error)

func (*Queries) ListScheduledTripFrequencies added in v0.6.1

func (q *Queries) ListScheduledTripFrequencies(ctx context.Context, systemPk int64) ([]ListScheduledTripFrequenciesRow, error)

func (*Queries) ListScheduledTripStopTimes added in v0.6.1

func (q *Queries) ListScheduledTripStopTimes(ctx context.Context, systemPk int64) ([]ListScheduledTripStopTimesRow, error)

func (*Queries) ListScheduledTrips added in v0.6.1

func (q *Queries) ListScheduledTrips(ctx context.Context, systemPk int64) ([]ListScheduledTripsRow, error)

func (*Queries) ListServiceMapConfigsInSystem

func (q *Queries) ListServiceMapConfigsInSystem(ctx context.Context, systemPk int64) ([]ServiceMapConfig, error)

func (*Queries) ListServiceMapsConfigIDsForStops

func (q *Queries) ListServiceMapsConfigIDsForStops(ctx context.Context, stopPks []int64) ([]ListServiceMapsConfigIDsForStopsRow, error)

func (*Queries) ListServiceMapsForRoutes

func (q *Queries) ListServiceMapsForRoutes(ctx context.Context, routePks []int64) ([]ListServiceMapsForRoutesRow, error)

TODO: make this better?

func (*Queries) ListServiceMapsForStops

func (q *Queries) ListServiceMapsForStops(ctx context.Context, stopPks []int64) ([]ListServiceMapsForStopsRow, error)

func (*Queries) ListShapes added in v0.6.1

func (q *Queries) ListShapes(ctx context.Context, arg ListShapesParams) ([]Shape, error)

func (*Queries) ListShapesAndTrips added in v0.6.1

func (q *Queries) ListShapesAndTrips(ctx context.Context, systemPk int64) ([]ListShapesAndTripsRow, error)

func (*Queries) ListStopHeadsignRulesForStops

func (q *Queries) ListStopHeadsignRulesForStops(ctx context.Context, stopPks []int64) ([]StopHeadsignRule, error)

func (*Queries) ListStopPksForRealtimeMap

func (q *Queries) ListStopPksForRealtimeMap(ctx context.Context, routePk int64) ([]ListStopPksForRealtimeMapRow, error)

func (*Queries) ListStops

func (q *Queries) ListStops(ctx context.Context, arg ListStopsParams) ([]Stop, error)

func (*Queries) ListStopsByPk

func (q *Queries) ListStopsByPk(ctx context.Context, stopPks []int64) ([]ListStopsByPkRow, error)

func (*Queries) ListStopsTimesForTrip

func (q *Queries) ListStopsTimesForTrip(ctx context.Context, tripPk int64) ([]ListStopsTimesForTripRow, error)

func (*Queries) ListStops_Geographic

func (q *Queries) ListStops_Geographic(ctx context.Context, arg ListStops_GeographicParams) ([]Stop, error)

func (*Queries) ListSystems

func (q *Queries) ListSystems(ctx context.Context) ([]System, error)

func (*Queries) ListTransfersFromStops

func (q *Queries) ListTransfersFromStops(ctx context.Context, fromStopPks []int64) ([]Transfer, error)

func (*Queries) ListTransfersInSystem

func (q *Queries) ListTransfersInSystem(ctx context.Context, systemPk pgtype.Int8) ([]ListTransfersInSystemRow, error)

func (*Queries) ListTripPksInSystem

func (q *Queries) ListTripPksInSystem(ctx context.Context, arg ListTripPksInSystemParams) ([]ListTripPksInSystemRow, error)

func (*Queries) ListTripStopTimesByStops

func (q *Queries) ListTripStopTimesByStops(ctx context.Context, stopPks []int64) ([]ListTripStopTimesByStopsRow, error)

func (*Queries) ListTripStopTimesForUpdate

func (q *Queries) ListTripStopTimesForUpdate(ctx context.Context, tripPks []int64) ([]ListTripStopTimesForUpdateRow, error)

func (*Queries) ListTrips

func (q *Queries) ListTrips(ctx context.Context, arg ListTripsParams) ([]ListTripsRow, error)

func (*Queries) ListVehicles

func (q *Queries) ListVehicles(ctx context.Context, arg ListVehiclesParams) ([]ListVehiclesRow, error)

func (*Queries) ListVehicles_Geographic

func (q *Queries) ListVehicles_Geographic(ctx context.Context, arg ListVehicles_GeographicParams) ([]ListVehicles_GeographicRow, error)

func (*Queries) MapAgencyPkToId

func (q *Queries) MapAgencyPkToId(ctx context.Context, systemPk int64) ([]MapAgencyPkToIdRow, error)

func (*Queries) MapRouteIDToPkInSystem

func (q *Queries) MapRouteIDToPkInSystem(ctx context.Context, arg MapRouteIDToPkInSystemParams) ([]MapRouteIDToPkInSystemRow, error)

func (*Queries) MapScheduledTripIDToPkInSystem added in v0.6.1

func (*Queries) MapScheduledTripIDToRoutePkInSystem added in v0.6.1

func (*Queries) MapStopIDAndPkToStationPk

func (q *Queries) MapStopIDAndPkToStationPk(ctx context.Context, arg MapStopIDAndPkToStationPkParams) ([]MapStopIDAndPkToStationPkRow, error)

func (*Queries) MapStopIDToPk

func (q *Queries) MapStopIDToPk(ctx context.Context, arg MapStopIDToPkParams) ([]MapStopIDToPkRow, error)

func (*Queries) MapStopPkToChildPks

func (q *Queries) MapStopPkToChildPks(ctx context.Context, stopPks []int64) ([]MapStopPkToChildPksRow, error)

func (*Queries) MapStopPkToDescendentPks

func (q *Queries) MapStopPkToDescendentPks(ctx context.Context, stopPks []int64) ([]MapStopPkToDescendentPksRow, error)

func (*Queries) MapTripIDToPkInSystem

func (q *Queries) MapTripIDToPkInSystem(ctx context.Context, arg MapTripIDToPkInSystemParams) ([]MapTripIDToPkInSystemRow, error)

func (*Queries) MapTripPkToVehicleID added in v0.6.1

func (q *Queries) MapTripPkToVehicleID(ctx context.Context, arg MapTripPkToVehicleIDParams) ([]MapTripPkToVehicleIDRow, error)

func (*Queries) MarkFailedUpdate

func (q *Queries) MarkFailedUpdate(ctx context.Context, arg MarkFailedUpdateParams) error

func (*Queries) MarkSkippedUpdate

func (q *Queries) MarkSkippedUpdate(ctx context.Context, arg MarkSkippedUpdateParams) error

func (*Queries) MarkSuccessfulUpdate

func (q *Queries) MarkSuccessfulUpdate(ctx context.Context, arg MarkSuccessfulUpdateParams) error

func (*Queries) UpdateAgency

func (q *Queries) UpdateAgency(ctx context.Context, arg UpdateAgencyParams) error

func (*Queries) UpdateFeed

func (q *Queries) UpdateFeed(ctx context.Context, arg UpdateFeedParams) error

func (*Queries) UpdateRoute

func (q *Queries) UpdateRoute(ctx context.Context, arg UpdateRouteParams) error

func (*Queries) UpdateServiceMapConfig

func (q *Queries) UpdateServiceMapConfig(ctx context.Context, arg UpdateServiceMapConfigParams) error

func (*Queries) UpdateStop

func (q *Queries) UpdateStop(ctx context.Context, arg UpdateStopParams) error

func (*Queries) UpdateStop_Parent

func (q *Queries) UpdateStop_Parent(ctx context.Context, arg UpdateStop_ParentParams) error

func (*Queries) UpdateSystem

func (q *Queries) UpdateSystem(ctx context.Context, arg UpdateSystemParams) error

func (*Queries) UpdateSystemStatus

func (q *Queries) UpdateSystemStatus(ctx context.Context, arg UpdateSystemStatusParams) error

func (*Queries) UpdateTrip

func (q *Queries) UpdateTrip(ctx context.Context, arg []UpdateTripParams) *UpdateTripBatchResults

func (*Queries) UpdateTripStopTime

func (q *Queries) UpdateTripStopTime(ctx context.Context, arg UpdateTripStopTimeParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Route

type Route struct {
	Pk                int64
	ID                string
	SystemPk          int64
	Color             string
	TextColor         string
	ShortName         pgtype.Text
	LongName          pgtype.Text
	Description       pgtype.Text
	Url               pgtype.Text
	SortOrder         pgtype.Int4
	Type              string
	AgencyPk          int64
	ContinuousDropOff string
	ContinuousPickup  string
	FeedPk            int64
}

type ScheduledService

type ScheduledService struct {
	Pk        int64
	ID        string
	SystemPk  int64
	Monday    pgtype.Bool
	Tuesday   pgtype.Bool
	Wednesday pgtype.Bool
	Thursday  pgtype.Bool
	Friday    pgtype.Bool
	Saturday  pgtype.Bool
	Sunday    pgtype.Bool
	EndDate   pgtype.Date
	StartDate pgtype.Date
	FeedPk    int64
}

type ScheduledServiceAddition

type ScheduledServiceAddition struct {
	Pk        int64
	ServicePk int64
	Date      pgtype.Date
}

type ScheduledServiceRemoval

type ScheduledServiceRemoval struct {
	Pk        int64
	ServicePk int64
	Date      pgtype.Date
}

type ScheduledTrip

type ScheduledTrip struct {
	Pk                   int64
	ID                   string
	RoutePk              int64
	ServicePk            int64
	DirectionID          pgtype.Bool
	BikesAllowed         pgtype.Bool
	BlockID              pgtype.Text
	Headsign             pgtype.Text
	ShortName            pgtype.Text
	WheelchairAccessible pgtype.Bool
	ShapePk              pgtype.Int8
}

type ScheduledTripFrequency

type ScheduledTripFrequency struct {
	Pk             int64
	TripPk         int64
	Headway        int32
	FrequencyBased bool
	StartTime      int32
	EndTime        int32
}

type ScheduledTripStopTime

type ScheduledTripStopTime struct {
	Pk                    int64
	TripPk                int64
	StopPk                int64
	StopSequence          int32
	ContinuousDropOff     string
	ContinuousPickup      string
	DropOffType           string
	ExactTimes            bool
	Headsign              pgtype.Text
	PickupType            string
	ShapeDistanceTraveled pgtype.Float8
	ArrivalTime           pgtype.Int4
	DepartureTime         pgtype.Int4
}

type ServiceMap

type ServiceMap struct {
	Pk       int64
	RoutePk  int64
	ConfigPk int64
}

type ServiceMapConfig

type ServiceMapConfig struct {
	Pk       int64
	ID       string
	SystemPk int64
	Config   []byte
}

type ServiceMapVertex

type ServiceMapVertex struct {
	Pk       int64
	StopPk   int64
	MapPk    int64
	Position int32
}

type Shape added in v0.6.1

type Shape struct {
	Pk       int64
	ID       string
	SystemPk int64
	FeedPk   int64
	Shape    []byte
}

type Stop

type Stop struct {
	Pk                 int64
	ID                 string
	SystemPk           int64
	ParentStopPk       pgtype.Int8
	Name               pgtype.Text
	Url                pgtype.Text
	Code               pgtype.Text
	Description        pgtype.Text
	PlatformCode       pgtype.Text
	Timezone           pgtype.Text
	Type               string
	WheelchairBoarding pgtype.Bool
	ZoneID             pgtype.Text
	FeedPk             int64
	Location           types.Geography
}

type StopHeadsignRule

type StopHeadsignRule struct {
	Pk       int64
	Priority int32
	StopPk   int64
	Track    pgtype.Text
	Headsign string
	FeedPk   int64
}

type System

type System struct {
	Pk       int64
	ID       string
	Name     string
	Timezone pgtype.Text
	Status   string
}

type Transfer

type Transfer struct {
	Pk              int64
	SystemPk        pgtype.Int8
	FromStopPk      int64
	ToStopPk        int64
	Type            string
	MinTransferTime pgtype.Int4
	Distance        pgtype.Int4
	FeedPk          int64
}

type Trip

type Trip struct {
	Pk          int64
	ID          string
	RoutePk     int64
	DirectionID pgtype.Bool
	StartedAt   pgtype.Timestamptz
	GtfsHash    string
	FeedPk      int64
}

type TripStopTime

type TripStopTime struct {
	Pk                   int64
	StopPk               int64
	TripPk               int64
	ArrivalTime          pgtype.Timestamptz
	ArrivalDelay         pgtype.Int4
	ArrivalUncertainty   pgtype.Int4
	DepartureTime        pgtype.Timestamptz
	DepartureDelay       pgtype.Int4
	DepartureUncertainty pgtype.Int4
	StopSequence         int32
	Track                pgtype.Text
	Headsign             pgtype.Text
	Past                 bool
}

type UpdateAgencyParams

type UpdateAgencyParams struct {
	FeedPk   int64
	Name     string
	Url      string
	Timezone string
	Language pgtype.Text
	Phone    pgtype.Text
	FareUrl  pgtype.Text
	Email    pgtype.Text
	Pk       int64
}

type UpdateFeedParams

type UpdateFeedParams struct {
	Config string
	FeedPk int64
}

type UpdateRouteParams

type UpdateRouteParams struct {
	FeedPk            int64
	Color             string
	TextColor         string
	ShortName         pgtype.Text
	LongName          pgtype.Text
	Description       pgtype.Text
	Url               pgtype.Text
	SortOrder         pgtype.Int4
	Type              string
	ContinuousPickup  string
	ContinuousDropOff string
	AgencyPk          int64
	Pk                int64
}

type UpdateServiceMapConfigParams

type UpdateServiceMapConfigParams struct {
	Config []byte
	Pk     int64
}

type UpdateStopParams

type UpdateStopParams struct {
	FeedPk             int64
	Name               pgtype.Text
	Location           types.Geography
	Url                pgtype.Text
	Code               pgtype.Text
	Description        pgtype.Text
	PlatformCode       pgtype.Text
	Timezone           pgtype.Text
	Type               string
	WheelchairBoarding pgtype.Bool
	ZoneID             pgtype.Text
	Pk                 int64
}

type UpdateStop_ParentParams

type UpdateStop_ParentParams struct {
	ParentStopPk pgtype.Int8
	Pk           int64
}

type UpdateSystemParams

type UpdateSystemParams struct {
	Name string
	Pk   int64
}

type UpdateSystemStatusParams

type UpdateSystemStatusParams struct {
	Status string
	Pk     int64
}

type UpdateTripBatchResults

type UpdateTripBatchResults struct {
	// contains filtered or unexported fields
}

func (*UpdateTripBatchResults) Close

func (b *UpdateTripBatchResults) Close() error

func (*UpdateTripBatchResults) Exec

func (b *UpdateTripBatchResults) Exec(f func(int, error))

type UpdateTripParams

type UpdateTripParams struct {
	FeedPk      int64
	DirectionID pgtype.Bool
	StartedAt   pgtype.Timestamptz
	GtfsHash    string
	Pk          int64
}

type UpdateTripStopTimeParams

type UpdateTripStopTimeParams struct {
	StopPk               int64
	ArrivalTime          pgtype.Timestamptz
	ArrivalDelay         pgtype.Int4
	ArrivalUncertainty   pgtype.Int4
	DepartureTime        pgtype.Timestamptz
	DepartureDelay       pgtype.Int4
	DepartureUncertainty pgtype.Int4
	StopSequence         int32
	Track                pgtype.Text
	Headsign             pgtype.Text
	Pk                   int64
}

type Vehicle

type Vehicle struct {
	Pk                  int64
	ID                  pgtype.Text
	SystemPk            int64
	TripPk              pgtype.Int8
	Label               pgtype.Text
	LicensePlate        pgtype.Text
	CurrentStatus       pgtype.Text
	Bearing             pgtype.Float4
	Odometer            pgtype.Float8
	Speed               pgtype.Float4
	CongestionLevel     string
	UpdatedAt           pgtype.Timestamptz
	CurrentStopPk       pgtype.Int8
	CurrentStopSequence pgtype.Int4
	OccupancyStatus     pgtype.Text
	FeedPk              int64
	OccupancyPercentage pgtype.Int4
	Location            types.Geography
}

Jump to

Keyboard shortcuts

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