Make SQLGenAnnotator work with GoogleAppEngine.
authorSandrine Ribeau <sandrine.ribeau@logilab.fr>
Wed, 05 Nov 2008 13:02:09 -0800
changeset 2 3847ffe2f86c
parent 1 88d637274072
child 3 512e9bd0685a
Make SQLGenAnnotator work with GoogleAppEngine.
goa/overrides/rqlannotation.py
--- a/goa/overrides/rqlannotation.py	Wed Nov 05 11:22:05 2008 -0800
+++ b/goa/overrides/rqlannotation.py	Wed Nov 05 13:02:09 2008 -0800
@@ -1,6 +1,13 @@
-def sqlgen_annotate(schema, rqlhelper, rqlst):
-    rqlst.has_text_query = False
-    rqlst.need_distinct = False
-    
 def set_qdata(union, noinvariant):
     pass
+        
+class SQLGenAnnotator(object):
+    def __init__(self, schema):
+        self.schema = schema
+        self.nfdomain = frozenset(eschema.type for eschema in schema.entities()
+                                  if not eschema.is_final())
+    def annotate(self, rqlst):
+        rqlst.has_text_query = False
+        rqlst.need_distinct = False
+        
+