Documentation ¶
Index ¶
- func FilterRelation(row Row, relations map[string]Relation) (Row, map[string]Row, map[string][]Row, *Error)
- func IsValidMode(value byte) bool
- func Modes() [4]string
- func ParseMode(mode string) (Mode, *Error)
- type DataDestination
- type DataDestinationFactory
- type Error
- type MockDataDestination
- type MockDataDestinationFactory
- type MockPlan
- type MockRelation
- type MockRowIterator
- type MockRowPusher
- type MockRowWriter
- type MockTable
- type MockValue
- type Mode
- type NoErrorCaptureRowWriter
- type Plan
- type Relation
- type Row
- type RowIterator
- type RowWriter
- type StopIteratorError
- type Table
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterRelation ¶
func FilterRelation(row Row, relations map[string]Relation) (Row, map[string]Row, map[string][]Row, *Error)
FilterRelation split values and relations to follow
func IsValidMode ¶
IsValidMode return true if value is a valide mode
Types ¶
type DataDestination ¶
type DataDestination interface { Open(plan Plan, mode Mode, disableConstraints bool) *Error Commit() *Error RowWriter(table Table) (RowWriter, *Error) Close() *Error }
DataDestination to write in the push process.
type DataDestinationFactory ¶
type DataDestinationFactory interface {
New(url string, schema string) DataDestination
}
DataDestinationFactory exposes methods to create new datadestinations.
type Error ¶
type Error struct {
Description string
}
Error is the error type returned by the domain
func Push ¶
func Push(ri RowIterator, destination DataDestination, plan Plan, mode Mode, commitSize uint, disableConstraints bool, catchError RowWriter) *Error
Push write rows to target table
type MockDataDestination ¶
MockDataDestination is an autogenerated mock type for the DataDestination type
func (*MockDataDestination) Close ¶
func (_m *MockDataDestination) Close() *Error
Close provides a mock function with given fields:
func (*MockDataDestination) Commit ¶
func (_m *MockDataDestination) Commit() *Error
Commit provides a mock function with given fields:
type MockDataDestinationFactory ¶
MockDataDestinationFactory is an autogenerated mock type for the DataDestinationFactory type
func (*MockDataDestinationFactory) New ¶
func (_m *MockDataDestinationFactory) New(url string, schema string) DataDestination
New provides a mock function with given fields: url, schema
type MockPlan ¶
MockPlan is an autogenerated mock type for the Plan type
func (*MockPlan) FirstTable ¶
FirstTable provides a mock function with given fields:
func (*MockPlan) RelationsFromTable ¶
RelationsFromTable provides a mock function with given fields: table
type MockRelation ¶
MockRelation is an autogenerated mock type for the Relation type
func (*MockRelation) Child ¶
func (_m *MockRelation) Child() Table
Child provides a mock function with given fields:
func (*MockRelation) Name ¶
func (_m *MockRelation) Name() string
Name provides a mock function with given fields:
func (*MockRelation) OppositeOf ¶
func (_m *MockRelation) OppositeOf(table Table) Table
OppositeOf provides a mock function with given fields: table
func (*MockRelation) Parent ¶
func (_m *MockRelation) Parent() Table
Parent provides a mock function with given fields:
type MockRowIterator ¶
MockRowIterator is an autogenerated mock type for the RowIterator type
func (*MockRowIterator) Close ¶
func (_m *MockRowIterator) Close() *Error
Close provides a mock function with given fields:
func (*MockRowIterator) Error ¶
func (_m *MockRowIterator) Error() *Error
Error provides a mock function with given fields:
func (*MockRowIterator) Next ¶
func (_m *MockRowIterator) Next() bool
Next provides a mock function with given fields:
func (*MockRowIterator) Value ¶
func (_m *MockRowIterator) Value() *Row
Value provides a mock function with given fields:
type MockRowPusher ¶
MockRowPusher is an autogenerated mock type for the RowPusher type
func (*MockRowPusher) Export ¶
func (_m *MockRowPusher) Export(_a0 Row) *Error
Export provides a mock function with given fields: _a0
type MockRowWriter ¶
MockRowWriter is an autogenerated mock type for the RowWriter type
func (*MockRowWriter) Write ¶
func (_m *MockRowWriter) Write(row Row) *Error
Write provides a mock function with given fields: row
type MockTable ¶
MockTable is an autogenerated mock type for the Table type
func (*MockTable) PrimaryKey ¶
PrimaryKey provides a mock function with given fields:
type NoErrorCaptureRowWriter ¶
type NoErrorCaptureRowWriter struct{}
func (NoErrorCaptureRowWriter) Write ¶
func (necrw NoErrorCaptureRowWriter) Write(row Row) *Error
type Plan ¶
type Plan interface { FirstTable() Table RelationsFromTable(table Table) map[string]Relation Tables() []Table }
Plan describe how to push data
type Relation ¶
type Relation interface { Name() string Parent() Table Child() Table OppositeOf(table Table) Table }
Relation between two tables.
type RowIterator ¶
RowIterator iter over a collection of rows
type StopIteratorError ¶
type StopIteratorError struct{}
StopIteratorError signal the end of iterator