Documentation
¶
Index ¶
- Variables
- func NewCqnConnection(dsnString string) (shared.OracleCqnExecutor, error)
- func NewDBConnectionWithMockDripFeed(log logger.Logger, numRowsToGenerate int, sleepIntervalSec int, dbType string) (shared.Connector, chan string)
- func NewMockConnectionWithBatchWithMockTx(log logger.Logger) (shared.Connector, chan string)
- func NewOdbcConnection(log logger.Logger, d *shared.DsnConnectionDetails) (shared.Connector, error)
- func NewOracleConnection(log logger.Logger, d *shared.DsnConnectionDetails) (shared.Connector, error)
- func OpenDbConnection(log logger.Logger, c shared.ConnectionDetails) (db shared.Connector, err error)
- func OracleExecWithConnDetails(log logger.Logger, connDetails *shared.DsnConnectionDetails, sql string) error
- func SnowflakeDDLExec(log logger.Logger, connDetails *shared.DsnConnectionDetails, sql string) error
- func SnowflakeGetDSN(c *SnowflakeConnectionDetails) (string, error)
- func SqlQuery(ctx context.Context, log logger.Logger, db shared.Connector, sqltext string, ...) error
- type SchemaTable
- type SnowflakeConnectionDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSnowflakeConnectionKeyNames = struct { AccountName string DatabaseName string Warehouse string SchemaName string UserName string Password string RoleName string }{ AccountName: "accountName", DatabaseName: "databaseName", Warehouse: "warehouse", SchemaName: "schemaName", UserName: "userName", Password: "password", RoleName: "roleName", }
Functions ¶
func NewCqnConnection ¶
func NewCqnConnection(dsnString string) (shared.OracleCqnExecutor, error)
func NewOdbcConnection ¶
func NewOracleConnection ¶
func OpenDbConnection ¶
func OpenDbConnection(log logger.Logger, c shared.ConnectionDetails) (db shared.Connector, err error)
OpenDbConnection opens a database connection using the supplied ConnectionDetails struct in c.
func SnowflakeDDLExec ¶
func SnowflakeGetDSN ¶
func SnowflakeGetDSN(c *SnowflakeConnectionDetails) (string, error)
SnowflakeGetDSN constructs a DSN based on SnowflakeConnectionDetails. The prefix 'snowflake://' is added to the DSN.
Types ¶
type SchemaTable ¶
type SchemaTable struct {
SchemaTable string `errorTxt:"[<schema>.]<object>" mandatory:"yes"`
}
func NewSchemaTable ¶
func NewSchemaTable(schema string, table string) SchemaTable
func (*SchemaTable) AppendSuffix ¶
func (st *SchemaTable) AppendSuffix(suffix string) string
func (*SchemaTable) GetSchema ¶
func (st *SchemaTable) GetSchema() string
func (*SchemaTable) GetTable ¶
func (st *SchemaTable) GetTable() string
func (*SchemaTable) String ¶
func (st *SchemaTable) String() string
type SnowflakeConnectionDetails ¶
type SnowflakeConnectionDetails struct { Account string `errorTxt:"Snowflake account" mandatory:"yes"` DBName string `errorTxt:"Snowflake db name" mandatory:"yes"` Schema string `errorTxt:"Snowflake schema" mandatory:"yes"` User string `errorTxt:"Snowflake username" mandatory:"yes"` Password string `errorTxt:"Snowflake password" mandatory:"yes"` Warehouse string `errorTxt:"Snowflake warehouse"` RoleName string `errorTxt:"Snowflake role name"` Dsn string OriginalScheme string }
func SnowflakeParseDSN ¶
func SnowflakeParseDSN(d string) (*SnowflakeConnectionDetails, error)
SnowflakeParseDSN converts a Snowflake DSN into native connection details. The prefix 'snowflake://' is removed from the DSN if it exists.
func (SnowflakeConnectionDetails) GetMap ¶
func (d SnowflakeConnectionDetails) GetMap(m map[string]string) map[string]string
func (SnowflakeConnectionDetails) GetScheme ¶
func (d SnowflakeConnectionDetails) GetScheme() (string, error)
func (SnowflakeConnectionDetails) Parse ¶
func (d SnowflakeConnectionDetails) Parse() error
func (SnowflakeConnectionDetails) String ¶
func (d SnowflakeConnectionDetails) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.