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

Support scalar queries.#1126

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

Open
rikvdkleij wants to merge1 commit intorust-postgres:master
base:master
Choose a base branch
Loading
fromtandemdrive:support-scalar-queries

Conversation

rikvdkleij
Copy link

@rikvdkleijrikvdkleij commentedApr 3, 2024
edited
Loading

This PR adds support for querying scalars with the following functions:

  • query_scalar returns a vector of scalars
  • query_one_scalar returns one scalar
  • query_opt_scalar returns optional scalar

It removes the need to always handle a row.

Also in the process of migrating fromsqlx totokio-postgres it's convenient to have support for scalar query functions.

Questions and/or suggestions are welcome!

BentEngbers, bheylin, and mymtw reacted with thumbs up emoji
@rudolphfrogerrudolphfroger deleted the support-scalar-queries branchMarch 19, 2025 08:49
Copy link
Member

@paolobarbolinipaolobarbolini left a comment
edited
Loading

Choose a reason for hiding this comment

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

query_one considers it an error for the query to return more than one row. Should the scalar methods consider it an error for the query to return more than one column?

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

@paolobarbolinipaolobarbolinipaolobarbolini 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.

2 participants
@rikvdkleij@paolobarbolini

[8]ページ先頭

©2009-2025 Movatter.jp