drivers

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name     string
	Type     string
	Nullable bool
}

type Driver

type Driver interface {
	Matches(*sql.DB) bool
	GetSchema(*sql.DB) (Schema, error)
	IsNoTableErr(error) bool
}

func Get

func Get(db *sql.DB) (Driver, error)

type Index

type Index struct {
	Name    string
	Type    string
	Columns []string
}

func (*Index) Matches

func (i *Index) Matches(other Index) bool

type Schema

type Schema []Table

func (Schema) Matches

func (s Schema) Matches(other Schema) bool

type Sqlite3Driver

type Sqlite3Driver struct{}

func (Sqlite3Driver) GetSchema

func (d Sqlite3Driver) GetSchema(db *sql.DB) (schema Schema, err error)

func (Sqlite3Driver) IsNoTableErr

func (d Sqlite3Driver) IsNoTableErr(err error) bool

func (Sqlite3Driver) Matches

func (d Sqlite3Driver) Matches(db *sql.DB) (res bool)

type Table

type Table struct {
	Name    string
	RawSql  string
	Columns []Column
	Indices []Index
}

func (*Table) Matches

func (t *Table) Matches(other Table) bool

Jump to

Keyboard shortcuts

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