Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RQL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
RQL
Commits
6cccc53a9ebe
Commit
6cccc53a9ebe
authored
16 years ago
by
Sylvain Thenault
Browse files
Options
Downloads
Patches
Plain Diff
deal with substitution constant in unsimplification
parent
06e9d7f2b790
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stmts.py
+8
-3
8 additions, 3 deletions
stmts.py
with
8 additions
and
3 deletions
stmts.py
+
8
−
3
View file @
6cccc53a
...
...
@@ -349,4 +349,7 @@
restriction
=
[]
if
unsimplified
and
self
.
stinfo
[
'
rewritten
'
]:
vvalues
=
{}
# hact to avoid actually replacing introduced const node:
# replace const value by variable value and set constant type to Int
# to avoid quoting
for
vname
,
consts
in
self
.
stinfo
[
'
rewritten
'
].
iteritems
():
...
...
@@ -352,5 +355,6 @@
for
vname
,
consts
in
self
.
stinfo
[
'
rewritten
'
].
iteritems
():
vvalues
[
vname
]
=
consts
[
0
].
value
restriction
.
append
(
'
%s eid %s
'
%
(
vname
,
consts
[
0
].
value
))
eid
=
consts
[
0
].
eval
(
kwargs
)
vvalues
[
vname
]
=
(
consts
[
0
].
type
,
eid
)
restriction
.
append
(
'
%s eid %s
'
%
(
vname
,
eid
))
for
const
in
consts
:
const
.
value
=
vname
...
...
@@ -355,5 +359,6 @@
for
const
in
consts
:
const
.
value
=
vname
const
.
type
=
'
Int
'
s
=
[
'
,
'
.
join
(
as_string
(
term
)
for
term
in
self
.
selection
)]
if
self
.
groupby
:
s
.
append
(
'
GROUPBY
'
+
'
,
'
.
join
(
as_string
(
term
)
...
...
@@ -377,7 +382,7 @@
if
unsimplified
and
self
.
stinfo
[
'
rewritten
'
]:
for
vname
,
consts
in
self
.
stinfo
[
'
rewritten
'
].
iteritems
():
for
const
in
consts
:
const
.
value
=
vvalues
[
vname
]
const
.
type
,
const
.
value
=
vvalues
[
vname
]
return
'
Any
'
+
'
'
.
join
(
s
)
def
copy
(
self
,
copy_solutions
=
True
,
solutions
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment