sqlparser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnDef

type ColumnDef struct {
	Name    string
	Type    string
	ZeroVal string
	Comment string
}

type IndexDef

type IndexDef struct {
	Uniq bool
	Cols []string
}

type TableDef

type TableDef struct {
	Name string
	Stmt string
	Cols []ColumnDef
	Idxs []IndexDef
	// contains filtered or unexported fields
}

func ParseTable

func ParseTable(sql string) ([]TableDef, error)

func (*TableDef) Enter

func (v *TableDef) Enter(in ast.Node) (ast.Node, bool)

func (*TableDef) Leave

func (v *TableDef) Leave(in ast.Node) (ast.Node, bool)

type TypeInfo

type TypeInfo struct {
	Type    string
	ZeroVal string
}

type TypeMap

type TypeMap map[byte]TypeInfo

func (TypeMap) GetType

func (m TypeMap) GetType(typ byte) string

func (TypeMap) GetZeroVal

func (m TypeMap) GetZeroVal(typ byte) string

Jump to

Keyboard shortcuts

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