Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adds RowDescription to the SimpleQueryMessage#1144

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

rigby-dane
Copy link
Contributor

Adds RowDescription to the SimpleQueryMessage to allow column information to be consumed without needing to consume any DataRows

Resolves#1143

_ =>returnPoll::Ready(Some(Err(Error::unexpected_message()))),
*this.columns =Some(columns.clone());
Poll::Ready(Some(Ok(SimpleQueryMessage::RowDescription(
columns.clone(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You shouldn't need to clone here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was originally confused about this, but thought it over and figured out a solution. I've added a change to reduce it to just 1 clone instead of 2.

Comment on lines 104 to 107
*this.columns =Some(columns);
Poll::Ready(Some(Ok(SimpleQueryMessage::RowDescription(
columns.clone(),
this.columns.as_ref().unwrap().clone(),
))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Wouldn't this work?

*this.columns =Some(columns.clone());Poll::Ready(Some(Ok(SimpleQueryMessage::RowDescription(                    columns))))

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yes, it does. I was clearly overthinking it. Thank you!

@sfacklersfackler merged commit647a925 intorust-postgres:masterJul 9, 2024
@sfackler
Copy link
Collaborator

Thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sfacklersfacklersfackler left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Idea: Add RowDescription to SimpleQueryMessage
2 participants
@rigby-dane@sfackler

[8]ページ先頭

©2009-2025 Movatter.jp