models

package
v0.0.0-...-263783a Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Package models contains the types for schema 'public'.

Index

Constants

This section is empty.

Variables

View Source
var XOLog = func(string, ...interface{}) {}

XOLog provides the log func used by generated queries.

Functions

This section is empty.

Types

type After

type After struct {
	LineCd              int    // line_cd
	LineName            string // line_name
	StationCd           int    // station_cd
	StationName         string // station_name
	Address             string // address
	AfterStationCd      int    // after_station_cd
	AfterStationName    string // after_station_name
	AfterStationGCd     int    // after_station_g_cd
	AfterStationAddress string // after_station_address
}

After represents a row from '[custom after]'.

func AftersByStationCD

func AftersByStationCD(db XODB, stationCD int) ([]*After, error)

AftersByStationCD runs a custom query, returning results as After.

type Before

type Before struct {
	LineCd               int    // line_cd
	LineName             string // line_name
	StationCd            int    // station_cd
	StationName          string // station_name
	Address              string // address
	BeforeStationCd      int    // before_station_cd
	BeforeStationName    string // before_station_name
	BeforeStationGCd     int    // before_station_g_cd
	BeforeStationAddress string // before_station_address
}

Before represents a row from '[custom before]'.

func BeforesByStationCD

func BeforesByStationCD(db XODB, stationCD int) ([]*Before, error)

BeforesByStationCD runs a custom query, returning results as Before.

type ScannerValuer

type ScannerValuer interface {
	sql.Scanner
	driver.Valuer
}

ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.

type Slice

type Slice []ScannerValuer

Slice is a slice of ScannerValuers.

type Station

type Station struct {
	LineCd      int    // line_cd
	LineName    string // line_name
	StationCd   int    // station_cd
	StationGCd  int    // station_g_cd
	StationName string // station_name
	Address     string // address
}

Station represents a row from '[custom station]'.

func StationsByStationCD

func StationsByStationCD(db XODB, stationCD string) ([]*Station, error)

StationsByStationCD runs a custom query, returning results as Station.

type StationByCD

type StationByCD struct {
	LineCd      int    // line_cd
	LineName    string // line_name
	StationCd   int    // station_cd
	StationGCd  int    // station_g_cd
	StationName string // station_name
	Address     string // address
}

StationByCD represents a row from '[custom station_by_c_d]'.

func StationByCDsByStationCD

func StationByCDsByStationCD(db XODB, stationCD int) ([]*StationByCD, error)

StationByCDsByStationCD runs a custom query, returning results as StationByCD.

type StationByName

type StationByName struct {
	LineCd      int    // line_cd
	LineName    string // line_name
	StationCd   int    // station_cd
	StationGCd  int    // station_g_cd
	StationName string // station_name
	Address     string // address
}

StationByName represents a row from '[custom station_by_name]'.

func StationByNamesByStationName

func StationByNamesByStationName(db XODB, stationName string) ([]*StationByName, error)

StationByNamesByStationName runs a custom query, returning results as StationByName.

type StringSlice

type StringSlice []string

StringSlice is a slice of strings.

func (*StringSlice) Scan

func (ss *StringSlice) Scan(src interface{}) error

Scan satisfies the sql.Scanner interface for StringSlice.

func (StringSlice) Value

func (ss StringSlice) Value() (driver.Value, error)

Value satisfies the driver.Valuer interface for StringSlice.

type Transfer

type Transfer struct {
	StationCd           int    // station_cd
	LineCd              int    // line_cd
	LineName            string // line_name
	StationName         string // station_name
	StationGCd          int    // station_g_cd
	Address             string // address
	TransferLineCd      int    // transfer_line_cd
	TransferLineName    string // transfer_line_name
	TransferStationCd   int    // transfer_station_cd
	TransferStationName string // transfer_station_name
	TransferAddress     string // transfer_address
}

Transfer represents a row from '[custom transfer]'.

func TransfersByStationCD

func TransfersByStationCD(db XODB, stationCD int) ([]*Transfer, error)

TransfersByStationCD runs a custom query, returning results as Transfer.

type XODB

type XODB interface {
	Exec(string, ...interface{}) (sql.Result, error)
	Query(string, ...interface{}) (*sql.Rows, error)
	QueryRow(string, ...interface{}) *sql.Row
}

XODB is the common interface for database operations that can be used with types from schema 'public'.

This should work with database/sql.DB and database/sql.Tx.

Jump to

Keyboard shortcuts

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