Revision 3321
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
985 | 985 |
|
986 | 986 |
##### Database structure introspection |
987 | 987 |
|
988 |
#### Expressions |
|
989 |
|
|
990 |
name_re = r'(?:\w+|(?:"[^"]*")+)' |
|
991 |
|
|
992 |
def parse_expr_col(str_): |
|
993 |
match = re.match(r'^\('+name_re+r'\(('+name_re+r').*\)\)$', str_) |
|
994 |
if match: str_ = match.group(1) |
|
995 |
return sql_gen.unesc_name(str_) |
|
996 |
|
|
988 | 997 |
#### Tables |
989 | 998 |
|
990 | 999 |
def tables(db, schema_like='public', table_like='%', exact=False): |
Also available in: Unified diff
sql.py: Added parse_expr_col()