Documentation ¶
Index ¶
Constants ¶
View Source
const ( DTypeInt = iota DTypeReal DTypeText DTypeID DTypeEnum )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputedTable ¶
type LoadColumn ¶
type LoadSchema ¶
type MobsqlRuntime ¶
type MobsqlRuntime struct { DB *sqlx.DB Schema LoadSchema SchemaExtra *SchemaExtra // Extra SQL schema configuration (views & computed tables config) }
type RuntimeConfig ¶
type RuntimeConfig struct { MobilityDBCatalogCSVURI string `yaml:"mdb_csv,omitempty" json:"mdb_csv,omitempty"` // URI (file:// or http://) of Mobility Database Catalog CSV URI (use load custom GTFS), default Mobility DB bit.ly SQLiteDBPath string `yaml:"sqlite_db,omitempty" json:"sqlite_db,omitempty"` // Filesystem path for the SQLite DB, if "" uses default of ~/.cache/mobsql/sqlite.db AllowFileURIs bool `yaml:"allow_file_uris,omitempty" json:"allow_file_uris,omitempty"` // Whether to allow loading CSV/GTFS sources from local filepaths (file:// URIs) LogInfo bool `yaml:"log_info,omitempty" json:"log_info,omitempty"` // Whether to enable info messages LogWarn bool `yaml:"log_warn,omitempty" json:"log_warn,omitempty"` // Whether to enable warning messages LogDebug bool `yaml:"log_debug,omitempty" json:"log_debug,omitempty"` // Whether to enable debug messages SchemaExtra *SchemaExtra `yaml:"-" json:"-"` // Extra SQL schema configuration (views & computed tables config) }
RuntimeConfig contains the configuration for the Mobsql application passed on each operation.
SourcesetFilter represents the filter that is used to match against Mobility Database catalog sources allowing specifying mdbid's, geography, globs, bounding box matches, and similar.
type SchemaExtra ¶
type SchemaExtra struct { InitExec string // Arbitrary SQL to execute at initialization (can be used for pragmas etc.) TablesComputed []ComputedTable // Computed table specifications to create Views []View // SQL views to create }
SchemaExtra represents extra arbitrary SQL views & computed tables that may build upon the source GTFS tables.
type SourcesetOpResult ¶
type SourcesetOpResult struct { Operation string `json:"operation"` // Name of operation (compute/purge/load) Success bool `json:"success"` // Whether the operation was successful Mdbids []int `json:"mdbids"` // Array of mdbids matched / performed against }
SourcesetOpResult represents the result of a Compute, Purge, or Load request exposing whether the operation was successful and the effected mdbids.
Click to show internal directories.
Click to hide internal directories.