table

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Version string = "v1"

Version of the YAML strcuture.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db2Dialect added in v1.4.0

type Db2Dialect struct{}

func (Db2Dialect) SQL added in v1.4.0

func (d Db2Dialect) SQL(schema string) string

type Db2ExtractorFactory added in v1.4.0

type Db2ExtractorFactory struct{}

Db2ExtractorFactory exposes methods to create new Db2 extractors.

func NewDb2ExtractorFactory added in v1.4.0

func NewDb2ExtractorFactory() *Db2ExtractorFactory

NewDb2ExtractorFactory creates a new postgres extractor factory.

func (*Db2ExtractorFactory) New added in v1.4.0

func (e *Db2ExtractorFactory) New(url string, schema string) table.Extractor

New return a Db2 extractor

type Dialect

type Dialect interface {
	SQL(schema string) string
}

type MockDialect

type MockDialect struct {
	mock.Mock
}

MockDialect is an autogenerated mock type for the Dialect type

func (*MockDialect) SQL

func (_m *MockDialect) SQL(schema string) string

SQL provides a mock function with given fields: schema

type OracleDialect

type OracleDialect struct{}

func (OracleDialect) SQL

func (d OracleDialect) SQL(schema string) string

type OracleExtractorFactory

type OracleExtractorFactory struct{}

OracleExtractorFactory exposes methods to create new Oracle extractors.

func NewOracleExtractorFactory

func NewOracleExtractorFactory() *OracleExtractorFactory

NewOracleExtractorFactory creates a new oracle extractor factory.

func (*OracleExtractorFactory) New

func (e *OracleExtractorFactory) New(url string, schema string) table.Extractor

New return a Oracle extractor

type PostgresDialect

type PostgresDialect struct {
}

func (PostgresDialect) SQL

func (d PostgresDialect) SQL(schema string) string

type PostgresExtractorFactory

type PostgresExtractorFactory struct{}

PostgresExtractorFactory exposes methods to create new Postgres extractors.

func NewPostgresExtractorFactory

func NewPostgresExtractorFactory() *PostgresExtractorFactory

NewPostgresExtractorFactory creates a new postgres extractor factory.

func (*PostgresExtractorFactory) New

New return a Postgres extractor

type SQLExtractor

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

SQLExtractor provides table extraction logic from SQL database.

func NewSQLExtractor

func NewSQLExtractor(url string, schema string, dialect Dialect) *SQLExtractor

NewSQLExtractor creates a new SQL extractor.

func (*SQLExtractor) Extract

func (e *SQLExtractor) Extract() ([]table.Table, *table.Error)

Extract tables from the database.

type YAMLStorage

type YAMLStorage struct{}

YAMLStorage provides storage in a local YAML file

func NewYAMLStorage

func NewYAMLStorage() *YAMLStorage

NewYAMLStorage create a new YAML storage

func (YAMLStorage) List

func (s YAMLStorage) List() ([]table.Table, *table.Error)

List all tables stored in the YAML file

func (YAMLStorage) Store

func (s YAMLStorage) Store(tables []table.Table) *table.Error

Store tables in the YAML file

type YAMLStructure

type YAMLStructure struct {
	Version string      `yaml:"version"`
	Tables  []YAMLTable `yaml:"tables,omitempty"`
}

YAMLStructure of the file.

type YAMLTable

type YAMLTable struct {
	Name string   `yaml:"name"`
	Keys []string `yaml:"keys"`
}

YAMLTable defines how to store a table in YAML format.

Jump to

Keyboard shortcuts

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