goa/overrides/rqlannotation.py
changeset 2 3847ffe2f86c
parent 0 b97547f5f1fa
child 444 c6f20e605b84
--- 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
+        
+