rony rony - 2 years ago 67
SQL Question

Is it possible to reset group_by items of a sqlalchemy query object in python?

I have a

query object which contains some
items added earlier using the
method. I want to reset those items and add new
items. Is it possible? If so then please find me the way.

rmn rmn
Answer Source

The group_by columns are stored in _group_by property of the query object. You can set it to False or empty list []:

query._group_by = False


query._group_by = []
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download