parser

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 8 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 {
	Name string
	Type string
}

func (Column) ToStructField

func (column Column) ToStructField(withTag bool) string

type Columns

type Columns []Column

func (Columns) ToStructFields

func (columns Columns) ToStructFields(withTag bool) string

type DDLParser

type DDLParser struct {
	TableName string
	Columns   Columns
	// contains filtered or unexported fields
}

func New

func New() *DDLParser

func (*DDLParser) Enter

func (parser *DDLParser) Enter(n ast.Node) (node ast.Node, skipChildren bool)

func (*DDLParser) Leave

func (parser *DDLParser) Leave(n ast.Node) (node ast.Node, ok bool)

func (*DDLParser) Parse

func (parser *DDLParser) Parse(sql string) error

func (DDLParser) ToStruct

func (parser DDLParser) ToStruct(withTag bool) ([]byte, error)

Jump to

Keyboard shortcuts

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