Skip to content

Expose SimpleQueryRow internals to user #950

Open
@dwlbnks

Description

@dwlbnks

I have a use case where I'd like to reconstruct a Simple Query message and pass it back to my user. To do this I'd want to make a few changes to the Client::simple_query() implementation.

  1. Store and return the entire Field that is built from a backend Message::RowDescription in SimpleQueryRow instead of just returning the column name in SimpleColumn. I've done this with minor changes to the current interface in our rust-postgres fork.

  2. Ideally, expose SimpleQueryRow::body to avoid having to read each value using SimpleQueryRow::get() and re-serialize the message to bytes myself.

  3. Ideally, create public constructors for SimpleQueryRow, Field, and DataRowBody to allow easier unit testing in my own code. I noticed that a similar question came up in a previous issue. Maybe we could implement this under a compile time feature flag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions