table

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: GPL-3.0 Imports: 16 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 HTTPExtractor added in v1.7.0

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

HTTPExtractor provides table extraction logic from an HTTP Rest Endpoint.

func NewHTTPExtractor added in v1.7.0

func NewHTTPExtractor(url string, schema string) *HTTPExtractor

NewHTTPExtractor creates a new HTTP extractor.

func (*HTTPExtractor) Extract added in v1.7.0

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

Extract tables from the database.

type HTTPExtractorFactory added in v1.7.0

type HTTPExtractorFactory struct{}

HTTPExtractorFactory exposes methods to create new HTTP extractors.

func NewHTTPExtractorFactory added in v1.7.0

func NewHTTPExtractorFactory() *HTTPExtractorFactory

NewHTTPExtractorFactory creates a new HTTP extractor factory.

func (*HTTPExtractorFactory) New added in v1.7.0

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

New return a HTTP extractor

type MariadbDialect added in v1.10.0

type MariadbDialect struct {
}

func (MariadbDialect) SQL added in v1.10.0

func (d MariadbDialect) SQL(schema string) string

type MariadbExtractorFactory added in v1.10.0

type MariadbExtractorFactory struct{}

MariadbExtractorFactory exposes methods to create new Mariadb extractors.

func NewMariadbExtractorFactory added in v1.10.0

func NewMariadbExtractorFactory() *MariadbExtractorFactory

NewMariadbExtractorFactory creates a new mariadb extractor factory.

func (*MariadbExtractorFactory) New added in v1.10.0

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

New return a Mariadb extractor

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 YAMLColumn added in v1.7.0

type YAMLColumn struct {
	Name   string `yaml:"name"`
	Export string `yaml:"export"`
	Import string `yaml:"import"`
}

YAMLColumn defines how to store a column in YAML format.

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"`
	Columns []YAMLColumn `yaml:"columns,omitempty"`
}

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