Skip to content
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

Added ctx arguments to execute #49

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Added ctx arguments to execute #49

merged 2 commits into from
Jun 21, 2024

Conversation

assembly-winston
Copy link

What kind of change does this PR introduce?

Added context.Context argument to each variant of the Execute() function, enabling users to pass context-based cancelation to the functions.

What is the current behavior?

There is no way to set deadlines/timeouts for operations to the DB.

What is the new behavior?

We allow the user to pass in a ctx to new variants of the Execute() function that are passed in to http.NewRequestWithContext() rather than the plain http.NewRequest, which defaults to context.Background(), which has no timeout.

Additional context

More info: https://go.dev/doc/database/cancel-operations

@assembly-winston
Copy link
Author

Fixes issue 7 in supabase-go: supabase-community/supabase-go#7

@muratmirgun muratmirgun merged commit 9e475dc into supabase-community:main Jun 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants