def pre_sql_setup(self):
    "\n        Does any necessary class setup immediately prior to producing SQL. This\n        is for things that can't necessarily be done in __init__ because we\n        might not have all the pieces in place at that time.\n        "
    self.setup_query()
    order_by = self.get_order_by()
    (self.where, self.having) = self.query.where.split_having()
    extra_select = self.get_extra_select(order_by, self.select)
    group_by = self.get_group_by((self.select + extra_select), order_by)
    return (extra_select, order_by, group_by)
Does any necessary class setup immediately prior to producing SQL. This
is for things that can't necessarily be done in __init__ because we
might not have all the pieces in place at that time.
def pre_sql_setup(self):
    "\n        Does any necessary class setup immediately prior to producing SQL. This\n        is for things that can't necessarily be done in __init__ because we\n        might not have all the pieces in place at that time.\n        "
    self.setup_query()
    order_by = self.get_order_by()
    (self.where, self.having) = self.query.where.split_having()
    extra_select = self.get_extra_select(order_by, self.select)
    group_by = self.get_group_by((self.select + extra_select), order_by)
    return (extra_select, order_by, group_by)