Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgresQueryResult.metadata does not account for EmptyQueryResponse #502

Open
MahdiBM opened this issue Aug 21, 2024 · 0 comments
Open
Labels
breaking To fix this bug or implement this feature we must break API enhancement New feature or request semver-major Breaks existing public API.

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Aug 21, 2024

Is your feature request related to a problem? Please describe.
See this for the origin.

Postgres can sometimes return an empty query response, for example when your whole query is only a comment.
In that situation, there will be no command tags.
The current APIs assume that the command tag is always available at that point in a query, which is not true.
For now we can workaround this by settings the command tag (PostgresQueryResult.metadata.command) to an empty string.

Describe the solution you'd like
PostgresQueryResult.metadata should become an optional.

Describe alternatives you've considered
Just setting PostgresQueryResult.metadata.command to an empty string instead.

Additional context
Add any other context or screenshots about the feature request here.

@MahdiBM MahdiBM added enhancement New feature or request semver-major Breaks existing public API. breaking To fix this bug or implement this feature we must break API labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking To fix this bug or implement this feature we must break API enhancement New feature or request semver-major Breaks existing public API.
Projects
None yet
Development

No branches or pull requests

1 participant