dbt

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package dbt (short for database type) contains the types for data extracted by the database by the dbquery package. Isolation provides more clarity that the types in this dbt package can be used independently of dbquery itself. For example the csa package utilizes this dbt package; but the tests themsleves for CSA don't touch the db at all.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalToService

type CalToService struct {
	Source      int    `db:"source"`
	ServiceDate int    `db:"service_date"`
	ServiceID   string `db:"service_id"`
}

CalToService maps a given service_date to a service_id for a source. This is a direct representiation of a row from _vcaltoservice.

type Connection

type Connection struct {
	ConnID string `db:"conn_id"`
	TripID string `db:"trip_id"`

	FromST           int    `db:"from_stop_drutctime"`
	FromStopSequence string `db:"from_stop_sequence"`
	FromSSIDU        string `db:"from_stop_sidu"`

	ToSSIDU        string `db:"to_stop_sidu"`
	ToStopSequence string `db:"to_stop_sequence"`
	ToST           int    `db:"to_stop_drutctime"`
}

type ConnectionVerbose

type ConnectionVerbose struct {
	Source            int     `db:"source" json:"source,omitempty"`
	ConnID            string  `db:"conn_id" json:"conn_id,omitempty"`
	ServiceID         string  `db:"service_id" json:"service_id,omitempty"`
	ServiceDate       string  `db:"service_date" json:"service_date,omitempty"`
	FromStopID        string  `db:"from_stop_id" json:"from_stop_id,omitempty"`
	DirectionID       *int    `db:"direction_id" json:"direction_id,omitempty"`
	FromStopSequence  int     `db:"from_stop_sequence" json:"from_stop_sequence,omitempty"`
	FromStopIDU       string  `db:"from_stop_idu" json:"from_stop_idu,omitempty"`
	FromStopSIDU      string  `db:"from_stop_sidu" json:"from_stop_sidu,omitempty"`
	FromStopLat       float64 `db:"from_stop_lat" json:"from_stop_lat,omitempty"`
	FromStopLon       float64 `db:"from_stop_lon" json:"from_stop_lon,omitempty"`
	FromStopName      string  `db:"from_stop_name" json:"from_stop_name,omitempty"`
	FromStopTime      uint    `db:"from_stop_time" json:"from_stop_time,omitempty"`
	FromStopDRUTCTime int     `db:"from_stop_drutctime" json:"from_stop_drutctime,omitempty"`
	RouteID           string  `db:"route_id" json:"route_id,omitempty"`
	AgencyID          *string `db:"agency_id" json:"agency_id,omitempty"`
	RouteShortName    *string `db:"route_short_name" json:"route_short_name,omitempty"`
	RouteLongName     *string `db:"route_long_name" json:"route_long_name,omitempty"`
	TripID            string  `db:"trip_id" json:"tid,omitempty"`
	ToStopSequence    string  `db:"to_storutctime" json:"to_storutctime,omitempty"`
	ToStopID          string  `db:"to_stop_id" json:"to_stop_id,omitempty"`
	ToStopIDU         string  `db:"to_stop_idu" json:"to_stop_idu,omitempty"`
	ToStopSIDU        string  `db:"to_stop_sidu" json:"to_stop_sidu,omitempty"`
	ToStopLat         float64 `db:"to_stop_lat" json:"to_stop_lat,omitempty"`
	ToStopLon         float64 `db:"to_stop_lon" json:"to_stop_lon,omitempty"`
	ToStopName        string  `db:"to_stop_name" json:"to_stop_name,omitempty"`
	ToStopTime        uint    `db:"to_stop_time" json:"to_stop_time,omitempty"`
	ToStopDRUTCTime   int     `db:"to_stop_drutctime" json:"to_stop_drutctime,omitempty"`
	TripHeadsign      *string `db:"trip_headsign" json:"trip_headsign,omitempty"`
}

type StopToParent

type StopToParent struct {
	Source        int    `db:"source"`
	StopID        string `db:"stop_id"`
	ParentStation string `db:"parent_station"`
}

StopToParent maps a given stop_id to its "ultimate" parent for a source. This is a direct representation of a row from _vstopparent.

type StopWalk

type StopWalk struct {
	StopSIDU string   `db:"stop_sidu"`
	StopName string   `db:"stop_name"`
	DistKM   *float64 `db:"dist_km"`
}

type Transfer

type Transfer struct {
	FromSource  int    `db:"from_source"`
	FromSSIDU   string `db:"from_stop_sidu"`
	FromStopIDU string `db:"from_stop_idu"`
	FromStopID  string `db:"from_stop_id"`

	ToSource  int    `db:"to_source"`
	ToSSIDU   string `db:"to_stop_sidu"`
	ToStopIDU string `db:"to_stop_idu"`
	ToStopID  string `db:"to_stop_id"`

	TransferCategory string `db:"transfer_category"`
	TransferSeconds  uint   `db:"transfer_seconds"`
}

Jump to

Keyboard shortcuts

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