author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 02 Dec 2009 12:52:55 +0100 | |
branch | stable |
changeset 3963 | 0d592677e55f |
parent 3689 | deb13e88e037 |
child 4212 | ab6573088b4a |
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() |
3689
deb13e88e037
follow yams 0.25 api changes to improve performance
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
16 |
if not eschema.final) |
2
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 |