Closed Zyrenth closed 1 week ago
Thanks for the detailed explanation and sample! The protocol returns a single json object if there is only one result, so that is the issue. The driver needs to handle that.
Thanks for the detailed explanation and sample! The protocol returns a single json object if there is only one result, so that is the issue. The driver needs to handle that.
Thanks for the explanation, is there a solution for it right now or do I have to wait for a new release?
Thanks for the detailed explanation and sample! The protocol returns a single json object if there is only one result, so that is the issue. The driver needs to handle that.
Thanks for the explanation, is there a solution for it right now or do I have to wait for a new release?
I would like to know it because I'm doing a personal project and I don't know if I should keep trying to implement a patch by myself or wait for a new release.
I am very focused on live queries at the moment, but if you would like help solving that then I can help out. It should be an easy fix, but it requires tests. It looks like we may have approached it already? But potentially might not be valid https://github.com/surrealdb/surrealdb.java/blame/main/src/main/java/com/surrealdb/connection/SurrealWebSocketConnection.java#L116 If you request multiple values then you can circumvent that, but that is a massive pain and we should solve it properly. A test for it can be written here https://github.com/surrealdb/surrealdb.java/blob/main/src/test/java/com/surrealdb/connection/SurrealWebSocketConnectionTest.java
I am very focused on live queries at the moment, but if you would like help solving that then I can help out. It should be an easy fix, but it requires tests. It looks like we may have approached it already? But potentially might not be valid https://github.com/surrealdb/surrealdb.java/blame/main/src/main/java/com/surrealdb/connection/SurrealWebSocketConnection.java#L116 If you request multiple values then you can circumvent that, but that is a massive pain and we should solve it properly. A test for it can be written here https://github.com/surrealdb/surrealdb.java/blob/main/src/test/java/com/surrealdb/connection/SurrealWebSocketConnectionTest.java
Okay thanks, I will try to patch it when I will have time for it. Thanks for the help and explanations, I really appreciate it.
The SurrealDB driver v0.2.0 comes with a new set of methods. There are different variants of the create method, as described here: https://surrealdb.github.io/surrealdb.java/javadoc/com/surrealdb/Surreal.html#create(com.surrealdb.RecordId,T)
In the nodejs module I always used the create function like this:
I always specified an ID, but now as I do the same in Java this doesn't appear to be working, I'm getting errors and messed up database (though I'm not sure if this is really the database or the database browser I use).
Here is what errors I get:
Here is my code:
That's all for now. If there is confusion just ask me, thanks!