Skip to content

Inaccurate code comments on method ExecuteTo #55

@Phil-CST-BCIT

Description

@Phil-CST-BCIT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions