Revision 5330
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
1045 | 1045 |
##### Database structure |
1046 | 1046 |
|
1047 | 1047 |
def is_nullable(db, value): |
1048 |
try: return is_null(value) or db.col_info(value).nullable |
|
1048 |
if not is_table_col(value): return is_null(value) |
|
1049 |
try: return db.col_info(value).nullable |
|
1049 | 1050 |
except NoUnderlyingTableException: return True # not a table column |
1050 | 1051 |
|
1051 | 1052 |
text_types = set(['character varying', 'text']) |
Also available in: Unified diff
sql_gen.py: is_nullable(): Fixed bug where non-columns could not be sent to db.col_info()