parser

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatExecuteStmt added in v0.22.0

func FormatExecuteStmt(es *ExecuteStmt) string

FormatExecuteStmt formats an ExecuteStmt as SQL with the directive comment.

Types

type ExecuteStmt added in v0.22.0

type ExecuteStmt struct {
	SQL      string // The SQL statement to execute
	CheckSQL string // Optional condition check SQL (empty = always execute)
}

ExecuteStmt represents an arbitrary SQL statement marked with -- pista:execute.

type ParseResult

type ParseResult struct {
	Tables       *orderedmap.Map[string, *model.Table]
	Views        *orderedmap.Map[string, *model.View]
	Enums        *orderedmap.Map[string, *model.Enum]
	Domains      *orderedmap.Map[string, *model.Domain]
	Sequences    *orderedmap.Map[string, *model.Sequence]
	ExecuteStmts []*ExecuteStmt
}

func ParseSQLFilesWithSchema added in v0.4.0

func ParseSQLFilesWithSchema(paths []string, defaultSchema string) (*ParseResult, error)

Jump to

Keyboard shortcuts

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