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
select value returns a slightly different shape than a normal select, the fix would be to add a check for that before returning the response.
ie. response["result"][0]["result"]
Also, add a check for returning a single value
Steps to reproduce
Returning just a list db.query("select value name from person")
Returning just a value db.query("return 'stuff' ")
Expected behaviour
Return the results like a normal select
SurrealDB version
2.0.2 for macos on aarch64
surrealdb.py version
1.0.3
Contact Details
No response
Is there an existing issue for this?
I have searched the existing issues
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
response2=awaitself.connection.query("SELECT VALUE name FROM user WHERE id = user:tobie;")
print(response2)
Gives us the structure below:
['Tobie']
And the second one should be this?
[{'name': 'Tobie'}]
Could this be a error in the response at the database level? For instance, an example raw response I'm getting from SELECT VALUE name FROM user WHERE id = user:tobie; is:
Describe the bug
select value
returns a slightly different shape than a normalselect
, the fix would be to add a check for that before returning the response.ie.
response["result"][0]["result"]
Also, add a check for returning a single value
Steps to reproduce
Returning just a list
db.query("select value name from person")
Returning just a value
db.query("return 'stuff' ")
Expected behaviour
Return the results like a normal
select
SurrealDB version
2.0.2 for macos on aarch64
surrealdb.py version
1.0.3
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: