stub

package
v4.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DROP = "DROP"

Variables

This section is empty.

Functions

func WithInstance

func WithInstance(instance interface{}, config *Config) (database.Driver, error)

Types

type Config

type Config struct{}

type Stub

type Stub struct {
	Url               string
	Instance          interface{}
	CurrentVersion    int
	MigrationSequence []string
	LastRunMigration  []byte // todo: make []string
	IsDirty           bool
	IsLocked          bool

	Config *Config
}

func (*Stub) Close

func (s *Stub) Close() error

func (*Stub) Drop

func (s *Stub) Drop() error

func (*Stub) EqualSequence

func (s *Stub) EqualSequence(seq []string) bool

func (*Stub) Lock

func (s *Stub) Lock() error

func (*Stub) Open

func (s *Stub) Open(url string) (database.Driver, error)

func (*Stub) Run

func (s *Stub) Run(migration io.Reader) error

func (*Stub) SetVersion

func (s *Stub) SetVersion(version int, state bool) error

func (*Stub) Unlock

func (s *Stub) Unlock() error

func (*Stub) Version

func (s *Stub) 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