Documentation
¶
Index ¶
- Variables
- func BuildConditions(equal map[string]interface{}, in map[string]interface{}) ([]string, []interface{}, error)
- func BuildIndexDDL(tableName string, indexName string, fields []string, backend types.BackendType) string
- func BuildTableSchema(tableName string, entity *types.Entity, isCDC bool, features types.FeatureList, ...) string
- func DBValueType(backend types.BackendType, valueType types.ValueType) (string, error)
- func DeserializeString(i interface{}, backend types.BackendType) string
- func Fill(size int, elem string, sep string) string
- func GetColumnFormat(backendType types.BackendType) (string, error)
- func InsertRecordsToTable(ctx context.Context, dbOpt DBOpt, tableName string, records []interface{}, ...) error
- func InsertRecordsToTableTx(tx *sqlx.Tx, ctx context.Context, tableName string, records []interface{}, ...) error
- func IsTableNotFoundError(err error, backend types.BackendType) bool
- func LoadDataFromSource(backendType types.BackendType, batchSize int) ...
- func OfflineBatchTableName(groupID int, revisionID int64) string
- func OfflineStreamCdcTableName(groupID int, revision int64) string
- func OfflineStreamSnapshotTableName(groupID int, revision int64) string
- func OpenMysqlDB(host, port, user, password, database string) (*sqlx.DB, error)
- func OpenPostgresDB(host, port, user, password, database string) (*sqlx.DB, error)
- func OpenSQLite(dbFile string) (*sqlx.DB, error)
- func QuoteFn(backendType types.BackendType) func(...string) string
- func RandString(n int) string
- func ReadLine(reader *bufio.Reader, delimiter string, features types.FeatureList, ...) ([]interface{}, error)
- func TempTable(prefix string) string
- func ValueType(backend types.BackendType, dbValueType string) (types.ValueType, error)
- func WithTransaction(db *sqlx.DB, ctx context.Context, fn TxFn) (err error)
- type Column
- type ColumnList
- type DBOpt
- type RowMap
- type TxFn
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenRedshiftDB = OpenPostgresDB
Functions ¶
func BuildConditions ¶
func BuildIndexDDL ¶ added in v0.0.4
func BuildTableSchema ¶ added in v0.0.4
func BuildTableSchema( tableName string, entity *types.Entity, isCDC bool, features types.FeatureList, pkFields []string, backend types.BackendType, ) string
func DBValueType ¶ added in v0.0.4
func DeserializeString ¶ added in v0.0.4
func DeserializeString(i interface{}, backend types.BackendType) string
func GetColumnFormat ¶ added in v0.0.4
func GetColumnFormat(backendType types.BackendType) (string, error)
func InsertRecordsToTable ¶ added in v0.0.2
func InsertRecordsToTableTx ¶ added in v0.0.2
func IsTableNotFoundError ¶ added in v0.0.4
func IsTableNotFoundError(err error, backend types.BackendType) bool
TODO: Should return an error when bakcend is not supported ?
func LoadDataFromSource ¶ added in v0.0.4
func LoadDataFromSource(backendType types.BackendType, batchSize int) func(tx *sqlx.Tx, ctx context.Context, source *offline.CSVSource, tableName string, header []string, features types.FeatureList) error
Currying
func OfflineBatchTableName ¶ added in v0.0.4
func OfflineStreamCdcTableName ¶ added in v0.0.4
func OfflineStreamSnapshotTableName ¶ added in v0.0.4
func OpenMysqlDB ¶ added in v0.0.4
func OpenPostgresDB ¶ added in v0.0.4
func RandString ¶ added in v0.0.4
func ReadLine ¶ added in v0.0.4
func ReadLine(reader *bufio.Reader, delimiter string, features types.FeatureList, backend types.BackendType) ([]interface{}, error)
Types ¶
type ColumnList ¶ added in v0.0.4
type ColumnList []Column
func (ColumnList) Names ¶ added in v0.0.4
func (c ColumnList) Names() []string
Click to show internal directories.
Click to hide internal directories.