Documentation ¶
Index ¶
- Variables
- type Parser
- type Result
- type Visitor
- func (v *Visitor) AddColumn(columnName string)
- func (v *Visitor) AddColumnComment(columnName string, columnComment string)
- func (v *Visitor) AddDB(dbName string)
- func (v *Visitor) AddTable(tableName string)
- func (v *Visitor) AddTableComment(tableName string, tableComment string)
- func (v *Visitor) Enter(in ast.Node) (out ast.Node, skipChildren bool)
- func (v *Visitor) Leave(in ast.Node) (out ast.Node, ok bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultSQLList = []string{ "*ast.CreateTableStmt", "*ast.AlterTableStmt", "*ast.DropTableStmt", "*ast.SelectStmt", "*ast.UnionStmt", "*ast.InsertStmt", "*ast.ReplaceStmt", "*ast.InsertStmt", "*ast.UpdateStmt", "*ast.DeleteStmt", } DefaultFuncList = []string{ "*ast.FuncCallExpr", "*ast.AggregateFuncExpr", "*ast.WindowFuncExpr", } )
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { SQLType string `json:"sql_type"` DBNames []string `json:"db_names"` TableNames []string `json:"table_names"` TableComments map[string]string `json:"table_comments"` ColumnNames []string `json:"column_names"` ColumnComments map[string]string `json:"column_comments"` }
type Visitor ¶
func NewVisitor ¶
func NewVisitor() *Visitor
func (*Visitor) AddColumnComment ¶
func (*Visitor) AddTableComment ¶
Click to show internal directories.
Click to hide internal directories.