Documentation
¶
Index ¶
- Constants
- func EnrichSnowflakeContext(ctx context.Context, db *sql.DB) context.Context
- func IsNotFoundOrNoPermissionError(err error) bool
- func IsUnsupportedFeatureDataLineageError(err error) bool
- func NewQuerier[T any](conn *SnowflakeExecutor) querier.Querier[T]
- type Executor
- type Mock
- type SnowflakeConf
- type SnowflakeExecutor
Constants ¶
View Source
const SPNApplicationId = "SYNQ_Platform"
https://github.com/snowflakedb/gosnowflake/blob/099708d318689634a558f705ccc19b3b7b278972/doc.go#L107
Variables ¶
This section is empty.
Functions ¶
func EnrichSnowflakeContext ¶
EnrichSnowflakeContext wraps the context with a query ID channel so the Snowflake driver reports the query ID. Creates or reuses a DriverStats accumulator and registers an onFinish hook to collect the query ID (and optionally detailed stats) when the Collector finishes.
func IsNotFoundOrNoPermissionError ¶ added in v0.5.0
IsNotFoundOrNoPermissionError checks if the error is a Snowflake "does not exist or not authorized" error
func IsUnsupportedFeatureDataLineageError ¶ added in v0.5.0
IsUnsupportedFeatureDataLineageError checks if the error is a Snowflake "Unsupported feature 'Data Lineage'" error
func NewQuerier ¶
func NewQuerier[T any](conn *SnowflakeExecutor) querier.Querier[T]
Types ¶
type Mock ¶
type Mock struct {
SnowflakeExecutor
// contains filtered or unexported fields
}
type SnowflakeConf ¶
type SnowflakeConf struct {
User string
Password string
PrivateKey []byte
PrivateKeyFile string
PrivateKeyPassphrase string
Account string
Warehouse string
Databases []string
Role string
// AuthType specifies the authentication method: empty (default, uses password or private_key),
// "externalbrowser" (SSO via browser). When set to "externalbrowser", opens browser for SSO login
// and caches the ID token locally in the OS credential manager (Keychain on macOS, Credential Manager on Windows).
AuthType string
// Transporter is an optional http.RoundTripper to use for the underlying HTTP client. Use [gosnowflake.SnowflakeTransport] as a base.
Transporter http.RoundTripper
}
type SnowflakeExecutor ¶
type SnowflakeExecutor struct {
// contains filtered or unexported fields
}
func NewSnowflakeExecutor ¶
func NewSnowflakeExecutor(ctx context.Context, conf *SnowflakeConf) (*SnowflakeExecutor, error)
func (*SnowflakeExecutor) Close ¶
func (e *SnowflakeExecutor) Close() error
func (*SnowflakeExecutor) Exec ¶
func (e *SnowflakeExecutor) Exec(ctx context.Context, sql string) error
func (*SnowflakeExecutor) GetDb ¶
func (e *SnowflakeExecutor) GetDb() *sqlx.DB
Click to show internal directories.
Click to hide internal directories.