server/querier.py
changeset 9955 60a9cd1b3a4b
parent 9954 79d34ba48612
child 9990 c84ad981fc4a
equal deleted inserted replaced
9954:79d34ba48612 9955:60a9cd1b3a4b
   592                     check_relations_read_access(cnx, select, args)
   592                     check_relations_read_access(cnx, select, args)
   593             # on select query, always copy the cached rqlst so we don't have to
   593             # on select query, always copy the cached rqlst so we don't have to
   594             # bother modifying it. This is not necessary on write queries since
   594             # bother modifying it. This is not necessary on write queries since
   595             # a new syntax tree is built from them.
   595             # a new syntax tree is built from them.
   596             rqlst = rqlst.copy()
   596             rqlst = rqlst.copy()
       
   597             # Rewrite computed relations
       
   598             rewriter = RQLRelationRewriter(cnx)
       
   599             rewriter.rewrite(rqlst, args)
   597             self._annotate(rqlst)
   600             self._annotate(rqlst)
   598             if args:
   601             if args:
   599                 # different SQL generated when some argument is None or not (IS
   602                 # different SQL generated when some argument is None or not (IS
   600                 # NULL). This should be considered when computing sql cache key
   603                 # NULL). This should be considered when computing sql cache key
   601                 cachekey += tuple(sorted([k for k, v in args.iteritems()
   604                 cachekey += tuple(sorted([k for k, v in args.iteritems()