ast

package
v0.0.0-...-89d789c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2Uint32

func Bytes2Uint32(b []byte) uint32

func CtxWithAstTableName

func CtxWithAstTableName(ctx context.Context, tableName string) context.Context

func ExtractFirstTableNameFromStmt

func ExtractFirstTableNameFromStmt(stmt ast.StmtNode) string

func GetAstTableNameFromCtx

func GetAstTableNameFromCtx(ctx context.Context) (string, bool)

func UInt322Bytes

func UInt322Bytes(n uint32) []byte

Types

type AstVisitor

type AstVisitor struct {
	// contains filtered or unexported fields
}

func ExtractAstVisit

func ExtractAstVisit(stmt ast.StmtNode) (*AstVisitor, error)

func (*AstVisitor) Enter

func (f *AstVisitor) Enter(n ast.Node) (node ast.Node, skipChildren bool)

func (*AstVisitor) Leave

func (f *AstVisitor) Leave(n ast.Node) (node ast.Node, ok bool)

func (*AstVisitor) SqlFeature

func (f *AstVisitor) SqlFeature() string

type FirstTableNameVisitor

type FirstTableNameVisitor struct {
	// contains filtered or unexported fields
}

func (*FirstTableNameVisitor) Enter

func (f *FirstTableNameVisitor) Enter(n ast.Node) (node ast.Node, skipChildren bool)

func (*FirstTableNameVisitor) Leave

func (f *FirstTableNameVisitor) Leave(n ast.Node) (node ast.Node, ok bool)

func (*FirstTableNameVisitor) TableName

func (f *FirstTableNameVisitor) TableName() string

Jump to

Keyboard shortcuts

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