Skip to content

Commit 6ff328f

Browse files
authored
Apply suggestions from code review
1 parent 0e1720b commit 6ff328f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Added `ResultSet.Index()` method
1+
* Added `query.ResultSet.Index()` method
22

33
## v3.74.5
44
* Fixed bug with reading empty result set parts.

internal/query/result.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
type (
2626
materializedResult struct {
2727
resultSets []query.ResultSet
28-
idx int64
28+
idx int
2929
}
3030
result struct {
3131
stream Ydb_Query_V1.QueryService_ExecuteQueryClient
@@ -51,7 +51,7 @@ func (r *materializedResult) Close(ctx context.Context) error {
5151
}
5252

5353
func (r *materializedResult) NextResultSet(ctx context.Context) (query.ResultSet, error) {
54-
if r.idx == int64(len(r.resultSets)) {
54+
if r.idx == len(r.resultSets) {
5555
return nil, xerrors.WithStackTrace(io.EOF)
5656
}
5757

internal/query/result_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,5 @@ func (rs *resultSet) NextRow(ctx context.Context) (_ query.Row, err error) {
175175
}
176176

177177
func (rs *resultSet) Index() int {
178-
return int(rs.index)
178+
return rs.idx
179179
}

0 commit comments

Comments
 (0)