Versions in this module Expand all Collapse all v0 v0.11.0 Sep 9, 2026 Changes in this version + func ExtractStaticDDLFromDoBlock(doBlockSQL string) []string + func FormatLockLevel(level types.LockLevel) string + func IsValidPostgreSQLIdentifier(identifier string) bool + func ParseMigration(content string, filename string) (*types.Migration, error) + func ParseMigrationWithContext(ctx context.Context, content string, filename string) (*types.Migration, error) + func SuggestIdentifierName(input string) string + type ContextualKeywordChecker struct + func NewContextualKeywordChecker(context KeywordContext, version int) *ContextualKeywordChecker + func (ckc *ContextualKeywordChecker) IsKeywordInContext(word string) bool + type ContextualNormalizer struct + func NewContextualNormalizer(ctx *NormalizationContext) *ContextualNormalizer + func (cn *ContextualNormalizer) BatchNormalize(identifiers []string) ([]string, []error) + func (cn *ContextualNormalizer) CompareIdentifiers(id1, id2 string) bool + func (cn *ContextualNormalizer) NormalizeFunctionName(funcName string) (schema, name string) + func (cn *ContextualNormalizer) NormalizeIdentifier(identifier string) string + func (cn *ContextualNormalizer) NormalizeSchemaName(schemaName string) string + func (cn *ContextualNormalizer) NormalizeTableName(tableName string) (schema, table string) + func (cn *ContextualNormalizer) ParseQualifiedName(qualifiedName string) []string + type ErrorCollector struct + func NewErrorCollector(ctx context.Context) *ErrorCollector + func (ec *ErrorCollector) AddDependencyError(message string, ctx *ParseContext) + func (ec *ErrorCollector) AddError(err *ParseError) + func (ec *ErrorCollector) AddNamingWarning(message, suggestion string, ctx *ParseContext) + func (ec *ErrorCollector) AddPerformanceWarning(message, suggestion string, ctx *ParseContext) + func (ec *ErrorCollector) AddSemanticError(message, suggestion string, ctx *ParseContext) + func (ec *ErrorCollector) AddSyntaxError(message string, ctx *ParseContext, innerErr error) + func (ec *ErrorCollector) GetAllIssues() []*ParseError + func (ec *ErrorCollector) GetErrors() []*ParseError + func (ec *ErrorCollector) GetWarnings() []*ParseError + type ErrorFormatter struct + func NewErrorFormatter() *ErrorFormatter + func (ef *ErrorFormatter) FormatError(err *ParseError) string + func (ef *ErrorFormatter) FormatErrorList(errorList []*ParseError) string + type ErrorHandler struct + func NewErrorHandler(ctx context.Context) *ErrorHandler + func (eh *ErrorHandler) CreateContext(filename string, line int, stmt *types.Statement) *ParseContext + func (eh *ErrorHandler) GetCollector() *ErrorCollector + func (eh *ErrorHandler) GetReporter() *ErrorReporter + func (eh *ErrorHandler) HandleParseError(err error, ctx *ParseContext) *ParseError + func (eh *ErrorHandler) HandleValidationError(message string, ctx *ParseContext) *ParseError + func (eh *ErrorHandler) LogSummary() + func (eh *ErrorHandler) Recovery(filename string, line int) + func (eh *ErrorHandler) ShouldContinue() bool + type ErrorReporter struct + func NewErrorReporter(collector *ErrorCollector) *ErrorReporter + type ErrorSummary = errors.ErrorSummary + type KeywordContext int + const KeywordContextConstraint + const KeywordContextDDL + const KeywordContextDML + const KeywordContextFunction + const KeywordContextGeneral + type KeywordType int + const KeywordTypeContextual + const KeywordTypeNonReserved + const KeywordTypeReserved + const KeywordTypeUnreserved + type NormalizationContext struct + CaseSensitive bool + DefaultSchema string + MaxIdentifierLength int + PostgreSQLVersion int + PreserveQuotes bool + func DefaultNormalizationContext() *NormalizationContext + type ParseContext = errors.ErrorContext + type ParseError struct + Statement *types.Statement + func NewNormalizationError(message string, index int) *ParseError + func NewParseError(message string, severity errors.Severity, category errors.Category) *ParseError + type StatementAnalyzer struct + func NewStatementAnalyzer(pgVersion string) *StatementAnalyzer + func (sa *StatementAnalyzer) AnalyzePragmas(stmt *types.Statement) + func (sa *StatementAnalyzer) AnalyzeStatement(stmt *types.Statement) + type StatementProcessingState struct + ConflictFlags []string + DependencySource string + FinalState *types.Statement + ProcessedBy []string + StatementID string + type StmtDecl struct + End int32 + Start int32 + Stmt T + func FilterStatements[T any](rawStmts []*pgquery.RawStmt) []StmtDecl[T] + type VersionedKeywordManager struct + func NewVersionedKeywordManager(version int) *VersionedKeywordManager + func (vkm *VersionedKeywordManager) GetKeywordType(word string) (KeywordType, bool) + func (vkm *VersionedKeywordManager) IsKeyword(word string) bool + func (vkm *VersionedKeywordManager) IsReservedKeyword(word string) bool