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

Inaccurate code comments on method ExecuteTo #55

Open
Phil-CST-BCIT opened this issue Jul 13, 2024 · 0 comments
Open

Inaccurate code comments on method ExecuteTo #55

Phil-CST-BCIT opened this issue Jul 13, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@Phil-CST-BCIT
Copy link

Improve documentation

Link

Add a link to the page which needs improvement (if relevant)

https://github.com/supabase-community/postgrest-go/blob/main/querybuilder.go#L44

Describe the problem

Is the documentation missing? Or is it confusing? Why is it confusing?

The comments on the method func (q *QueryBuilder) ExecuteTo(to interface{}) state that the acceptable argument to is always a slice, but this is not true if the user specifies vnd.pgrst.object to be part of the Accept header (see: https://docs.postgrest.org/en/v12/references/api/resource_representation.html#singular-or-plural).

Describe the improvement

A clear and concise description of the improvement.

Update the current comments to capture the fact:

// interface. Note that the argument for the to parameter should always be a
// reference to a slice unless the method Single is specified.

Additional context

Add any other context or screenshots that help clarify your question.

@Phil-CST-BCIT Phil-CST-BCIT added the documentation Improvements or additions to documentation label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant