cubicweb/rqlrewrite.py
branch3.26
changeset 12432 2fcb53ee5178
parent 12175 c0ceadfc8aee
child 12567 26744ad37953
equal deleted inserted replaced
12431:a570191d67b0 12432:2fcb53ee5178
   276               invariant due to security reason (will be filed by this method)
   276               invariant due to security reason (will be filed by this method)
   277         """
   277         """
   278         nbtrees = len(localchecks)
   278         nbtrees = len(localchecks)
   279         myunion = union = select.parent
   279         myunion = union = select.parent
   280         # transform in subquery when len(localchecks)>1 and groups
   280         # transform in subquery when len(localchecks)>1 and groups
   281         if nbtrees > 1 and (select.orderby or select.groupby or
   281         if nbtrees > 1 and (select.orderby or select.groupby
   282                             select.having or select.has_aggregat or
   282                             or select.having or select.has_aggregat
   283                             select.distinct or
   283                             or select.distinct
   284                             select.limit or select.offset):
   284                             or select.limit or select.offset):
   285             newselect = stmts.Select()
   285             newselect = stmts.Select()
   286             # only select variables in subqueries
   286             # only select variables in subqueries
   287             origselection = select.selection
   287             origselection = select.selection
   288             select.select_only_variables()
   288             select.select_only_variables()
   289             select.has_aggregat = False
   289             select.has_aggregat = False