Revision 7176
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql_gen.py | ||
---|---|---|
910 | 910 |
def __init__(self, table, mapping={}, type_=None): |
911 | 911 |
''' |
912 | 912 |
@param mapping dict(right_table_col=left_table_col, ...) |
913 |
or [using_col...] |
|
913 | 914 |
* if left_table_col is join_same: left_table_col = right_table_col |
914 | 915 |
* Note that right_table_col must be a string |
915 | 916 |
* if left_table_col is join_same_not_null: |
... | ... | |
920 | 921 |
`table_pkey IS NULL` (indicating no match) |
921 | 922 |
''' |
922 | 923 |
if util.is_str(table): table = Table(table) |
924 |
if lists.is_seq(mapping): |
|
925 |
mapping = dict(((c, join_same_not_null) for c in mapping)) |
|
923 | 926 |
assert type_ == None or util.is_str(type_) or type_ is filter_out |
924 | 927 |
|
925 | 928 |
self.table = table |
Also available in: Unified diff
sql_gen.py: Join: Added support for mapping values which are lists, for use in USING joins