|
@@ -49,7 +49,9 @@ def get_transactions_statement(name, **kwargs):
|
|
|
value=Literal(f'%{v}%' if k == name else v),
|
|
|
) if k in ALIAS_TO_TABLE and (k not in NON_IDENTIFIER_COLUMNS or k == name) and v else SQL('TRUE'))
|
|
|
statement = SQL('\n').join([
|
|
|
- get_select(dict([ (k,v) for k,v in SELECT.items() if k != 'tags'])),
|
|
|
+ get_select(dict([('tags', Identifier('tags','name')), *[
|
|
|
+ (k,v) for k,v in SELECT.items() if k != 'tags'
|
|
|
+ ]])),
|
|
|
get_from("transactions", JOINS),
|
|
|
SQL('').join([SQL('WHERE '), SQL('\n AND ').join(where)]),
|
|
|
])
|