From bbd1ae52f989ab731d49b4129b19d33dc5ed77ce Mon Sep 17 00:00:00 2001 From: Winston Purnomo Date: Sun, 19 May 2024 11:27:51 -0700 Subject: [PATCH] Fixed comments --- filterbuilder.go | 14 +++++++------- querybuilder.go | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/filterbuilder.go b/filterbuilder.go index 23bae34..62c6401 100644 --- a/filterbuilder.go +++ b/filterbuilder.go @@ -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) } @@ -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) } @@ -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) } diff --git a/querybuilder.go b/querybuilder.go index a532514..5803b57 100644 --- a/querybuilder.go +++ b/querybuilder.go @@ -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) } @@ -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) } @@ -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) }