class MySQLTableDefinitionParser(object):
Method | __init__ |
Undocumented |
Method | _add_option_regex |
Undocumented |
Method | _add_option_string |
Undocumented |
Method | _add_option_word |
Undocumented |
Method | _describe_to_create |
Re-format DESCRIBE output as a SHOW CREATE TABLE string. |
Method | _parse_column |
Extract column details. |
Method | _parse_constraints |
Parse a KEY or CONSTRAINT line. |
Method | _parse_keyexprs |
Unpack '"col"(2),"col" ASC'-ish strings into components. |
Method | _parse_table_name |
Extract the table name. |
Method | _parse_table_options |
Build a dictionary of all reflected table-level options. |
Method | _prep_regexes |
Pre-compile regular expressions. |
Method | parse |
Undocumented |
Class Variable | _optional_equals |
Undocumented |
Instance Variable | _pr_name |
Undocumented |
Instance Variable | _pr_options |
Undocumented |
Instance Variable | _re_ck_constraint |
Undocumented |
Instance Variable | _re_column |
Undocumented |
Instance Variable | _re_column_loose |
Undocumented |
Instance Variable | _re_columns |
Undocumented |
Instance Variable | _re_csv_int |
Undocumented |
Instance Variable | _re_csv_str |
Undocumented |
Instance Variable | _re_fk_constraint |
Undocumented |
Instance Variable | _re_key |
Undocumented |
Instance Variable | _re_key_version_sql |
Undocumented |
Instance Variable | _re_keyexprs |
Undocumented |
Instance Variable | _re_partition |
Undocumented |
Instance Variable | dialect |
Undocumented |
Instance Variable | preparer |
Undocumented |
Re-format DESCRIBE output as a SHOW CREATE TABLE string.
DESCRIBE is a much simpler reflection and is sufficient for reflecting views for runtime use. This method formats DDL for columns only- keys are omitted.
Parameters | |
table_name | Undocumented |
columns | A sequence of DESCRIBE or SHOW COLUMNS 6-tuples. SHOW FULL COLUMNS FROM rows must be rearranged for use with this function. |
Extract column details.
Falls back to a 'minimal support' variant if full parse fails.
Parameters | |
line | Any column-bearing line from SHOW CREATE TABLE |
state | Undocumented |
Parameters | |
line | A line of SHOW CREATE TABLE output |
Parameters | |
line | The first line of SHOW CREATE TABLE |
state | Undocumented |