Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
492e1e0bbc6c
Commit
fe072f2f
authored
Dec 18, 2019
by
Nicolas Chauvat
Browse files
[server.querier] improve docstrings and comments
parent
c69421aece24
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb/server/querier.py
View file @
492e1e0b
...
@@ -37,9 +37,9 @@ from cubicweb.debug import emit_to_debug_channel
...
@@ -37,9 +37,9 @@ from cubicweb.debug import emit_to_debug_channel
from
cubicweb.utils
import
QueryCache
,
RepeatList
from
cubicweb.utils
import
QueryCache
,
RepeatList
from
cubicweb.misc.source_highlight
import
highlight_terminal
from
cubicweb.misc.source_highlight
import
highlight_terminal
from
cubicweb.server.rqlannotation
import
SQLGenAnnotator
,
set_qdata
from
cubicweb.server.rqlannotation
import
SQLGenAnnotator
,
set_qdata
from
cubicweb.server.ssplanner
import
READ_ONLY_RTYPES
,
add_types_restriction
from
cubicweb.server.ssplanner
import
(
READ_ONLY_RTYPES
,
add_types_restriction
,
SSPlanner
)
from
cubicweb.server.edition
import
EditedEntity
from
cubicweb.server.edition
import
EditedEntity
from
cubicweb.server.ssplanner
import
SSPlanner
from
cubicweb.statsd_logger
import
statsd_timeit
,
statsd_c
from
cubicweb.statsd_logger
import
statsd_timeit
,
statsd_c
ETYPE_PYOBJ_MAP
[
Binary
]
=
'Bytes'
ETYPE_PYOBJ_MAP
[
Binary
]
=
'Bytes'
...
@@ -191,13 +191,12 @@ class ExecutionPlan(object):
...
@@ -191,13 +191,12 @@ class ExecutionPlan(object):
return
result
return
result
def
preprocess
(
self
,
union
,
security
=
True
):
def
preprocess
(
self
,
union
,
security
=
True
):
"""insert security when necessary then annotate rql st for sql generation
"""insert security when necessary then annotate rql syntax tree
to prepare sql generation
return rqlst to actually execute
"""
"""
cached
=
None
cached
=
None
if
security
and
self
.
cnx
.
read_security
:
if
security
and
self
.
cnx
.
read_security
:
# ensure security is turned of when security is inserted,
# ensure security is turned of
f
when security is inserted,
# else we may loop for ever...
# else we may loop for ever...
if
self
.
cnx
.
transaction_data
.
get
(
'security-rqlst-cache'
):
if
self
.
cnx
.
transaction_data
.
get
(
'security-rqlst-cache'
):
key
=
self
.
cache_key
key
=
self
.
cache_key
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment