transfers

package
v0.0.0-...-651d898 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTransferParams

type CreateTransferParams struct {
	ID              int32          `db:"id"`
	FromStopID      sql.NullString `db:"from_stop_id"`
	ToStopID        sql.NullString `db:"to_stop_id"`
	FromRouteID     sql.NullString `db:"from_route_id"`
	ToRouteID       sql.NullString `db:"to_route_id"`
	FromTripID      sql.NullString `db:"from_trip_id"`
	ToTripID        sql.NullString `db:"to_trip_id"`
	TransferType    TransferType   `db:"transfer_type"`
	MinTransferTime sql.NullInt32  `db:"min_transfer_time"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type NullTransferType

type NullTransferType struct {
	TransferType TransferType
	Valid        bool // Valid is true if TransferType is not NULL
}

func (*NullTransferType) Scan

func (ns *NullTransferType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTransferType) Value

func (ns NullTransferType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CreateTransfer

func (q *Queries) CreateTransfer(ctx context.Context, arg CreateTransferParams) error

func (*Queries) GetTransferByID

func (q *Queries) GetTransferByID(ctx context.Context, id int32) (Transfer, error)

func (*Queries) WithTx

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

type Transfer

type Transfer struct {
	ID              int32          `csv:"id"`
	FromStopID      sql.NullString `csv:"from_stop_id,omitempty"`
	ToStopID        sql.NullString `csv:"to_stop_id,omitempty"`
	FromRouteID     sql.NullString `csv:"from_route_id,omitempty"`
	ToRouteID       sql.NullString `csv:"to_route_id,omitempty"`
	FromTripID      sql.NullString `csv:"from_trip_id,omitempty"`
	ToTripID        sql.NullString `csv:"to_trip_id,omitempty"`
	TransferType    TransferType   `csv:"transfer_type"`
	MinTransferTime sql.NullInt32  `csv:"min_transfer_time,omitempty"`
}

type TransferType

type TransferType string
const (
	TransferTypeRecommendedTransferPoint TransferType = "RecommendedTransferPoint"
	TransferTypeTimedTransferPoint       TransferType = "TimedTransferPoint"
	TransferTypeMinimumTransferTime      TransferType = "MinimumTransferTime"
	TransferTypeTransferNotPossible      TransferType = "TransferNotPossible"
	TransferTypeInSeatTransfer           TransferType = "InSeatTransfer"
	TransferTypeInSeatTransferNotAllowed TransferType = "InSeatTransferNotAllowed"
)

func (*TransferType) Scan

func (e *TransferType) Scan(src interface{}) error

Jump to

Keyboard shortcuts

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