Versions in this module Expand all Collapse all v0 v0.2.4 Apr 23, 2022 Changes in this version + var DefaultDsnConnectionKeyNames = struct{ ... } + func DsnConnectionDetailsToMap(m map[string]string, c *DsnConnectionDetails) map[string]string + func FixSqlStatementGeneratorConfig(cfg *SqlStatementGeneratorConfig) + func OracleConnectionDetailsToDSN(d *OracleConnectionDetails) (retval string, err error) + type ConnectionDetails struct + Data map[string]string + LogicalName string + Type string + func (c ConnectionDetails) MustGetDateFilterSql(dateVarName string) string + func (c ConnectionDetails) MustGetSysDateSql() string + func (c ConnectionDetails) String() string + type ConnectionGetter interface + LoadConnection func(name string) (ConnectionDetails, error) + type Connector interface + Begin func() (Transacter, error) + Close func() + Exec func(query string, args ...interface{}) (Result, error) + ExecContext func(ctx context.Context, query string, args ...interface{}) (Result, error) + GetDmlGenerator func() DmlGenerator + GetType func() string + Query func(query string, args ...interface{}) (*HpRows, error) + QueryContext func(ctx context.Context, query string, args ...interface{}) (*HpRows, error) + func NewMockConnectionWithMockTx(log logger.Logger, dbType string) (Connector, chan string) + type CqnConnector interface + NewCqnConnection func(dsnString string) (OracleCqnExecutor, error) + type DBConnections map[string]ConnectionDetails + func (c *DBConnections) LoadConnection(i ConnectionGetter, connectionName string) error + type DmlGenerator interface + NewDeleteGenerator func(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + NewInsertGenerator func(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + NewMergeGenerator func(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + NewUpdateGenerator func(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + type DmlGeneratorTxtBatch struct + func (*DmlGeneratorTxtBatch) NewDeleteGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + func (*DmlGeneratorTxtBatch) NewInsertGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + func (*DmlGeneratorTxtBatch) NewUpdateGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + func (o *DmlGeneratorTxtBatch) NewMergeGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtGenerator + type DsnConnectionDetails struct + Dsn string + OriginalScheme string + func GetDsnConnectionDetails(c *ConnectionDetails) *DsnConnectionDetails + func (d DsnConnectionDetails) GetMap(m map[string]string) map[string]string + func (d DsnConnectionDetails) GetScheme() (string, error) + func (d DsnConnectionDetails) Parse() error + func (d DsnConnectionDetails) String() string + type HpColumnType struct + func (c *HpColumnType) DatabaseTypeName() string + func (c *HpColumnType) DecimalSize() (precision, scale int64, ok bool) + func (c *HpColumnType) Length() (length int64, ok bool) + func (c *HpColumnType) Name() string + func (c *HpColumnType) Nullable() (nullable, ok bool) + func (c *HpColumnType) ScanType() reflect.Type + type HpConnection struct + DbRelloyd *relloyd.DB + DbSql *sql.DB + DbType string + Dml DmlGenerator + func (c *HpConnection) Begin() (Transacter, error) + func (c *HpConnection) Close() + func (c *HpConnection) Exec(query string, args ...interface{}) (Result, error) + func (c *HpConnection) ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error) + func (c *HpConnection) GetDmlGenerator() DmlGenerator + func (c *HpConnection) GetType() string + func (c *HpConnection) Query(query string, args ...interface{}) (*HpRows, error) + func (c *HpConnection) QueryContext(ctx context.Context, query string, args ...interface{}) (*HpRows, error) + type HpRows struct + func (r *HpRows) Close() error + func (r *HpRows) ColumnTypes() ([]*HpColumnType, error) + func (r *HpRows) Columns() ([]string, error) + func (r *HpRows) Err() error + func (r *HpRows) Next() bool + func (r *HpRows) NextResultSet() bool + func (r *HpRows) Scan(dest ...interface{}) error + type HpStmt struct + func (s *HpStmt) Close() error + func (s *HpStmt) Exec(args ...interface{}) (Result, error) + func (s *HpStmt) ExecBatch(args [][]interface{}) (Result, error) + func (s *HpStmt) ExecBatchContext(ctx context.Context, args [][]interface{}) (Result, error) + func (s *HpStmt) ExecContext(ctx context.Context, args ...interface{}) (Result, error) + func (s *HpStmt) Query(args ...interface{}) (*HpRows, error) + func (s *HpStmt) QueryContext(ctx context.Context, args ...interface{}) (*HpRows, error) + type HpTx struct + func (t *HpTx) Commit() error + func (t *HpTx) Exec(query string, args ...interface{}) (Result, error) + func (t *HpTx) ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error) + func (t *HpTx) Prepare(query string) (StatementBatch, error) + func (t *HpTx) PrepareContext(ctx context.Context, query string) (StatementBatch, error) + func (t *HpTx) Rollback() error + type MockConnectionWithMockTx struct + DbHasBeenClosed bool + DbType string + Dml DmlGenerator + OutputChan chan string + func (*MockConnectionWithMockTx) NewDeleteGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtTxtBatcher + func (*MockConnectionWithMockTx) NewInsertGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtTxtBatcher + func (*MockConnectionWithMockTx) NewUpdateGenerator(cfg *SqlStatementGeneratorConfig) SqlStmtTxtBatcher + func (c *MockConnectionWithMockTx) Begin() (Transacter, error) + func (c *MockConnectionWithMockTx) Close() + func (c *MockConnectionWithMockTx) Exec(query string, args ...interface{}) (Result, error) + func (c *MockConnectionWithMockTx) ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error) + func (c *MockConnectionWithMockTx) GetDmlGenerator() DmlGenerator + func (c *MockConnectionWithMockTx) GetType() string + func (c *MockConnectionWithMockTx) Query(query string, args ...interface{}) (*HpRows, error) + func (c *MockConnectionWithMockTx) QueryContext(ctx context.Context, query string, args ...interface{}) (*HpRows, error) + func (c *MockConnectionWithMockTx) WasClosed() bool + type NetezzaConnectionDetails struct + Dsn string + OriginalScheme string + func (d NetezzaConnectionDetails) GetMap(m map[string]string) map[string]string + func (d NetezzaConnectionDetails) GetNzgoConnectionString() (string, error) + func (d NetezzaConnectionDetails) GetScheme() (string, error) + func (d NetezzaConnectionDetails) Parse() error + func (d NetezzaConnectionDetails) String() string + type OdbcConnector interface + NewOdbcConnection func(log logger.Logger, d *DsnConnectionDetails) (Connector, error) + type OracleConnectionDetails struct + DBHost string + DBName string + DBParams string + DBPass string + DBPort string + DBUser string + Dsn string + func OracleDsnToOracleConnectionDetails(d string) (*OracleConnectionDetails, error) + func (d OracleConnectionDetails) GetMap(m map[string]string) map[string]string + func (d OracleConnectionDetails) GetScheme() (string, error) + func (d OracleConnectionDetails) Parse() error + func (d OracleConnectionDetails) String() string + type OracleConnector interface + NewOracleConnection func(log logger.Logger, d *DsnConnectionDetails) Connector + OracleExecWithConnDetails func(log logger.Logger, connDetails *DsnConnectionDetails, sql string) error + type OracleConnectorMock interface + NewMockConnectionWithBatchWithMockTx func(log logger.Logger) (Connector, chan string) + type OracleCqnExecutor interface + CloseCqnConnection func() error + Execute func(h types.SubscriptionHandler, query string, args []interface{}) (driver.Rows, error) + RemoveSubscription func() + type Result interface + LastInsertId func() (int64, error) + RowsAffected func() (int64, error) + type SqUpdateTxtBatch struct + AllColList []string + ColList []string + KeyList []string + func (o *SqUpdateTxtBatch) AddValuesToBatch(values []interface{}) (batchIsFull bool, err error) + func (o *SqUpdateTxtBatch) GetStatement() string + func (o *SqUpdateTxtBatch) GetValues() []interface{} + func (o *SqUpdateTxtBatch) InitBatch(batchSize int) + type SqlDeleteTxtBatch struct + KeyList []string + func (o *SqlDeleteTxtBatch) AddValuesToBatch(values []interface{}) (batchIsFull bool, err error) + func (o *SqlDeleteTxtBatch) GetStatement() string + func (o *SqlDeleteTxtBatch) GetValues() []interface{} + func (o *SqlDeleteTxtBatch) InitBatch(batchSize int) + type SqlInsertTxtBatch struct + ColList []string + func (o *SqlInsertTxtBatch) AddValuesToBatch(values []interface{}) (batchIsFull bool, err error) + func (o *SqlInsertTxtBatch) GetStatement() string + func (o *SqlInsertTxtBatch) GetValues() []interface{} + func (o *SqlInsertTxtBatch) InitBatch(batchSize int) + type SqlMergeTxtBatch struct + AllCols []string + KeyCols []string + OtherCols []string + func (o *SqlMergeTxtBatch) AddValuesToBatch(values []interface{}) (batchIsFull bool, err error) + func (o *SqlMergeTxtBatch) GetStatement() string + func (o *SqlMergeTxtBatch) GetValues() []interface{} + func (o *SqlMergeTxtBatch) InitBatch(batchSize int) + type SqlResultHandler interface + HandleHeader func(i []interface{}) error + HandleRow func(i []interface{}) error + type SqlStatementGeneratorConfig struct + Log logger.Logger + OutputSchema string + OutputTable string + SchemaSeparator string + TargetKeyCols *om.OrderedMap + TargetOtherCols *om.OrderedMap + type SqlStmtGenerator interface + GetStatement func() string + type SqlStmtTxtBatcher interface + AddValuesToBatch func(values []interface{}) (bool, error) + GetValues func() []interface{} + InitBatch func(batchSize int) + type StatementBatch interface + ExecBatch func(args [][]interface{}) (Result, error) + type Transacter interface + Commit func() error + Exec func(query string, args ...interface{}) (Result, error) + ExecContext func(ctx context.Context, query string, args ...interface{}) (Result, error) + Prepare func(query string) (StatementBatch, error) + PrepareContext func(ctx context.Context, query string) (StatementBatch, error) + Rollback func() error