schema

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 3 Imported by: 8

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
	Default         sql.NullString
	Comment         string
	ParentRelations []*Relation
	ChildRelations  []*Relation
}

type Constrait

type Constrait struct {
	Name string
	Type string
	Def  string
}

type Index

type Index struct {
	Name string
	Def  string
}

type Relation

type Relation struct {
	Table         *Table
	Columns       []*Column
	ParentTable   *Table
	ParentColumns []*Column
	Def           string
}

type Schema

type Schema struct {
	Name      string
	Tables    []*Table
	Relations []*Relation
}

func (*Schema) FindTableByName

func (s *Schema) FindTableByName(name string) (*Table, error)

func (*Schema) Sort added in v0.2.0

func (s *Schema) Sort() error

type Table

type Table struct {
	Name       string
	Type       string
	Comment    string
	Columns    []*Column
	Indexes    []*Index
	Constraits []*Constrait
}

func (*Table) FindColumnByName

func (t *Table) FindColumnByName(name string) (*Column, error)

Jump to

Keyboard shortcuts

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