Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnumReplacer ¶
type EnumReplacer struct {
// contains filtered or unexported fields
}
EnumReplacer provides AST-based ENUM type reference replacement. It replaces regex-based word boundary matching with accurate AST traversal.
func NewEnumReplacer ¶
func NewEnumReplacer(replacements map[string]string) *EnumReplacer
NewEnumReplacer creates a new ENUM replacer with the given replacement map.
func (*EnumReplacer) GetReplacedCount ¶
func (er *EnumReplacer) GetReplacedCount() int
GetReplacedCount returns the number of ENUM references replaced.
func (*EnumReplacer) ReplaceEnumReferences ¶
func (er *EnumReplacer) ReplaceEnumReferences(sql string) (string, error)
ReplaceEnumReferences replaces ENUM type references in the given SQL using AST traversal. This is much more accurate than regex as it only replaces actual type references, not occurrences in strings, comments, or identifiers.
Click to show internal directories.
Click to hide internal directories.