surrealdb / surrealdb.go

SurrealDB SDK for Golang
https://surrealdb.com
Apache License 2.0
232 stars 60 forks source link

Add context.Context support to the API #121

Open VoyTechnology opened 7 months ago

VoyTechnology commented 7 months ago

The change adds context.Context support to the APIs. The context is currently unused and just serves as an API change before more functionality is added (eg. tracing).

This is a breaking API change.

Closes #100

ElecTwix commented 7 months ago

Hi @VoyTechnology,

Thanks for your PR.

I understand the importance of using contexts, but I'm not sure we should add them while we're not utilizing them in a useful way yet.

We should also consider that we'll be making some major changes in the future to try to be compatible with the golang standard interface (database/sql). Once these changes are implemented, I think we could then consider adding contexts.

Please let me know what you think. We can discuss this further if you'd like.