goa/overrides/rqlannotation.py
author Katia Saurfelt <katia.saurfelt@logilab.fr>
Tue, 19 May 2009 11:44:06 +0200
branchstable
changeset 1863 9a02979a2c00
parent 1802 d628defebc17
child 1977 606923dff11b
permissions -rw-r--r--
do not use <br> in widgets
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1802
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     1
"""
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     2
:organization: Logilab
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     3
:copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     4
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     5
"""
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     6
__docformat__ = "restructuredtext en"
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
     7
444
c6f20e605b84 test fixes
sylvain.thenault@logilab.fr
parents: 2
diff changeset
     8
def set_qdata(getrschema, union, noinvariant):
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
    pass
1802
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
    10
2
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    11
class SQLGenAnnotator(object):
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    12
    def __init__(self, schema):
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    13
        self.schema = schema
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    14
        self.nfdomain = frozenset(eschema.type for eschema in schema.entities()
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    15
                                  if not eschema.is_final())
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    16
    def annotate(self, rqlst):
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    17
        rqlst.has_text_query = False
3847ffe2f86c Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    18
        rqlst.need_distinct = False
1802
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
    19
d628defebc17 delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 444
diff changeset
    20