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

How to use named_args? #2209

Open
devsalesexpress opened this issue Dec 26, 2024 · 1 comment
Open

How to use named_args? #2209

devsalesexpress opened this issue Dec 26, 2024 · 1 comment

Comments

@devsalesexpress
Copy link

Do you have any examples of how to use named_args, any practical examples, could you write a query using exec so that it executes the RewriteQuery?

@jackc
Copy link
Owner

jackc commented Dec 31, 2024

ct, err := conn.Exec(ctx, "delete from widgets where foo = @foo and bar = @bar", pgx.NamedArgs{"foo": 1, "bar": 2})

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

No branches or pull requests

2 participants