Documentation ¶
Index ¶
- func NewJSONRowIterator(file io.ReadCloser) push.RowIterator
- func NewJSONRowWriter(file io.Writer) push.RowWriter
- type JSONRowIterator
- type JSONRowWriter
- type MockSQLDialect
- func (_m *MockSQLDialect) ConvertValue(_a0 push.Value) push.Value
- func (_m *MockSQLDialect) DisableConstraintsStatement(tableName string) string
- func (_m *MockSQLDialect) EnableConstraintsStatement(tableName string) string
- func (_m *MockSQLDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
- func (_m *MockSQLDialect) IsDuplicateError(_a0 error) bool
- func (_m *MockSQLDialect) Placeholder(_a0 int) string
- func (_m *MockSQLDialect) TruncateStatement(tableName string) string
- func (_m *MockSQLDialect) UpdateStatement(tableName string, columns []string, uValues []string, primaryKeys []string, ...) (string, *push.Error)
- type OracleDataDestinationFactory
- type OracleDialect
- func (d OracleDialect) ConvertValue(from push.Value) push.Value
- func (d OracleDialect) DisableConstraintsStatement(tableName string) string
- func (d OracleDialect) EnableConstraintsStatement(tableName string) string
- func (d OracleDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
- func (d OracleDialect) IsDuplicateError(err error) bool
- func (d OracleDialect) Placeholder(position int) string
- func (d OracleDialect) TruncateStatement(tableName string) string
- func (d OracleDialect) UpdateStatement(tableName string, columns []string, uValues []string, primaryKeys []string, ...) (string, *push.Error)
- type PostgresDataDestinationFactory
- type PostgresDialect
- func (d PostgresDialect) ConvertValue(from push.Value) push.Value
- func (d PostgresDialect) DisableConstraintsStatement(tableName string) string
- func (d PostgresDialect) EnableConstraintsStatement(tableName string) string
- func (d PostgresDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
- func (d PostgresDialect) IsDuplicateError(err error) bool
- func (d PostgresDialect) Placeholder(position int) string
- func (d PostgresDialect) TruncateStatement(tableName string) string
- func (d PostgresDialect) UpdateStatement(tableName string, columns []string, uValues []string, primaryKeys []string, ...) (string, *push.Error)
- type SQLDataDestination
- type SQLDialect
- type SQLRowWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJSONRowIterator ¶
func NewJSONRowIterator(file io.ReadCloser) push.RowIterator
NewJSONRowIterator creates a new JSONRowIterator.
Types ¶
type JSONRowIterator ¶
type JSONRowIterator struct {
// contains filtered or unexported fields
}
JSONRowIterator export rows to JSON format.
func (*JSONRowIterator) Error ¶
func (re *JSONRowIterator) Error() *push.Error
Error return error catch by next
func (*JSONRowIterator) Next ¶
func (re *JSONRowIterator) Next() bool
Next try to convert next line to Row
func (*JSONRowIterator) Value ¶
func (re *JSONRowIterator) Value() *push.Row
Value return current row
type JSONRowWriter ¶
type JSONRowWriter struct {
// contains filtered or unexported fields
}
JSONRowWriter export rows to JSON format.
type MockSQLDialect ¶
MockSQLDialect is an autogenerated mock type for the SQLDialect type
func (*MockSQLDialect) ConvertValue ¶
func (_m *MockSQLDialect) ConvertValue(_a0 push.Value) push.Value
ConvertValue provides a mock function with given fields: _a0
func (*MockSQLDialect) DisableConstraintsStatement ¶
func (_m *MockSQLDialect) DisableConstraintsStatement(tableName string) string
DisableConstraintsStatement provides a mock function with given fields: tableName
func (*MockSQLDialect) EnableConstraintsStatement ¶
func (_m *MockSQLDialect) EnableConstraintsStatement(tableName string) string
EnableConstraintsStatement provides a mock function with given fields: tableName
func (*MockSQLDialect) InsertStatement ¶
func (_m *MockSQLDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
InsertStatement provides a mock function with given fields: tableName, columns, values, primaryKeys
func (*MockSQLDialect) IsDuplicateError ¶
func (_m *MockSQLDialect) IsDuplicateError(_a0 error) bool
IsDuplicateError provides a mock function with given fields: _a0
func (*MockSQLDialect) Placeholder ¶
func (_m *MockSQLDialect) Placeholder(_a0 int) string
Placeholder provides a mock function with given fields: _a0
func (*MockSQLDialect) TruncateStatement ¶
func (_m *MockSQLDialect) TruncateStatement(tableName string) string
TruncateStatement provides a mock function with given fields: tableName
func (*MockSQLDialect) UpdateStatement ¶
func (_m *MockSQLDialect) UpdateStatement(tableName string, columns []string, uValues []string, primaryKeys []string, pValues []string) (string, *push.Error)
UpdateStatement provides a mock function with given fields: tableName, columns, uValues, primaryKeys, pValues
type OracleDataDestinationFactory ¶
type OracleDataDestinationFactory struct{}
OracleDataDestinationFactory exposes methods to create new Oracle extractors.
func NewOracleDataDestinationFactory ¶
func NewOracleDataDestinationFactory() *OracleDataDestinationFactory
NewOracleDataDestinationFactory creates a new Oracle datadestination factory.
func (*OracleDataDestinationFactory) New ¶
func (e *OracleDataDestinationFactory) New(url string, schema string) push.DataDestination
New return a Oracle pusher
type OracleDialect ¶
type OracleDialect struct{}
OracleDialect inject oracle variations
func (OracleDialect) ConvertValue ¶
func (d OracleDialect) ConvertValue(from push.Value) push.Value
ConvertValue before load
func (OracleDialect) DisableConstraintsStatement ¶
func (d OracleDialect) DisableConstraintsStatement(tableName string) string
DisableConstraintsStatement generate statments to deactivate constraintes
func (OracleDialect) EnableConstraintsStatement ¶
func (d OracleDialect) EnableConstraintsStatement(tableName string) string
EnableConstraintsStatement generate statments to activate constraintes
func (OracleDialect) InsertStatement ¶
func (d OracleDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
InsertStatement generate insert statement
func (OracleDialect) IsDuplicateError ¶
func (d OracleDialect) IsDuplicateError(err error) bool
IsDuplicateError check if error is a duplicate error
func (OracleDialect) Placeholder ¶
func (d OracleDialect) Placeholder(position int) string
Placeholde return the variable format for postgres
func (OracleDialect) TruncateStatement ¶
func (d OracleDialect) TruncateStatement(tableName string) string
TruncateStatement generate statement to truncat table content
type PostgresDataDestinationFactory ¶
type PostgresDataDestinationFactory struct{}
PostgresDataDestinationFactory exposes methods to create new Postgres pullers.
func NewPostgresDataDestinationFactory ¶
func NewPostgresDataDestinationFactory() *PostgresDataDestinationFactory
NewPostgresDataDestinationFactory creates a new postgres datadestination factory.
func (*PostgresDataDestinationFactory) New ¶
func (e *PostgresDataDestinationFactory) New(url string, schema string) push.DataDestination
New return a Postgres pusher
type PostgresDialect ¶
type PostgresDialect struct{}
PostgresDialect inject postgres variations
func (PostgresDialect) ConvertValue ¶
func (d PostgresDialect) ConvertValue(from push.Value) push.Value
ConvertValue before load
func (PostgresDialect) DisableConstraintsStatement ¶
func (d PostgresDialect) DisableConstraintsStatement(tableName string) string
DisableConstraintsStatement generate statments to deactivate constraintes
func (PostgresDialect) EnableConstraintsStatement ¶
func (d PostgresDialect) EnableConstraintsStatement(tableName string) string
EnableConstraintsStatement generate statments to activate constraintes
func (PostgresDialect) InsertStatement ¶
func (d PostgresDialect) InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string
InsertStatement generate insert statement
func (PostgresDialect) IsDuplicateError ¶
func (d PostgresDialect) IsDuplicateError(err error) bool
IsDuplicateError check if error is a duplicate error
func (PostgresDialect) Placeholder ¶
func (d PostgresDialect) Placeholder(position int) string
Placeholde return the variable format for postgres
func (PostgresDialect) TruncateStatement ¶
func (d PostgresDialect) TruncateStatement(tableName string) string
TruncateStatement generate statement to truncat table content
type SQLDataDestination ¶
type SQLDataDestination struct {
// contains filtered or unexported fields
}
SQLDataDestination read data from a SQL database.
func NewSQLDataDestination ¶
func NewSQLDataDestination(url string, schema string, dialect SQLDialect) *SQLDataDestination
NewSQLDataDestination creates a new SQL datadestination.
func (*SQLDataDestination) Close ¶
func (dd *SQLDataDestination) Close() *push.Error
Close SQL connections
func (*SQLDataDestination) Commit ¶
func (dd *SQLDataDestination) Commit() *push.Error
Commit SQL for connection
type SQLDialect ¶
type SQLDialect interface { Placeholder(int) string DisableConstraintsStatement(tableName string) string EnableConstraintsStatement(tableName string) string TruncateStatement(tableName string) string InsertStatement(tableName string, columns []string, values []string, primaryKeys []string) string UpdateStatement(tableName string, columns []string, uValues []string, primaryKeys []string, pValues []string) (string, *push.Error) IsDuplicateError(error) bool ConvertValue(push.Value) push.Value }
SQLDialect is an interface to inject SQL variations
type SQLRowWriter ¶
type SQLRowWriter struct {
// contains filtered or unexported fields
}
SQLRowWriter write data to a SQL table.
func NewSQLRowWriter ¶
func NewSQLRowWriter(table push.Table, dd *SQLDataDestination) *SQLRowWriter
NewSQLRowWriter creates a new SQL row writer.