runner

package
v0.0.0-...-abf6529 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: LGPL-2.1 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBCFG

func NewDBCFG() (string, error)

Types

type CFG

type CFG struct {
	Name     string `json:"config_name"`
	DBName   string `json:"dbName"`
	Password string `json:"password"`
	Port     string `json:"port"`
	SSLMode  string `json:"sslMode"`
	Username string `json:"username"`
}

func LoadConfigs

func LoadConfigs() ([]CFG, error)

func (CFG) DBConnection

func (c CFG) DBConnection() string

type PGTable

type PGTable struct {
	Catalog string `db:"table_catalog"`
	Name    string `db:"table_name"`
	Owner   string `db:"table_type"`
	Schema  string `db:"table_schema"`
	Size    string `db:"table_data_size"`
}

type Runner

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

func New

func New(db *sql.DB) *Runner

func (*Runner) Close

func (r *Runner) Close() error

func (*Runner) ColumnsFrequency

func (r *Runner) ColumnsFrequency(ctx context.Context) error

func (*Runner) DescribeTable

func (r *Runner) DescribeTable(ctx context.Context, table string) error

func (*Runner) MaterializedViews

func (r *Runner) MaterializedViews(ctx context.Context) error

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, debug bool) error

func (*Runner) Schemas

func (r *Runner) Schemas(ctx context.Context) error

func (*Runner) SchemasUserCreated

func (r *Runner) SchemasUserCreated(ctx context.Context) error

func (*Runner) Tables

func (r *Runner) Tables(ctx context.Context) error

func (*Runner) TablesByRows

func (r *Runner) TablesByRows(ctx context.Context) error

func (*Runner) TablesBySchema

func (r *Runner) TablesBySchema(ctx context.Context) error

func (*Runner) TablesBySize

func (r *Runner) TablesBySize(ctx context.Context) error

func (*Runner) TablesBySizeWithIndex

func (r *Runner) TablesBySizeWithIndex(ctx context.Context) error

func (*Runner) TablesEmpty

func (r *Runner) TablesEmpty(ctx context.Context) error

func (*Runner) TablesGroupByRows

func (r *Runner) TablesGroupByRows(ctx context.Context) error

func (*Runner) Version

func (r *Runner) Version(ctx context.Context) error

func (*Runner) Views

func (r *Runner) Views(ctx context.Context) error

type Schema

type Schema struct {
	Name        string `db:"schema_name"`
	Owner       string `db:"schema_owner"`
	CatalogName string `db:"catalog_name"`
}

type StateFn

type StateFn func(context.Context, *Runner) (StateFn, error)

Jump to

Keyboard shortcuts

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