Skip to content

add :stream keyword` #4464

@borissmidt

Description

@borissmidt

What do you want to change?

Earlier requests have been made to return an iterator, but we have to be careful not to break the 'RETURNING' statements that don't work well with a cursor. Also the developer kind of knows it is a 'big query' or not.

So instead of changing existing behavior i would suggest adding a new keyword :stream for returning an iterator and using a cursor. Then it is up to the developer himself to decide can i return an iterator or array.

Related issue in the python generator:
sqlc-dev/sqlc-gen-python#101

Previous issues:
#4108
#720

What database engines need to be changed?

PostgreSQL, SQLite, MySQL

What programming language backends need to be changed?

Go, Python, Kotlin

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions