Skip to content

Commit

Permalink
Fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
winstonpurnomo committed May 19, 2024
1 parent f6f2d82 commit bbd1ae5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions filterbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ func (f *FilterBuilder) ExecuteString() (string, int64, error) {
return executeString(context.Background(), f.client, f.method, f.body, []string{f.tableName}, f.headers, f.params)
}

// Execute runs the PostgREST query with the given context, returning the
// result as a byte slice.
// ExecuteStringWithContext runs the PostgREST query, returning the result as
// a JSON string.
func (f *FilterBuilder) ExecuteStringWithContext(ctx context.Context) (string, int64, error) {
return executeString(ctx, f.client, f.method, f.body, []string{f.tableName}, f.headers, f.params)
}
Expand All @@ -36,8 +36,8 @@ func (f *FilterBuilder) Execute() ([]byte, int64, error) {
return execute(context.Background(), f.client, f.method, f.body, []string{f.tableName}, f.headers, f.params)
}

// Execute runs the PostgREST query with the given context, returning the
// result as a byte slice.
// ExecuteWithContext runs the PostgREST query with the given context,
// returning the result as a byte slice.
func (f *FilterBuilder) ExecuteWithContext(ctx context.Context) ([]byte, int64, error) {
return execute(ctx, f.client, f.method, f.body, []string{f.tableName}, f.headers, f.params)
}
Expand All @@ -49,9 +49,9 @@ func (f *FilterBuilder) ExecuteTo(to interface{}) (countType, error) {
return executeTo(context.Background(), f.client, f.method, f.body, to, []string{f.tableName}, f.headers, f.params)
}

// ExecuteTo runs the PostgREST query with the given context, encoding the
// result to the supplied interface. Note that the argument for the to
// parameter should always be a reference to a slice.
// ExecuteToWithContext runs the PostgREST query with the given context,
// encoding the result to the supplied interface. Note that the argument for
// the to parameter should always be a reference to a slice.
func (f *FilterBuilder) ExecuteToWithContext(ctx context.Context, to interface{}) (countType, error) {
return executeTo(ctx, f.client, f.method, f.body, to, []string{f.tableName}, f.headers, f.params)
}
Expand Down
14 changes: 7 additions & 7 deletions querybuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func (q *QueryBuilder) ExecuteString() (string, int64, error) {
return executeString(context.Background(), q.client, q.method, q.body, []string{q.tableName}, q.headers, q.params)
}

// Execute runs the PostgREST query with the given context, returning the
// result as a byte slice.
// ExecuteStringWithContext runs the PostgREST query, returning the result as
// a JSON string.
func (q *QueryBuilder) ExecuteStringWithContext(ctx context.Context) (string, int64, error) {
return executeString(ctx, q.client, q.method, q.body, []string{q.tableName}, q.headers, q.params)
}
Expand All @@ -34,8 +34,8 @@ func (q *QueryBuilder) Execute() ([]byte, int64, error) {
return execute(context.Background(), q.client, q.method, q.body, []string{q.tableName}, q.headers, q.params)
}

// Execute runs the PostgREST query with the given context, returning the
// result as a byte slice.
// ExecuteWithContext runs the PostgREST query with the given context,
// returning the result as a byte slice.
func (q *QueryBuilder) ExecuteWithContext(ctx context.Context) ([]byte, int64, error) {
return execute(ctx, q.client, q.method, q.body, []string{q.tableName}, q.headers, q.params)
}
Expand All @@ -47,9 +47,9 @@ func (q *QueryBuilder) ExecuteTo(to interface{}) (int64, error) {
return executeTo(context.Background(), q.client, q.method, q.body, to, []string{q.tableName}, q.headers, q.params)
}

// ExecuteTo runs the PostgREST query with the given context, encoding the
// result to the supplied interface. Note that the argument for the to
// parameter should always be a reference to a slice.
// ExecuteToWithContext runs the PostgREST query with the given context,
// encoding the result to the supplied interface. Note that the argument for
// the to parameter should always be a reference to a slice.
func (q *QueryBuilder) ExecuteToWithContext(ctx context.Context, to interface{}) (int64, error) {
return executeTo(ctx, q.client, q.method, q.body, to, []string{q.tableName}, q.headers, q.params)
}
Expand Down

0 comments on commit bbd1ae5

Please sign in to comment.