database

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDatabase

func ConnectDatabase(user string, pass string, host string, port int) (*sql.DB, error)

Types

type Column added in v0.0.4

type Column struct {
	Name string
	Type string
}

type Indexes added in v0.0.4

type Indexes map[string]map[string][]Column

table name -> index name -> columns

func FetchSchemas

func FetchSchemas(db *sql.DB, targets []string) (Indexes, error)

type PrimaryKeys added in v0.0.4

type PrimaryKeys map[string][]Column

table name -> columns

func FetchPrimaryKeys

func FetchPrimaryKeys(db *sql.DB, targets []string) (PrimaryKeys, error)

Jump to

Keyboard shortcuts

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