drivers

package
v0.0.0-...-fe5a163 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Schema       string
	TableName    string
	ColumnName   string
	DefaultValue string
	DataType     string
	ColumnType   string
	ColumnKey    string
	Extra        string
	Comment      string
	IsNullable   string
}

type DbSchema

type DbSchema map[string]TableSchema

func LoadDatabaseSchema

func LoadDatabaseSchema(driver, dsnString, schema, tableNames string) (dbSchema DbSchema, err error)

type Driver

type Driver interface {
	LoadDatabaseSchema(dsnString string, schema string, tableNames string) (DbSchema, error)
}

type MysqlDriver

type MysqlDriver struct{}

func (MysqlDriver) LoadDatabaseSchema

func (m MysqlDriver) LoadDatabaseSchema(dsnString, schema, tableNames string) (DbSchema, error)

type PostgresDriver

type PostgresDriver struct{}

func (PostgresDriver) LoadDatabaseSchema

func (p PostgresDriver) LoadDatabaseSchema(dsnString, schema, tableNames string) (DbSchema, error)

type StringSet

type StringSet map[string]struct{}

type TableSchema

type TableSchema []Column

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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