Skip to content

PostgresQueryResult.metadata does not account for EmptyQueryResponse #502

Open
@MahdiBM

Description

@MahdiBM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingTo fix this bug or implement this feature we must break APIenhancementNew feature or requestsemver-majorBreaks existing public API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions