dbgen

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

dbgen

This dbgen was port from TPC-H dbgen v2.4.0.

Official TPC-H benchmark - http://www.tpc.org/tpch

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LPkeyMax dssHuge
)

Functions

func DbGen

func DbGen(loaders map[Table]Loader, tables []Table) error

func FmtMoney

func FmtMoney(m dssHuge) string

func InitDbGen

func InitDbGen(sc int64)

func NewCustLoader added in v1.0.8

func NewCustLoader(w io.Writer) custLoader

func NewLineItemLoader added in v1.0.8

func NewLineItemLoader(w io.Writer) lineItemLoader

func NewNationLoader added in v1.0.8

func NewNationLoader(w io.Writer) nationLoader

func NewOrderLoader added in v1.0.8

func NewOrderLoader(w io.Writer) orderLoader

func NewPartLoader added in v1.0.8

func NewPartLoader(w io.Writer) partLoader

func NewPartSuppLoader added in v1.0.8

func NewPartSuppLoader(w io.Writer) partSuppLoader

func NewRegionLoader added in v1.0.8

func NewRegionLoader(w io.Writer) regionLoader

func NewSuppLoader added in v1.0.8

func NewSuppLoader(w io.Writer) suppLoader

Types

type Cust

type Cust struct {
	CustKey    dssHuge
	Name       string
	Address    string
	NationCode dssHuge
	Phone      string
	Acctbal    dssHuge
	MktSegment string
	Comment    string
}

type LineItem

type LineItem struct {
	OKey         dssHuge
	PartKey      dssHuge
	SuppKey      dssHuge
	LCnt         dssHuge
	Quantity     dssHuge
	EPrice       dssHuge
	Discount     dssHuge
	Tax          dssHuge
	RFlag        string
	LStatus      string
	CDate        string
	SDate        string
	RDate        string
	ShipInstruct string
	ShipMode     string
	Comment      string
}

type Loader

type Loader interface {
	Load(item interface{}) error
	Flush() error
}

type Nation

type Nation struct {
	Code    dssHuge
	Text    string
	Join    long
	Comment string
}

type Order

type Order struct {
	OKey          dssHuge
	CustKey       dssHuge
	Status        string
	TotalPrice    dssHuge
	Date          string
	OrderPriority string
	Clerk         string
	ShipPriority  int64
	Comment       string
	Lines         []LineItem
}

type OrderLine

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

type Part

type Part struct {
	PartKey     dssHuge
	Name        string
	Mfgr        string
	Brand       string
	Type        string
	Size        dssHuge
	Container   string
	RetailPrice dssHuge
	Comment     string
	S           []PartSupp
}

type PartSupp

type PartSupp struct {
	PartKey dssHuge
	SuppKey dssHuge
	Qty     dssHuge
	SCost   dssHuge
	Comment string
}

type Region

type Region struct {
	Code    dssHuge
	Text    string
	Join    long
	Comment string
}

type Seed

type Seed struct {
	Table
	// contains filtered or unexported fields
}

type Supp

type Supp struct {
	SuppKey    dssHuge
	Name       string
	Address    string
	NationCode dssHuge
	Phone      string
	Acctbal    dssHuge
	Comment    string
}

type Table

type Table int
const (
	TNone Table = iota - 1
	TPart
	TPsupp
	TSupp
	TCust
	TOrder
	TLine
	TOrderLine
	TPartPsupp
	TNation
	TRegion
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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