[Checkins] SVN: Sandbox/adamg/ocql/trunk/src/ocql/rewriter/rewriter.py add alias

Charith Paranaliyanage paranaliyanage at gmail.com
Mon Aug 18 14:13:10 EDT 2008


Log message for revision 89975:
  add alias

Changed:
  U   Sandbox/adamg/ocql/trunk/src/ocql/rewriter/rewriter.py

-=-
Modified: Sandbox/adamg/ocql/trunk/src/ocql/rewriter/rewriter.py
===================================================================
--- Sandbox/adamg/ocql/trunk/src/ocql/rewriter/rewriter.py	2008-08-18 16:28:36 UTC (rev 89974)
+++ Sandbox/adamg/ocql/trunk/src/ocql/rewriter/rewriter.py	2008-08-18 18:13:09 UTC (rev 89975)
@@ -87,17 +87,12 @@
                             ) # FIXME: ?set? must be determined by type(firstTerm.expression)
                 )
             elif isinstance(firstTerm, ocql.queryobject.queryobject.Alias):
-                rv = IRewriter(ocql.queryobject.queryobject.Query(
-                        self.context.metadata,
-                        self.context.symbols,
+                rv = Iter(
                         self.context.collection_type,
-                        [ocql.queryobject.queryobject.In(
-                            self.context.metadata,
-                            self.context.symbols,
-                            firstTerm.identifier,
-                            firstTerm.expression
-                            )]+self.context.terms[1:],
-                        self.context.target))()
+                        Lambda(IRewriter(firstTerm.identifier)(), 
+                               Single(self.context.collection_type, IRewriter(firstTerm.identifier)())),
+                        Single(self.context.collection_type, IRewriter(firstTerm.expression)()))
+
             else:
                 rv = If(
                     IRewriter(firstTerm)(),



More information about the Checkins mailing list