parser

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockParser added in v1.9.0

type MockParser struct {
	mock.Mock
}

func (*MockParser) CleanTruncatedText added in v1.9.0

func (m *MockParser) CleanTruncatedText(sql string) (string, error)

func (*MockParser) ExtractTableNames added in v1.9.0

func (m *MockParser) ExtractTableNames(stmt StatementAstNode) []string

func (*MockParser) Parse added in v1.9.0

func (m *MockParser) Parse(sql string) (StatementAstNode, error)

func (*MockParser) Redact added in v1.9.0

func (m *MockParser) Redact(sql string) (string, error)

type Parser

type Parser interface {
	Parse(sql string) (StatementAstNode, error)
	Redact(sql string) (string, error)
	ExtractTableNames(stmt StatementAstNode) []string
	CleanTruncatedText(sql string) (string, error)
}

type StatementAstNode added in v1.10.0

type StatementAstNode ast.StmtNode

type TiDBSqlParser

type TiDBSqlParser struct{}

func NewTiDBSqlParser

func NewTiDBSqlParser() *TiDBSqlParser

func (*TiDBSqlParser) CleanTruncatedText added in v1.9.0

func (p *TiDBSqlParser) CleanTruncatedText(sql string) (string, error)

func (*TiDBSqlParser) ExtractTableNames

func (p *TiDBSqlParser) ExtractTableNames(stmt StatementAstNode) []string

func (*TiDBSqlParser) Parse

func (p *TiDBSqlParser) Parse(sql string) (StatementAstNode, error)

func (*TiDBSqlParser) Redact

func (p *TiDBSqlParser) Redact(sql string) (string, error)

Jump to

Keyboard shortcuts

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