Expand description
Schema analysis module for FK-aware operations.
This module provides:
- Data models for table schemas, columns, and foreign keys
- MySQL DDL parsing for extracting schema information
- Dependency graph construction with topological sorting
- Cycle detection for handling circular FK relationships
Structs§
- Column
- Column definition within a table
- Column
Id - Unique identifier for a column within a table
- Foreign
Key - Foreign key constraint definition
- Index
Def - Index definition
- Schema
- Complete database schema
- Schema
Builder - Builder for constructing schema from DDL statements
- Schema
Graph - Schema dependency graph built from foreign key relationships.
- TableId
- Unique identifier for a table within a schema
- Table
Schema - Complete table schema definition
- Topo
Sort Result - Result of topological sort
Enums§
- Column
Type - SQL column type classification
Functions§
- extract_
alter_ table_ name - Extract table name from ALTER TABLE statement
- extract_
create_ table_ name - Extract table name from CREATE TABLE statement
- parse_
column_ list - Parse a comma-separated column list, stripping quotes (backticks, double quotes, brackets)
- split_
table_ body - Split table body by commas, respecting nested parentheses