Skip to content

Bug: .query() errors when using select value #159

@AlexFrid

Description

@AlexFrid

Describe the bug

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions