Functions
_parse_column_def
2
tuple[ColumnSchema | Non…
▼
Parse a single column definition.
_parse_column_def
2
tuple[ColumnSchema | Non…
▼
def _parse_column_def(col_def: str, table_name: str) -> tuple[ColumnSchema | None, ForeignKey | None]
Parameters
| Name | Type | Description |
|---|---|---|
col_def |
str |
|
table_name |
str |
Returns
tuple[ColumnSchema | None, ForeignKey | None]
_split_column_defs
1
list[str]
▼
Split column definitions handling nested parentheses.
_split_column_defs
1
list[str]
▼
def _split_column_defs(body: str) -> list[str]
Parameters
| Name | Type | Description |
|---|---|---|
body |
str |
Returns
list[str]
parse_schema
1
SchemaSnapshot
▼
Parse SQL schema text into a SchemaSnapshot.
Supports CREATE TABLE and CREATE …
parse_schema
1
SchemaSnapshot
▼
def parse_schema(sql: str) -> SchemaSnapshot
Parse SQL schema text into a SchemaSnapshot.
Supports CREATE TABLE and CREATE INDEX statements.
Parameters
| Name | Type | Description |
|---|---|---|
sql |
str |
Returns
SchemaSnapshot