Skip to content

Commit

Permalink
Merge branch 'master' into execute-data-query-over-query
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Apr 18, 2024
2 parents 5802d70 + bf0fd33 commit f66baf0
Show file tree
Hide file tree
Showing 13 changed files with 1,237 additions and 80 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
* Added `table/options.UseQueryServiceExecute()` option for redirect `table.Session.Execute` call to `query.Execute`
* Added `table/options.WithQueryService()` option for redirect `/Ydb.Table.V1.TableService/ExecuteDataQuery` call to `/Ydb.Query.V1.QueryService/ExecuteQuery`

## v3.65.2
* Fixed data race using `log.WithNames`

## v3.65.1
* Updated dependency `ydb-go-genproto`
Expand Down
1 change: 1 addition & 0 deletions internal/query/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
var (
ErrNotImplemented = errors.New("not implemented yet")
errWrongNextResultSetIndex = errors.New("wrong result set index")
errNilResult = errors.New("nil result")
errClosedResult = errors.New("result closed early")
errClosedClient = errors.New("query client closed early")
errWrongResultSetIndex = errors.New("critical violation of the logic - wrong result set index")
Expand Down
3 changes: 3 additions & 0 deletions internal/query/execute_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func queryFromText(
}

func ReadAll(ctx context.Context, r *result) (resultSets []*Ydb.ResultSet, stats *Ydb_TableStats.QueryStats, _ error) {
if r == nil {
return nil, nil, xerrors.WithStackTrace(errNilResult)
}
for {
resultSet, err := r.nextResultSet(ctx)
if err != nil {
Expand Down
Loading

0 comments on commit f66baf0

Please sign in to comment.