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

Improve error messaging for empty named parameter keys #920

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leefernandes
Copy link

@leefernandes leefernandes commented Mar 23, 2024

This PR is to improve the error message returned by sqlx when a named bind parameter name is empty.
Example: SELECT * FROM person WHERE id=:id -- TODO: Improve stuff

Instead of could not find name in struct{ID:1}
the output is sqlx.bindArgs: empty named parameter at index 1 in []string{"id", ""}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant