tidbparser

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

README

TiDB Parser Module

TiDB-backed parser adapter for multi-statement SQL parsing and parser-warning collection.

Files

File Responsibility
parser.go Parses SQL text and preserves raw statement nodes plus parser warnings
parser_test.go Verifies multi-statement parsing and parse-failure behavior

Exports

  • Parser
  • Result
  • New()

Dependencies

  • Upstream: internal/application/audit
  • Downstream: github.com/pingcap/tidb/pkg/parser

Update Rule

  • If members/interfaces/dependencies change, update this file in same change.

Documentation

Overview

Package tidbparser loads SQL text through the TiDB parser. input: SQL text and TiDB parser runtime dependencies output: raw parsed statement nodes and parser warnings for application orchestration pos: infrastructure parser adapter for MySQL and TiDB SQL parsing note: if this file changes, update this header and module README.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser adapts TiDB parser behavior for DeltaScope.

func New

func New() *Parser

New returns a TiDB-backed parser adapter.

func (*Parser) Parse

func (p *Parser) Parse(sql string) (Result, error)

Parse parses SQL text into TiDB statements and preserves parser warnings.

type Result

type Result struct {
	Statements []ast.StmtNode
	Warnings   []string
}

Result is the infrastructure output of the parser adapter.

Jump to

Keyboard shortcuts

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