snowflake

package
v0.0.0-...-bc06ff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDSN

func GetDSN(options ...func(*sf.Config)) (string, *sf.Config, error)

GetDSN constructs a DSN based on the test connection parameters

func NewClient

func NewClient(db *sql.DB, logger logr.Logger) *client

func SetDatabase

func SetDatabase(name string) func(*sf.Config)

func SetSchema

func SetSchema(name string) func(*sf.Config)

func SetWarehouse

func SetWarehouse(name string) func(*sf.Config)

Types

type Client

type Client interface {
	CreateWarehouse(ctx context.Context, name string, config WarehouseConfig) error
	UseWarehouse(ctx context.Context, name string) error
	DropWarehouse(ctx context.Context, name string) error
	UseDatabase(ctx context.Context, name string) error
	UseSchema(ctx context.Context, name string) error
	StageFile(ctx context.Context, path string, stage string) error
}

type MissingEnvVariableError

type MissingEnvVariableError struct {
	// contains filtered or unexported fields
}

func (MissingEnvVariableError) Error

func (e MissingEnvVariableError) Error() string

type ScalingPolicyType

type ScalingPolicyType string
const (
	ScalingPolicyStandard ScalingPolicyType = "STANDARD"
	ScalingPolicyEconomy  ScalingPolicyType = "ECONOMY"
)

type WarehouseConfig

type WarehouseConfig struct {
	Size               *WarehouseSizeType
	MinClusterCount    *int32
	MaxClusterCount    *int32
	ScalingPolicy      *ScalingPolicyType
	AutoSuspend        *int32
	InitiallySuspended *bool
}

type WarehouseSizeType

type WarehouseSizeType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL