Revision 10187
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sql_io.py | ||
---|---|---|
22 | 22 |
|
23 | 23 |
##### Data cleanup |
24 | 24 |
|
25 |
def table_nulls_mapped__set(db, table): |
|
26 |
assert isinstance(table, sql_gen.Table) |
|
27 |
sql.run_query(db, 'SELECT util.table_nulls_mapped__set(' |
|
28 |
+sql_gen.table2regclass_text(db, table)+')') |
|
29 |
|
|
30 |
def table_nulls_mapped__get(db, table): |
|
31 |
assert isinstance(table, sql_gen.Table) |
|
32 |
return sql.value(sql.run_query(db, 'SELECT util.table_nulls_mapped__get(' |
|
33 |
+sql_gen.table2regclass_text(db, table)+')')) |
|
34 |
|
|
25 | 35 |
null_strs = ['', '-', r'\N', 'NULL', 'UNKNOWN', 'nulo'] |
26 | 36 |
|
27 | 37 |
def cleanup_table(db, table): |
Also available in: Unified diff
lib/sql_io.py: added table_nulls_mapped__set(), "__get() wrappers around the corresponding util schema functions