snowflake

package
v4.15.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 13 Imported by: 0

README

Snowflake

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

URL Query WithInstance Config Description
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 as there are no tests for it.

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")
)
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
}

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