Revision 5074
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql_gen.py | ||
---|---|---|
1043 | 1043 |
|
1044 | 1044 |
##### Database structure |
1045 | 1045 |
|
1046 |
def is_nullable(db, value): |
|
1047 |
try: return is_null(value) or db.col_info(value).nullable |
|
1048 |
except NoUnderlyingTableException: return True # not a table column |
|
1049 |
|
|
1046 | 1050 |
text_types = set(['character varying', 'text']) |
1047 | 1051 |
|
1048 | 1052 |
def is_text_col(db, col): return db.col_info(col).type in text_types |
Also available in: Unified diff
sql_gen.py: Added is_nullable()