You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Query single methods raise unexpected error without executing the query
Reproduction
Use _example project
awaitdb.query_single_json(
'select Movie {**} filter .release_year = <int32>$release_year',
release_year=32
)
raises
InterfaceError('query cannot be executed with query_single_json() as it may return more than one element')
Expected behavior
I would expect the behavior that is described in the docs:
The query must return no more than one element. If the query returns more than one element, an edgedb.ResultCardinalityMismatchError is raised, if it returns an empty set, "null" is returned
So the expected behavior is no exception except when multiples entries are returned
OS:
EdgeDB version: 5.6+b7b0563
EdgeDB CLI version: EdgeDB CLI 5.5.2+1743aac
edgedb-python version: 2.2.0
Python version: 3.12
The text was updated successfully, but these errors were encountered:
Describe the bug
Query single methods raise unexpected error without executing the query
Reproduction
Use
_example
projectraises
Expected behavior
I would expect the behavior that is described in the docs:
The query must return no more than one element. If the query returns more than one element, an
edgedb.ResultCardinalityMismatchError
is raised, if it returns an empty set, "null" is returnedSo the expected behavior is no exception except when multiples entries are returned
edgedb-python
version: 2.2.0The text was updated successfully, but these errors were encountered: