mysql

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2013 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	READER_VERBOSE = false
)

Functions

func ExtractLength added in v0.4.3

func ExtractLength(mysqlType string) uint

returns 0 if no length could be determined

func ExtractPrecisionAndScale added in v0.4.3

func ExtractPrecisionAndScale(mysqlType string) (uint, uint)

returns a precision, scale tuple

func MysqlToGenericType added in v0.4.3

func MysqlToGenericType(mysqlType string) *Type

Types

type MysqlReader

type MysqlReader struct {
	*sql.DB
}

func OpenReader

func OpenReader(conf *Config) (*MysqlReader, error)

func (*MysqlReader) CreateProjection

func (r *MysqlReader) CreateProjection(name string, body string, engine string, pk []string, uks [][]string) error

can't use temporary tables, as they don't appear in SHOW TABLES output

func (*MysqlReader) CreateView

func (r *MysqlReader) CreateView(name string, body string) error

func (*MysqlReader) DropProjection

func (r *MysqlReader) DropProjection(name string) error

func (*MysqlReader) DropView

func (r *MysqlReader) DropView(name string) error

func (*MysqlReader) FilteredTables

func (r *MysqlReader) FilteredTables(incl, excl map[string]bool) []*Table

func (*MysqlReader) Read

func (r *MysqlReader) Read(table *Table) (*sql.Rows, error)

caller is responsible for cleaning up the sql.Rows object

func (*MysqlReader) TableNames

func (r *MysqlReader) TableNames() []string

func (*MysqlReader) Tables

func (r *MysqlReader) Tables() []*Table

Jump to

Keyboard shortcuts

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