author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 19 Jun 2009 15:54:55 +0200 | |
changeset 2127 | bc86aa68cc43 |
parent 1977 | 606923dff11b |
child 3689 | deb13e88e037 |
permissions | -rw-r--r-- |
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 |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
1802
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 |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
6 |
""" |
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
7 |
__docformat__ = "restructuredtext en" |
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
8 |
|
444 | 9 |
def set_qdata(getrschema, union, noinvariant): |
0 | 10 |
pass |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
11 |
|
2
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
12 |
class SQLGenAnnotator(object): |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
13 |
def __init__(self, schema): |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
14 |
self.schema = schema |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
15 |
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
|
16 |
if not eschema.is_final()) |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
17 |
def annotate(self, rqlst): |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
18 |
rqlst.has_text_query = False |
3847ffe2f86c
Make SQLGenAnnotator work with GoogleAppEngine.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
0
diff
changeset
|
19 |
rqlst.need_distinct = False |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
20 |
|
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
444
diff
changeset
|
21 |