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
7b8e124f230c
Commit
7b8e124f230c
authored
14 years ago
by
Sylvain Thénault
Browse files
Options
Downloads
Patches
Plain Diff
fix solutions computation crash with some query using sub-queries (closes #37423)
parent
5a8ae1ed1c84
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
analyze.py
+13
-5
13 additions, 5 deletions
analyze.py
with
16 additions
and
5 deletions
ChangeLog
+
3
−
0
View file @
7b8e124f
ChangeLog for RQL
=================
--
* fix solutions computation crash with some query using sub-queries (closes #37423)
2010-07-28 -- 0.26.4
* fix re-annotation pb: some stinfo keys were not properly reinitialized
which may cause pb later (at sql generation time for instance)
...
...
This diff is collapsed.
Click to expand it.
analyze.py
+
13
−
5
View file @
7b8e124f
...
...
@@ -377,8 +377,8 @@
alltypes
.
add
(
targettypes
)
else
:
alltypes
=
get_target_types
()
constraints
.
var_has_types
(
var
,
[
str
(
t
)
for
t
in
alltypes
]
)
domain
=
constraints
.
domains
[
var
]
constraints
.
var_has_types
(
var
,
[
str
(
t
)
for
t
in
alltypes
if
t
in
domain
]
)
def
visit
(
self
,
node
,
uid_func_mapping
=
None
,
kwargs
=
None
,
debug
=
False
):
# FIXME: not thread safe
...
...
@@ -509,5 +509,6 @@
samevar
=
True
else
:
rhsvars
.
append
(
v
.
name
)
lhsdomain
=
constraints
.
domains
[
lhsvar
]
if
rhsvars
:
s2
=
'
==
'
.
join
(
rhsvars
)
...
...
@@ -512,4 +513,6 @@
if
rhsvars
:
s2
=
'
==
'
.
join
(
rhsvars
)
# filter according to domain necessary for column aliases
rhsdomain
=
constraints
.
domains
[
rhsvars
[
0
]]
res
=
[]
for
fromtype
,
totypes
in
rschema
.
associations
():
...
...
@@ -514,5 +517,8 @@
res
=
[]
for
fromtype
,
totypes
in
rschema
.
associations
():
res
.
append
(
[
(
[
lhsvar
],
[
str
(
fromtype
)]),
(
rhsvars
,
[
str
(
t
)
for
t
in
totypes
])
]
)
if
not
fromtype
in
lhsdomain
:
continue
ptypes
=
[
str
(
t
)
for
t
in
totypes
if
t
in
rhsdomain
]
res
.
append
(
[
(
[
lhsvar
],
[
str
(
fromtype
)]),
(
rhsvars
,
ptypes
)
]
)
constraints
.
or_and
(
res
)
else
:
...
...
@@ -517,6 +523,8 @@
constraints
.
or_and
(
res
)
else
:
constraints
.
var_has_types
(
lhsvar
,
[
str
(
subj
)
for
subj
in
rschema
.
subjects
()]
)
ptypes
=
[
str
(
subj
)
for
subj
in
rschema
.
subjects
()
if
subj
in
lhsdomain
]
constraints
.
var_has_types
(
lhsvar
,
ptypes
)
if
samevar
:
res
=
[]
for
fromtype
,
totypes
in
rschema
.
associations
():
...
...
@@ -520,7 +528,7 @@
if
samevar
:
res
=
[]
for
fromtype
,
totypes
in
rschema
.
associations
():
if
not
fromtype
in
totypes
:
if
not
(
fromtype
in
totypes
and
fromtype
in
lhsdomain
)
:
continue
res
.
append
(
str
(
fromtype
))
constraints
.
var_has_types
(
lhsvar
,
res
)
...
...
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