def get_join_table(self): """ Generate a query for a join table """ return ex.Select( columns=self.groups.values(), from_obj=self.from_obj).group_by(*self.groups.values())
def get_join_table(self): """ Generate a query for a join table """ return ex.Select( columns=[make_sql_clause(group, ex.column) for group in self.groups.values()], from_obj=self.from_obj ).group_by( *self.groups.values() )