sakila

package
v0.48.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sakila holds test constants and such for the sakila test sources.

Index

Constants

View Source
const (
	XLSX             = "@sakila_xlsx"
	XLSXSubset       = "@sakila_xlsx_subset"
	XLSXNoHeader     = "@sakila_xlsx_noheader"
	CSVActor         = "@sakila_csv_actor"
	CSVAddress       = "@sakila_csv_address"
	CSVActorHTTP     = "@sakila_csv_actor_http"
	CSVActorNoHeader = "@sakila_csv_actor_noheader"
	TSVActor         = "@sakila_tsv_actor"
	TSVActorNoHeader = "@sakila_tsv_actor_noheader"
	SL3              = "@sakila_sl3"
	SL3Whitespace    = "@sakila_sl3_whitespace"
	Pg9              = "@sakila_pg9"
	Pg10             = "@sakila_pg10"
	Pg11             = "@sakila_pg11"
	Pg12             = "@sakila_pg12"
	Pg               = Pg12
	My56             = "@sakila_my56"
	My57             = "@sakila_my57"
	My8              = "@sakila_my8"
	My               = My8
	MS17             = "@sakila_ms17"
	MS19             = "@sakila_ms19"
	MS               = MS19
	// AZ1 is the handle for Azure SQL Edge v1.x.
	AZ1 = "@sakila_az1"
	AZ  = AZ1
)

Sakila source handles.

View Source
const (
	TblActor          = "actor"
	TblActorCount     = 200
	TblAddress        = "address"
	TblAddressCount   = 603
	TblFilm           = "film"
	TblFilmCount      = 1000
	TblFilmActor      = "film_actor"
	TblFilmActorCount = 5462
	TblPayment        = "payment"
	TblPaymentCount   = 16049

	// TblFilmText is present in each sakila dataset, except Postgres for
	// some reason.
	TblFilmText   = "film_text"
	ViewActorInfo = "actor_info"
	ViewFilmList  = "film_list"

	MillerEmail  = "MARIA.MILLER@sakilacustomer.org"
	MillerCustID = 7
	MillerAddrID = 11
	MillerCityID = 280
)

Facts regarding the sakila database.

View Source
const (
	ActorCSVURL    = "https://sq.io/testdata/actor.csv"
	ActorCSVSize   = 7641
	ExcelSubsetURL = "https://sq.io/testdata/sakila_subset.xlsx"
	ExcelURL       = "https://sq.io/testdata/sakila.xlsx"
)

URLs for sakila resources.

View Source
const (
	PathSL3              = "drivers/sqlite3/testdata/sakila.db"
	PathXLSX             = "drivers/xlsx/testdata/sakila.xlsx"
	PathXLSXSubset       = "drivers/xlsx/testdata/sakila_subset.xlsx"
	PathXLSXActorHeader  = "drivers/xlsx/testdata/actor_header.xlsx"
	PathCSVActor         = "drivers/csv/testdata/sakila-csv/actor.csv"
	PathCSVActorNoHeader = "drivers/csv/testdata/sakila-csv-noheader/actor.csv"
	PathTSVActor         = "drivers/csv/testdata/sakila-tsv/actor.tsv"
	PathTSVActorNoHeader = "drivers/csv/testdata/sakila-tsv-noheader/actor.tsv"
)

Paths for sakila resources.

Variables

This section is empty.

Functions

func AllHandles

func AllHandles() []string

AllHandles returns all the typical sakila handles. It does not include monotable handles such as @sakila_csv_actor.

func AllTbls

func AllTbls() []string

AllTbls returns all table names.

func AllTblsExceptFilmText

func AllTblsExceptFilmText() []string

AllTblsExceptFilmText exists because our current postgres image is different from the others in that it doesn't have the film_text table.

func AllTblsViews

func AllTblsViews() []string

AllTblsViews returns all table AND view names.

func MSAll

func MSAll() []string

MSAll returns the handles for all SQL Server versions. This includes both SQLServer and Azure SQL Edge.

func MyAll

func MyAll() []string

MyAll returns the handles for all MySQL versions.

func PgAll

func PgAll() []string

PgAll returns the handles for all postgres versions.

func SQLAll

func SQLAll() []string

SQLAll returns all the sakila SQL handles.

func SQLAllExternal

func SQLAllExternal() []string

SQLAllExternal is the same as SQLAll, but only includes external (non-embedded) sources. That is, it excludes SL3.

func SQLLatest

func SQLLatest() []string

SQLLatest returns the handles for the latest version of each supported SQL database. This is provided in addition to SQLAll to enable quicker iterative testing during development.

func TblActorColKinds

func TblActorColKinds() []kind.Kind

TblActorColKinds returns table "actor" column kinds.

func TblActorCols

func TblActorCols() []string

TblActorCols returns table "actor" column names.

func TblAddressColKinds added in v0.32.0

func TblAddressColKinds() []kind.Kind

TblAddressColKinds returns table "address" column kinds.

func TblAddressCols added in v0.32.0

func TblAddressCols() []string

TblAddressCols returns table "address" column names.

func TblFilmActorColKinds

func TblFilmActorColKinds() []kind.Kind

TblFilmActorColKinds returns table "film_actor" column kinds.

func TblFilmActorCols

func TblFilmActorCols() []string

TblFilmActorCols returns table "film" column names.

func TblPaymentColKinds

func TblPaymentColKinds() []kind.Kind

TblPaymentColKinds returns table "payment" column kinds.

func TblPaymentCols

func TblPaymentCols() []string

TblPaymentCols returns table "payment" column names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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