metadata

package
v0.0.0-...-e0e6d92 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryGetTableInfos       = `` /* 177-byte string literal not displayed */
	QueryGetColumnInfo       = `` /* 195-byte string literal not displayed */
	QueryGetTableConstraints = "select * from information_schema.table_constraints where table_schema = 'public'"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Table_catalog            string
	Table_schema             string
	Table_name               string
	Column_name              string
	Ordinal_position         sql.NullInt64
	Is_nullable              string
	Data_type                string
	Character_maximum_length sql.NullInt64
	Is_updatable             string
}

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(conn string) (*DB, error)

func (*DB) ColumnInfos

func (db *DB) ColumnInfos(table string) ([]*Column, error)

func (*DB) TableInfos

func (db *DB) TableInfos() ([]*Table, error)

func (*DB) TableWithColumnInfos

func (db *DB) TableWithColumnInfos() ([]*Table, error)

type Table

type Table struct {
	Table_catalog      string
	Table_schema       string
	Table_name         string
	Table_type         string
	Is_insertable_into string
	Is_typed           string
	Columns            []*Column
}

type TableConstraint

type TableConstraint struct {
	Constraint_catalog string
	Constraint_schema  string
	Constraint_name    string
	Table_catalog      string
	Table_schema       string
	Table_name         string
	Constraint_type    string
}

Jump to

Keyboard shortcuts

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