Владимир Атаманов

Results 10 comments of Владимир Атаманов

Hi @kyleconroy Can I help you with implementation of this feature? For me, the following implementation of iteration is preferable: ```go type IterCitiesRows struct{ rows *sql.Rows err error } func...

@kyleconroy I've placed end-to-end tests here https://github.com/sqlc-dev/sqlc/pull/3631/files#diff-ef71fe84cdfc32f51a1cf70a80a17506a422b5ccc42e714a56a6a2334e6a4bc5 Do you need some other kind of tests? Please give an example

@kyleconroy What do you think about the Close method? I still haven't decided if it's necessary.

I found some example tests here https://github.com/sqlc-dev/sqlc/tree/main/examples and added iterator tests there

@kyleconroy, hi I updated my pull request, check it please

> I do not think the `Close` method is needed, but the `func` returned by `Iterate` needs to have `defer r.rows.Close()` added. Without it a recovered panic would leave the...

> Instead of having an `Err()` method, should `IterCities` just be something like this? > > ```go > IterCities(ctx context.Context) (seq iter.Seq2[City, error], stop func()) > ``` I thought about...

> I found these in the release notes for Go 1.24. The [bytes](https://tip.golang.org/pkg/bytes) package adds several functions that work with iterators Following this example, it seems more appropriate to rename...

I would prefer Items(). Rows() is associated with sql.Rows and can be treated as raw data.

I apologize. I wanted to sync [my repository](https://github.com/viewsharp/sqlc) and didn't know that it could lead to closing the PR. I will restore it soon