internal

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AST

type AST struct {
	M map[string]any
	// contains filtered or unexported fields
}

type ASTResult

type ASTResult struct {
	AST []AST
}

func NewASTResult

func NewASTResult(vm *goja.Runtime, val goja.Value) (*ASTResult, error)

type ParseResult

type ParseResult struct {
	*ASTResult
	TableColumnList
}

func NewParseResult

func NewParseResult(vm *goja.Runtime, val goja.Value) (*ParseResult, error)

type Parser

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

func NewParser

func NewParser() (*Parser, error)

func (*Parser) Astify

func (p *Parser) Astify(sql string, opt *types.Option) (*ASTResult, error)

astify(sql: string, opt?: Option): AST[] | AST;

func (*Parser) ColumnList

func (p *Parser) ColumnList(sql string, opt *types.Option) ([]string, error)

columnList(sql: string, opt?: Option): string[];

func (*Parser) Parse

func (p *Parser) Parse(sql string, opt *types.Option) (*ParseResult, error)

parse(sql: string, opt?: Option): TableColumnAst;

func (*Parser) Sqlify

func (p *Parser) Sqlify(ast AST, opt *types.Option) (string, error)

sqlify(ast: AST[] | AST, opt?: Option): string;

func (*Parser) TableList

func (p *Parser) TableList(sql string, opt *types.Option) ([]string, error)

tableList(sql: string, opt?: Option): string[];

func (*Parser) WhiteListCheck

func (p *Parser) WhiteListCheck(sql string, whiteList []string, opt *types.Option) error

whiteListCheck(sql: string, whiteList: string[], opt?: Option): Error | undefined;

type TableColumnList

type TableColumnList struct {
	TableList  []string `json:"tableList"`
	ColumnList []string `json:"columnList"`
}

Jump to

Keyboard shortcuts

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