Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
RQL
Commits
8f32328e2505
Commit
9989aa81
authored
Jan 05, 2022
by
Frank Bessou
🍁
Browse files
feat: move AnyStatement to stmts
parent
a2539c46dc95
Changes
3
Hide whitespace changes
Inline
Side-by-side
rql/analyze.py
View file @
8f32328e
...
...
@@ -348,7 +348,7 @@ class ETypeResolver:
def
solve
(
self
,
node
:
rt
.
AnyScopeNode
,
node
:
"rql.stmts
.AnyScopeNode
"
,
constraints
:
CSPType
,
)
->
None
:
# debug info
...
...
@@ -400,7 +400,7 @@ class ETypeResolver:
types
.
add
(
cst
.
uidtype
)
return
types
def
_init_scope_node
(
self
,
node
:
rt
.
AnyScopeNode
)
->
CSPType
:
def
_init_scope_node
(
self
,
node
:
"rql.stmts
.AnyScopeNode
"
)
->
CSPType
:
pb
=
CSPProblem
()
# set domain for all the variables
for
var
in
node
.
defined_vars
.
values
():
...
...
rql/rqltypes.py
View file @
8f32328e
...
...
@@ -155,13 +155,3 @@ class HasOperatorAttribute(Protocol):
kwargs
:
Optional
[
Dict
]
=
None
,
)
->
str
:
...
# AnyScopeNode is the Union of all ScopeNode child classes
AnyScopeNode
=
Union_
[
"rql.stmts.Set"
,
"rql.stmts.Delete"
,
"rql.stmts.Insert"
,
"rql.stmts.Select"
,
"rql.stmts.Select"
,
]
rql/stmts.py
View file @
8f32328e
...
...
@@ -1358,3 +1358,11 @@ AnyStatement = Union_[
Union
,
Insert
,
]
AnyScopeNode
=
Union_
[
Set
,
Delete
,
Insert
,
Select
,
]
Write
Preview
Supports
Markdown
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