parse

package
v0.0.0-...-05b7c2a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AutoIncr = "__auto_incr"
	Size     = "__size"
	Comment  = "__comment"
	Nullable = "__nullable"
)

field attributes

Variables

Functions

This section is empty.

Types

type Def

type Def struct {
	Engine  string          `yaml:"engine"`
	DB      string          `yaml:"db"`
	TB      string          `yaml:"tb"`
	Comment string          `yaml:"comment"`
	Fields  []yaml.MapSlice `yaml:"fields"`
	PK      string          `yaml:"pk"`
	Indexes [][]string      `yaml:"indexes"`
	Uniques [][]string      `yaml:"uniques"`
}

type F

type F struct {
	Name     string
	T        string
	Size     int64
	Nullable bool
	AutoIncr bool
	Comment  string

	Camel string
	GoT   string
}

type X

type X struct {
	Engine  string
	DB      string
	TB      string
	PK      *F
	Fields  []*F
	Comment string
	Uniques [][]*F
	Indexes [][]*F
}

func Parse

func Parse(b []byte) ([]*X, error)

Jump to

Keyboard shortcuts

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