surrealdb / surrealdb.java

SurrealDB SDK for Java
https://surrealdb.com
Apache License 2.0
67 stars 21 forks source link

Feature: Handle query returning single responses in the websocket protocol #75

Closed phughk closed 10 months ago

phughk commented 1 year ago

Is your feature request related to a problem?

The current implementation expects query to return an array of results. If there is only 1 result, the results field will be a json object not a json array.

Describe the solution

In the query handling in WsPlaintextConnection handle the possibility that a json object can be returned instead of an array.

Alternative methods

None

SurrealDB version

1.0.0-beta.9+20230821.0665e1b7 for macos on aarch64

Contact Details

hugh@surrealdb.com

Is there an existing issue for this?

Code of Conduct

Divine1 commented 10 months ago

@phughk please let me know if this issue is still open or completed

phughk commented 10 months ago

AFAIK it's resolved, but there were a few issues with the merged PR.

It should

So improvements are definitely welcome! I will close this ticket, but if you would like to work on anything specific then happy to advise