Documentation ¶
Index ¶
- Constants
- func CreateInsertComponents(t *ToSQLTransformation, tbl flux.Table) (colNames []string, valStringArray [][]string, valArgsArray [][]interface{}, ...)
- func ExecuteQueries(tx *sql.Tx, s *ToSQLOpSpec, colNames []string, valueStrings *[]string, ...) (err error)
- func MysqlColumnTranslateFunc() translationFunc
- func NewMySQLRowReader(r *sql.Rows) (execute.RowReader, error)
- func NewPostgresRowReader(r *sql.Rows) (execute.RowReader, error)
- func NewSqliteRowReader(r *sql.Rows) (execute.RowReader, error)
- func PostgresColumnTranslateFunc() translationFunc
- func SqliteColumnTranslateFunc() translationFunc
- func UInt8ToFloat(a []uint8) (float64, error)
- func UInt8ToInt64(a []uint8) (int64, error)
- type FromSQLOpSpec
- type FromSQLProcedureSpec
- type MySQLRowReader
- func (m *MySQLRowReader) Close() error
- func (m *MySQLRowReader) ColumnNames() []string
- func (m *MySQLRowReader) ColumnTypes() []flux.ColType
- func (m *MySQLRowReader) GetNextRow() ([]values.Value, error)
- func (m *MySQLRowReader) InitColumnNames(names []string)
- func (m *MySQLRowReader) InitColumnTypes(types []*sql.ColumnType)
- func (m *MySQLRowReader) Next() bool
- func (m *MySQLRowReader) SetColumnTypes(types []flux.ColType)
- func (m *MySQLRowReader) SetColumns(i []interface{})
- type PostgresRowReader
- func (m *PostgresRowReader) Close() error
- func (m *PostgresRowReader) ColumnNames() []string
- func (m *PostgresRowReader) ColumnTypes() []flux.ColType
- func (m *PostgresRowReader) GetNextRow() ([]values.Value, error)
- func (m *PostgresRowReader) InitColumnNames(n []string)
- func (m *PostgresRowReader) InitColumnTypes(types []*sql.ColumnType)
- func (m *PostgresRowReader) Next() bool
- func (m *PostgresRowReader) SetColumns(i []interface{})
- type SqliteRowReader
- func (m *SqliteRowReader) Close() error
- func (m *SqliteRowReader) ColumnNames() []string
- func (m *SqliteRowReader) ColumnTypes() []flux.ColType
- func (m *SqliteRowReader) GetNextRow() ([]values.Value, error)
- func (m *SqliteRowReader) InitColumnNames(n []string)
- func (m *SqliteRowReader) InitColumnTypes(types []*sql.ColumnType)
- func (m *SqliteRowReader) Next() bool
- func (m *SqliteRowReader) SetColumnTypes(types []flux.ColType)
- func (m *SqliteRowReader) SetColumns(i []interface{})
- type ToSQLOpSpec
- type ToSQLProcedureSpec
- type ToSQLTransformation
- func (t *ToSQLTransformation) Finish(id execute.DatasetID, err error)
- func (t *ToSQLTransformation) Process(id execute.DatasetID, tbl flux.Table) (err error)
- func (t *ToSQLTransformation) RetractTable(id execute.DatasetID, key flux.GroupKey) error
- func (t *ToSQLTransformation) UpdateProcessingTime(id execute.DatasetID, pt execute.Time) error
- func (t *ToSQLTransformation) UpdateWatermark(id execute.DatasetID, pt execute.Time) error
Constants ¶
View Source
const ( ToSQLKind = "toSQL" DefaultBatchSize = 10000 //TODO: decide if this should be kept low enough for the lowest (SQLite), or not. )
View Source
const FromSQLKind = "fromSQL"
Variables ¶
This section is empty.
Functions ¶
func CreateInsertComponents ¶
func ExecuteQueries ¶
func MysqlColumnTranslateFunc ¶
func MysqlColumnTranslateFunc() translationFunc
MysqlTranslateColumn translates flux colTypes into their corresponding MySQL column type
func PostgresColumnTranslateFunc ¶
func PostgresColumnTranslateFunc() translationFunc
PostgresTranslateColumn translates flux colTypes into their corresponding postgres column type
func SqliteColumnTranslateFunc ¶
func SqliteColumnTranslateFunc() translationFunc
SqliteTranslateColumn translates flux colTypes into their corresponding SQLite column type
func UInt8ToFloat ¶
func UInt8ToInt64 ¶
Types ¶
type FromSQLOpSpec ¶
type FromSQLOpSpec struct { DriverName string `json:"driverName,omitempty"` DataSourceName string `json:"dataSourceName,omitempty"` Query string `json:"query,omitempty"` }
func (*FromSQLOpSpec) Kind ¶
func (s *FromSQLOpSpec) Kind() flux.OperationKind
type FromSQLProcedureSpec ¶
type FromSQLProcedureSpec struct { plan.DefaultCost DriverName string DataSourceName string Query string }
func (*FromSQLProcedureSpec) Copy ¶
func (s *FromSQLProcedureSpec) Copy() plan.ProcedureSpec
func (*FromSQLProcedureSpec) Kind ¶
func (s *FromSQLProcedureSpec) Kind() plan.ProcedureKind
type MySQLRowReader ¶
type MySQLRowReader struct { Cursor *sql.Rows NextFunc func() bool CloseFunc func() error // contains filtered or unexported fields }
func (*MySQLRowReader) Close ¶
func (m *MySQLRowReader) Close() error
func (*MySQLRowReader) ColumnNames ¶
func (m *MySQLRowReader) ColumnNames() []string
func (*MySQLRowReader) ColumnTypes ¶
func (m *MySQLRowReader) ColumnTypes() []flux.ColType
func (*MySQLRowReader) GetNextRow ¶
func (m *MySQLRowReader) GetNextRow() ([]values.Value, error)
func (*MySQLRowReader) InitColumnNames ¶
func (m *MySQLRowReader) InitColumnNames(names []string)
func (*MySQLRowReader) InitColumnTypes ¶
func (m *MySQLRowReader) InitColumnTypes(types []*sql.ColumnType)
func (*MySQLRowReader) Next ¶
func (m *MySQLRowReader) Next() bool
Next prepares MySQLRowReader to return rows
func (*MySQLRowReader) SetColumnTypes ¶
func (m *MySQLRowReader) SetColumnTypes(types []flux.ColType)
func (*MySQLRowReader) SetColumns ¶
func (m *MySQLRowReader) SetColumns(i []interface{})
type PostgresRowReader ¶
func (*PostgresRowReader) Close ¶
func (m *PostgresRowReader) Close() error
func (*PostgresRowReader) ColumnNames ¶
func (m *PostgresRowReader) ColumnNames() []string
func (*PostgresRowReader) ColumnTypes ¶
func (m *PostgresRowReader) ColumnTypes() []flux.ColType
func (*PostgresRowReader) GetNextRow ¶
func (m *PostgresRowReader) GetNextRow() ([]values.Value, error)
func (*PostgresRowReader) InitColumnNames ¶
func (m *PostgresRowReader) InitColumnNames(n []string)
func (*PostgresRowReader) InitColumnTypes ¶
func (m *PostgresRowReader) InitColumnTypes(types []*sql.ColumnType)
func (*PostgresRowReader) Next ¶
func (m *PostgresRowReader) Next() bool
func (*PostgresRowReader) SetColumns ¶
func (m *PostgresRowReader) SetColumns(i []interface{})
type SqliteRowReader ¶
type SqliteRowReader struct { Cursor *sql.Rows NextFunc func() bool // contains filtered or unexported fields }
func (*SqliteRowReader) Close ¶
func (m *SqliteRowReader) Close() error
func (*SqliteRowReader) ColumnNames ¶
func (m *SqliteRowReader) ColumnNames() []string
func (*SqliteRowReader) ColumnTypes ¶
func (m *SqliteRowReader) ColumnTypes() []flux.ColType
func (*SqliteRowReader) GetNextRow ¶
func (m *SqliteRowReader) GetNextRow() ([]values.Value, error)
func (*SqliteRowReader) InitColumnNames ¶
func (m *SqliteRowReader) InitColumnNames(n []string)
func (*SqliteRowReader) InitColumnTypes ¶
func (m *SqliteRowReader) InitColumnTypes(types []*sql.ColumnType)
func (*SqliteRowReader) Next ¶
func (m *SqliteRowReader) Next() bool
func (*SqliteRowReader) SetColumnTypes ¶
func (m *SqliteRowReader) SetColumnTypes(types []flux.ColType)
func (*SqliteRowReader) SetColumns ¶
func (m *SqliteRowReader) SetColumns(i []interface{})
type ToSQLOpSpec ¶
type ToSQLOpSpec struct { DriverName string `json:"driverName,omitempty"` DataSourceName string `json:"dataSourcename,omitempty"` Table string `json:"table,omitempty"` BatchSize int `json:"batchSize,omitempty"` }
func (ToSQLOpSpec) Kind ¶
func (ToSQLOpSpec) Kind() flux.OperationKind
type ToSQLProcedureSpec ¶
type ToSQLProcedureSpec struct { plan.DefaultCost Spec *ToSQLOpSpec }
func (*ToSQLProcedureSpec) Copy ¶
func (o *ToSQLProcedureSpec) Copy() plan.ProcedureSpec
func (*ToSQLProcedureSpec) Kind ¶
func (o *ToSQLProcedureSpec) Kind() plan.ProcedureKind
type ToSQLTransformation ¶
type ToSQLTransformation struct {
// contains filtered or unexported fields
}
func NewToSQLTransformation ¶
func NewToSQLTransformation(d execute.Dataset, deps flux.Dependencies, cache execute.TableBuilderCache, spec *ToSQLProcedureSpec) (*ToSQLTransformation, error)
func (*ToSQLTransformation) Finish ¶
func (t *ToSQLTransformation) Finish(id execute.DatasetID, err error)
func (*ToSQLTransformation) RetractTable ¶
func (*ToSQLTransformation) UpdateProcessingTime ¶
func (*ToSQLTransformation) UpdateWatermark ¶
Click to show internal directories.
Click to hide internal directories.