Documentation ¶
Overview ¶
Package config contains the data structures used to represent the database schema for seeding and loading
Index ¶
Constants ¶
View Source
const ( // E.g. per GTFS spec must support HH:MM:SS and H:MM:SS SQLConvertHHMMSSToSeconds = `` /* 136-byte string literal not displayed */ )
Variables ¶
View Source
var SQLView_vfeedsmetadata string
View Source
var SQLView_vfeedsminmaxdates string
View Source
var Schema = apptypes.LoadSchema{ TableSystemTracking: apptypes.TableSpec{ Table: "_mobsqltrack", UniqueSet: []string{"feed_id", "feed_id_pair", "tbl"}, Columns: []apptypes.LoadColumn{ {Column: "feed_id", DType: apptypes.DTypeInt, Required: true}, {Column: "feed_id_pair", DType: apptypes.DTypeInt, Required: false}, {Column: "tbl", DType: apptypes.DTypeText, Required: true}, {Column: "checksum", DType: apptypes.DTypeText, Required: true}, {Column: "n_rows", DType: apptypes.DTypeInt, Required: true}, {Column: "timestamp", DType: apptypes.DTypeInt, Required: true}, }, }, TableSystemGTFSSourceCustom: apptypes.TableSpec{ Table: "_gtfssource_custom", UniqueSet: []string{"customgtfs_feed_id"}, Columns: []apptypes.LoadColumn{ {Column: "customgtfs_feed_id", DType: apptypes.DTypeInt, Required: true, Check: `customgtfs_feed_id < -1`}, {Column: "gtfs_uri", DType: apptypes.DTypeText, Required: true}, }, }, TableSystemGTFSSourceMDB: apptypes.TableSpec{ Table: "_gtfssource_mdbcsv", UniqueSet: []string{"mdb_source_id"}, Columns: []apptypes.LoadColumn{ {Column: "feed_id", DType: apptypes.DTypeInt, Required: true, Check: `feed_id = -1`}, {Column: "data_type", DType: apptypes.DTypeText, Required: true}, {Column: "location.bounding_box.minimum_latitude", DType: apptypes.DTypeReal}, {Column: "location.bounding_box.minimum_longitude", DType: apptypes.DTypeReal}, {Column: "location.bounding_box.maximum_latitude", DType: apptypes.DTypeReal}, {Column: "location.bounding_box.maximum_longitude", DType: apptypes.DTypeReal}, {Column: "location.country_code", DType: apptypes.DTypeText}, {Column: "location.subdivision_name", DType: apptypes.DTypeText}, {Column: "location.municipality", DType: apptypes.DTypeText}, {Column: "urls.latest", DType: apptypes.DTypeText}, {Column: "urls.license", DType: apptypes.DTypeText, Required: false}, {Column: "mdb_source_id", DType: apptypes.DTypeInt, Required: true, Check: `mdb_source_id >= 0`}, {Column: "name", DType: apptypes.DTypeText}, {Column: "status", DType: apptypes.DTypeText}, {Column: "provider", DType: apptypes.DTypeText, Required: true}, }, }, TablesGTFS: tablesGTFS, ViewsSystem: []apptypes.View{ { Name: "_vfeedsminmaxdates", Doc: "Internal view to show min/max dates for calendar/calendar_dates per feed_id", SQLCreateStatement: SQLView_vfeedsminmaxdates, }, { Name: "_vfeedsmetadata", Doc: "Internal view overlaying the mobility database & mobsql tracking table", SQLCreateStatement: SQLView_vfeedsmetadata, }, }, }
Functions ¶
func NativeConvertHHMMSSToSeconds ¶ added in v0.8.0
NativeConvertHHMMSSToSeconds converts a colon time such as 11:20:03 to an integer value such as 40803
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.