snowflake

package
v4.0.0-...-227319a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 11 Imported by: 0

README

Snowflake

snowflake://user:password@accountname/schema/dbname?query

URL Query WithInstance Config Description
x-warehouse n/a Name of the warehouse to use when connecting
x-role n/a Name of the role to use when connecting
x-multi-statement MultiStatementEnabled Enable multiple statements to be run in a single migration. Defaults to false
x-migrations-table MigrationsTable Name of the migrations table

Snowflake is PostgreSQL compatible but has some specific features (or lack thereof) that require slightly different behavior.

Status

This driver is not officially supported.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilConfig              = fmt.Errorf("no config")
	ErrNoDatabaseName         = fmt.Errorf("no database name")
	ErrNoPassword             = fmt.Errorf("no password")
	ErrNoSchema               = fmt.Errorf("no schema")
	ErrNoSchemaOrDatabase     = fmt.Errorf("no schema/database name")
	ErrInvalidParameterFormat = fmt.Errorf("invalid parameter format")
)
View Source
var DefaultMigrationsTable = "schema_migrations"

Functions

func WithInstance

func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)

Types

type Config

type Config struct {
	MigrationsTable       string
	DatabaseName          string
	MultiStatementEnabled bool
	// contains filtered or unexported fields
}

type Snowflake

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

func (*Snowflake) Close

func (p *Snowflake) Close() error

func (*Snowflake) Drop

func (p *Snowflake) Drop() (err error)

func (*Snowflake) Lock

func (p *Snowflake) Lock() error

func (*Snowflake) Open

func (p *Snowflake) Open(url string) (database.Driver, error)

func (*Snowflake) Run

func (p *Snowflake) Run(migration io.Reader) error

func (*Snowflake) SetVersion

func (p *Snowflake) SetVersion(version int, dirty bool) error

func (*Snowflake) Unlock

func (p *Snowflake) Unlock() error

func (*Snowflake) Version

func (p *Snowflake) Version() (version int, dirty bool, err error)

Jump to

Keyboard shortcuts

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