objects

package
v0.0.0-...-e081bcb Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Id            string `json:"-"`
	Name          string `json:"name"`
	Type          string `json:"type"`
	Comment       string `json:"comment"`
	DefaultValue  string `json:"default_value"`
	Nullable      bool   `json:"nullable"`
	AutoIncrement bool   `json:"auto_increment"`
	Unsigned      bool   `json:"unsigned"`
	Length        int    `json:"length"`
	Precision     int    `json:"precision"`
	Scale         int    `json:"scale"`
}

type ForeignKey

type ForeignKey struct {
	Id                 string   `json:"-"`
	Name               string   `json:"name"`
	Many               bool     `json:"many"`
	Columns            []string `json:"columns"`
	ColumnIds          []string `json:"-"`
	ReferenceColumns   []string `json:"referenceColumns"`
	ReferenceColumnIds []string `json:"-"`
	Comment            string   `json:"comment"`
	ReferenceTable     string   `json:"referenceTable"`
	ReferenceTableId   string   `json:"-"`
	DeleteRule         string   `json:"deleteRule"`
	UpdateRule         string   `json:"updateRule"`
}

func ParseForeignKeys

func ParseForeignKeys(tableNode *xmlquery.Node, columns []Column, tables []Table) ([]ForeignKey, error)

type Index

type Index struct {
	Id        string   `json:"-"`
	Name      string   `json:"name"`
	Primary   bool     `json:"primary"`
	Unique    bool     `json:"unique"`
	Columns   []string `json:"columns"`
	ColumnIds []string `json:"-"`
	Comment   string   `json:"comment"`
}

type Table

type Table struct {
	Id          string         `json:"-"`
	Name        string         `json:"name"`
	Columns     []Column       `json:"columns"`
	Indexes     []Index        `json:"indexes"`
	ForeignKeys []ForeignKey   `json:"foreignKeys"`
	Node        *xmlquery.Node `json:"-"`
}

func ParseTables

func ParseTables(documentNode *xmlquery.Node) ([]Table, error)

Jump to

Keyboard shortcuts

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