-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBOR implementation and HTTP connection engine #153
Conversation
``` | ||
Where surrealdb.O is defined below. There is no special advantage in using this other than simplicity/legibility. | ||
```go | ||
type surrealdb.O map[interface{}]interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I suggest something other than 0? It's very unclear whether it is 0 or O.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickchomey I see what you mean. Maybe something like .Obj
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces the HTTP connection engine, complementing the existing WebSocket engine, allowing users to choose their preferred connection type (HTTP or WebSocket) based on their needs.
Additionally, the communication encoding has been switched from JSON to CBOR. This change enables more robust data handling, providing richer type information during communication between the client and SurrealDB. By eliminating the need for the previous smart marshalling/unmarshalling logic, CBOR ensures precise handling of data types, aligning with both user requests and the SurrealDB service responses.
Key Changes
db
injection and generic constraints for results