surrealdb.go icon indicating copy to clipboard operation
surrealdb.go copied to clipboard

[WIP] Resolver and Serialisation

Open iDevelopThings opened this issue 3 years ago • 7 comments
trafficstars

The idea/solution i mentioned in #20

  • Implemented RPCRawResponse/Serialisation changes
  • Implemented the query resolver solution
  • Started tests for resolver/serialisation

Only handled the regular Query() function so far It's pretty hacky in some places, was a quick put together as POC

TODO: Need to clean up the panics and find better solutions to them

iDevelopThings avatar Sep 25 '22 17:09 iDevelopThings

Sorry for any spam 😅

I will see if i can work through these changes tomorrow and clear some bits up + add the go build tags for 18+

iDevelopThings avatar Sep 25 '22 18:09 iDevelopThings

@Keitio what would we do with this panic here?

We wouldn't want to cancel the context/close the ws right? 🤔

CleanShot 2022-09-26 at 14 46 47

iDevelopThings avatar Sep 26 '22 13:09 iDevelopThings

Yeah, logging the error and then a continue would be more appropriate

Keitio avatar Sep 26 '22 13:09 Keitio

F, I thought ready for review, would request another one, my bad...

iDevelopThings avatar Sep 26 '22 17:09 iDevelopThings

Yeah I agree, it's quite large, but it's more of an optional/additional layer the dev can opt into to keep things a bit more simplified, for example, using .Query() and getting your individual item out of the result each time, gets boring fast, and then you write a wrapper to do it.... then every person does the same thing, it makes sense to have an option for that being handled

Things that you think shouldn't be exposed like that, can be sorted, it's just a WIP, on my personal code, i don't usually care too much about things not being exported 😅

iDevelopThings avatar Sep 26 '22 22:09 iDevelopThings

Yep, no problems with that ! Was just stating my personal opinion on the current state of your branch just for you to get some (albeit very opinionated) feedback

Keitio avatar Sep 26 '22 22:09 Keitio

Hey @iDevelopThings 👋 Thanks for opening this! Do you want to continue trying to merge this or can we close this PR? Will assign @timpratim if we do decide to continue. It would be good to resolve the merge conflicts to make it easier to review.

phughk avatar May 23 '23 14:05 phughk