sqlc

package
v0.0.0-...-a6a4912 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aircraft

type Aircraft struct {
	// Aircraft code, IATA
	AircraftCode string
	// Aircraft model
	Model string
	// Maximal flying distance, km
	Range int32
}

type AircraftsDatum

type AircraftsDatum struct {
	// Aircraft code, IATA
	AircraftCode string
	// Aircraft model
	Model string
	// Maximal flying distance, km
	Range     int32
	CompanyID int64
	CreatedAt time.Time
}

Aircrafts (internal data)

type AirlineCompany

type AirlineCompany struct {
	CompanyID   int64
	CompanyName string
	IataCode    string
	MainAirport string
	CreatedAt   time.Time
}

type Airport

type Airport struct {
	// Airport code
	AirportCode string
	// Airport name
	AirportName string
	// Country
	Country string
	// City
	City string
	// Airport coordinates (longitude and latitude)
	Coordinates interface{}
	Timezone    string
	CreatedAt   time.Time
}

type AirportsDatum

type AirportsDatum struct {
	// Airport code
	AirportCode string
	// Airport name
	AirportName string
	// Country
	CountryCode string
	// City
	City string
	// Airport coordinates (longitude and latitude)
	Coordinates interface{}
	// Airport time zone
	Timezone string
	// time airport record Created
	CreatedAt time.Time
}

Airports (internal data)

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 Querier

type Querier interface {
	CreateAircraft(ctx context.Context, arg CreateAircraftParams) (AircraftsDatum, error)
	CreateAirlineCompany(ctx context.Context, arg CreateAirlineCompanyParams) (AirlineCompany, error)
	CreateAirportList(ctx context.Context, arg CreateAirportListParams) ([]AirportsDatum, error)
	CreateAirports(ctx context.Context, arg CreateAirportsParams) (AirportsDatum, error)
	DeleteAircraft(ctx context.Context, aircraftCode string) error
	DeleteAirlineCompany(ctx context.Context, companyID int64) error
	DeleteAirports(ctx context.Context, airportCode string) error
	GetAircraft(ctx context.Context, aircraftCode string) (AircraftsDatum, error)
	GetAirlineCompany(ctx context.Context, companyID int64) (AirlineCompany, error)
	GetAirports(ctx context.Context, airportCode string) (AirportsDatum, error)
	ListAircraft(ctx context.Context) ([]AircraftsDatum, error)
	ListAirlineCompany(ctx context.Context) ([]AirlineCompany, error)
	ListAirports(ctx context.Context) ([]ListAirportsRow, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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