Documentation
¶
Index ¶
- Constants
- func ConvertSQLServerUUID(sqlBytes []byte) []byte
- func GetMVRVars(prefix string) map[string]string
- func ParseAndExecuteTemplate(data []byte, config *StreamConfig) ([]byte, error)
- func SortKeys(params []string)
- type Batch
- type Column
- type DBReaderConn
- type DataStream
- type DataWriter
- type Param
- type StreamConfig
Constants ¶
View Source
const (
RFC3339NanoNoTZ = "2006-01-02T15:04:05.999999999"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertSQLServerUUID ¶ added in v0.5.0
func GetMVRVars ¶
func ParseAndExecuteTemplate ¶ added in v0.9.0
func ParseAndExecuteTemplate(data []byte, config *StreamConfig) ([]byte, error)
Types ¶
type Column ¶
type Column struct {
Name string `json:"name" yaml:"name"`
DatabaseType string `json:"database_type" yaml:"database_type"`
Length int64 `json:"length,omitempty" yaml:"length,omitempty"`
Nullable bool `json:"nullable" yaml:"nullable"`
ScanType string `json:"scan_type" yaml:"scan_type"`
Position int `json:"position" yaml:"position"`
Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
Precision int64 `json:"precision,omitempty" yaml:"precision,omitempty"`
}
func OverrideColumns ¶
type DBReaderConn ¶ added in v0.1.0
type DBReaderConn interface {
CreateDataStream(ctx context.Context, cs *url.URL, config *StreamConfig) (*DataStream, error)
ExecuteDataStream(ctx context.Context, ds *DataStream, config *StreamConfig) error
Close() error
}
type DataStream ¶
type DataStream struct {
TotalRows int
Mux sync.Mutex
BatchChan chan Batch
BatchSize int
Columns []Column
DestColumns []Column
}
func (*DataStream) BatchesToWriter ¶
func (ds *DataStream) BatchesToWriter(writer DataWriter)
type DataWriter ¶
type StreamConfig ¶
type StreamConfig struct {
StreamName string `json:"stream_name,omitempty" yaml:"stream_name,omitempty"`
Filename string `json:"filename,omitempty" yaml:"filename,omitempty"`
Format string `json:"format,omitempty" yaml:"format,omitempty"`
SQL string `json:"sql,omitempty" yaml:"sql,omitempty"`
Compression string `json:"compression,omitempty" yaml:"compression,omitempty"`
Columns []Column `json:"columns,omitempty" yaml:"columns,omitempty"`
Params map[string]Param `json:"params,omitempty" yaml:"params,omitempty"`
ParamKeys []string
}
func BuildConfig ¶ added in v0.9.0
func BuildConfig(data []byte, cliArgs *StreamConfig) (*StreamConfig, error)
func NewStreamConfigFromYaml ¶
func NewStreamConfigFromYaml(data []byte) (*StreamConfig, error)
func (*StreamConfig) OverrideValues ¶ added in v0.9.0
func (sc *StreamConfig) OverrideValues(cliArgs *StreamConfig)
func (*StreamConfig) Validate ¶ added in v0.9.0
func (sc *StreamConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.