add support for full outer join (fixes #15095)
This commit is contained in:
parent
09fc7cee35
commit
2634a2ade5
|
@ -108,7 +108,7 @@ def build_table_expression(join_tree, table_name, alias=None, top=True, other_co
|
|||
if alias:
|
||||
sql += ' AS "%s"' % alias
|
||||
add_paren = False
|
||||
for kind in ['left', 'inner', 'right']:
|
||||
for kind in ['left', 'inner', 'right', 'full']:
|
||||
joins = join_tree.get(table_name, {}).get(kind)
|
||||
if not joins:
|
||||
continue
|
||||
|
@ -117,6 +117,7 @@ def build_table_expression(join_tree, table_name, alias=None, top=True, other_co
|
|||
'inner': 'INNER JOIN',
|
||||
'left': 'LEFT OUTER JOIN',
|
||||
'right': 'RIGHT OUTER JOIN',
|
||||
'full': 'FULL OUTER JOIN',
|
||||
}
|
||||
sql += ' %s ' % join_kinds[kind]
|
||||
sub_joins = []
|
||||
|
|
|
@ -247,8 +247,8 @@ class Dimension(Base):
|
|||
|
||||
|
||||
def join_kind(kind):
|
||||
if kind not in ('inner', 'left', 'right'):
|
||||
raise ValueError('bad joind kind: %s' % kind)
|
||||
if kind not in ('inner', 'left', 'right', 'full'):
|
||||
raise ValueError('bad join kind: %s' % kind)
|
||||
return kind
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue