Documentation ¶
Index ¶
- func ConvertTextEncoding(reader io.Reader, textEncoding *string) io.Reader
- type BaseTableConfig
- func (cfg *BaseTableConfig) DetectSchema(ctx context.Context, fetcher Fetcher, ignoreLines int, ...) error
- func (cfg *BaseTableConfig) FetchRows(ctx context.Context, fetcher Fetcher, ignoreLines int) ([][]interface{}, error)
- func (cfg *BaseTableConfig) Restrict(schema string) error
- func (cfg *BaseTableConfig) ToTable() *psqlfront.Table
- type ColumnConfig
- type ColumnConfigs
- type Fetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseTableConfig ¶
type BaseTableConfig struct { Name string `yaml:"name,omitempty"` Columns ColumnConfigs `yaml:"columns,omitempty"` // contains filtered or unexported fields }
func (*BaseTableConfig) DetectSchema ¶
func (*BaseTableConfig) Restrict ¶
func (cfg *BaseTableConfig) Restrict(schema string) error
func (*BaseTableConfig) ToTable ¶
func (cfg *BaseTableConfig) ToTable() *psqlfront.Table
type ColumnConfig ¶
type ColumnConfig struct { Name string `yaml:"name,omitempty"` DataType string `yaml:"data_type,omitempty"` DataLength *int `yaml:"length,omitempty"` Contraint string `yaml:"contraint,omitempty"` ColumnIndex *int `yaml:"column_index,omitempty"` IsUnicodeName bool `yaml:"is_unicode_name,omitempty"` }
type ColumnConfigs ¶
type ColumnConfigs []*ColumnConfig
func PerformSchemaInference ¶
func PerformSchemaInference(rows [][]string, ignoreLines int, allowUnicodeColumName bool) (ColumnConfigs, error)
func (ColumnConfigs) Restrict ¶
func (cfgs ColumnConfigs) Restrict() error
func (ColumnConfigs) ToColumns ¶
func (cfgs ColumnConfigs) ToColumns() []*psqlfront.Column
func (ColumnConfigs) ToRows ¶
func (cfgs ColumnConfigs) ToRows(records [][]string, ignoreLines int) [][]interface{}
Click to show internal directories.
Click to hide internal directories.