tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
193 stars 24 forks source link

Update prepare and transactions methods to use context #23

Closed avinassh closed 1 year ago

avinassh commented 1 year ago

I have added PrepareContext and BeginTx methods. I have also replaced context.TODO with context.Background

Following methods are required because of interface, but they are not used:

I have confirmed this by keeping panic() calls and running the test suite.

Also, I updated the example snippet to use ctx in every call and included a sample of prepared statements

avinassh commented 1 year ago

It's better if we merge #24 first, then we can run the tests in this PR to make sure everything is alright

haaawk commented 1 year ago

Thanks @avinassh. Looks mostly good but I think the PR needs some cleanup. Please remove commits that introduce changes that are removed later. Also please remove your credentials :)

avinassh commented 1 year ago

@haaawk hey, I have cleaned up and squashed all the commits

haaawk commented 1 year ago

Thanks @avinassh. Looks much better. Just one last question.