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

add push_tuples for QueryBuilder #1954

Merged
merged 6 commits into from
Jul 15, 2022
Merged

Conversation

0xdeafbeef
Copy link
Contributor

@0xdeafbeef 0xdeafbeef commented Jul 8, 2022

Add push_tuples method for query builder, which allows creating where (a, b, c) in (1, 2, 3), (..) requests

@0xdeafbeef
Copy link
Contributor Author

Or instead, we can add impl DerefMut<Target = QueryBuilder> or some method to allow writing such code outside sqlx

@abonander
Copy link
Collaborator

Can you please update the docs to be relevant to .push_tuples() and not .push_values(), and also fix the CI failures?

@abonander
Copy link
Collaborator

In fact, the implementation of .push_values() should probably utilize .push_tuples() to reduce duplicated code.

@0xdeafbeef
Copy link
Contributor Author

0xdeafbeef commented Jul 13, 2022

Can you please update the docs to be relevant to .push_tuples() and not .push_values(), and also fix the CI failures?

Fixed docs, not sure about CI, because I haven't touched failed peaces of code. Should I rebase master onto my fork?

UPD.
It still doesn't compile, locally everything compiles

@abonander
Copy link
Collaborator

One more rebase should hopefully fix it.

@0xdeafbeef
Copy link
Contributor Author

One more rebase should hopefully fix it.

Yep, it's fixed

sqlx-core/src/query_builder.rs Outdated Show resolved Hide resolved
@abonander abonander merged commit 28e22e1 into launchbadge:main Jul 15, 2022
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.

2 participants