Documentation
¶
Overview ¶
Package sql implements a lightweight regex-based parser for SQL files. Extracts CREATE TABLE/VIEW/INDEX/FUNCTION/PROCEDURE/TRIGGER statements without any tree-sitter dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
Dependency represents a table/view reference.
type Entity ¶
type Entity struct {
Name string
Type string // "table", "view", "index", "function", "procedure", "trigger", "schema", "type"
Kind string
Signature string
StartLine int
EndLine int
}
Entity represents a named SQL object.
type ParseResult ¶
type ParseResult struct {
FilePath string
Entities []*Entity
Dependencies []*Dependency
}
ParseResult is the output of Parse.
func Parse ¶
func Parse(filePath string, content string) *ParseResult
Parse parses a SQL file using regex-based extraction.
Click to show internal directories.
Click to hide internal directories.