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

Bind array values in SQLx PostgreSQL driver #225

Closed
wants to merge 2 commits into from

Conversation

billy1624
Copy link
Member

@tyt2y3
Copy link
Member

tyt2y3 commented Jan 11, 2022

Ah, so we still have to clone the values :(
But yea, it's so elaborate

@billy1624
Copy link
Member Author

Ah, so we still have to clone the values :( But yea, it's so elaborate

I can't think of a better way of doing it... given the defined Value::array

@tyt2y3
Copy link
Member

tyt2y3 commented Jan 11, 2022

It would be slightly better if we introduce a separate function that takes ownership of Values

@billy1624
Copy link
Member Author

It would be slightly better if we introduce a separate function that takes ownership of Values

When binding the value onto SQLx query? Currently, it's taking value as reference.

@tyt2y3
Copy link
Member

tyt2y3 commented Mar 13, 2022

I think this will need to updated after merging #267
It seems like a considerable maintenance cost IMO

@itsbalamurali
Copy link

@billy1624 @tyt2y3 since #267 is merged. Can this be rebased and merged?

@emmiegit
Copy link

emmiegit commented Apr 2, 2022

Exciting! Glad to see array work progress.

@ikrivosheev
Copy link
Member

@billy1624 Do you need help with this PR?

@emmiegit
Copy link

Is there anything blocking this PR from being merged?

@tyt2y3
Copy link
Member

tyt2y3 commented May 2, 2022

Apart from the merge conflict, I think we need to think of a less verbose approach at supporting this.
The problem is when we add a new type variant to Value, it seems like that a lot has to be changed, and we have no compile-time check / CI that can catch those.
Basically a maintainability problem.

@kudlatyamroth
Copy link

maybe it is better to implement this in that form, and in future refactor it?
i think that many ppl needs this functionality

@tyt2y3
Copy link
Member

tyt2y3 commented Jul 11, 2022

I think sea-query-binder offers a better starting point than sea-query-driver, we should probably build on top of that

@Sytten
Copy link
Contributor

Sytten commented Jul 14, 2022

Indeed I am in need of it so anything I can do to help let me know.

@billy1624
Copy link
Member Author

Hey @Sytten @tyt2y3, I think we could dump this PR and start working on this feature from master, i.e. based on sea-query-binder.

@billy1624
Copy link
Member Author

Would you like to take on this? @Sytten

@billy1624 billy1624 marked this pull request as draft July 15, 2022 03:40
@billy1624 billy1624 linked an issue Jul 15, 2022 that may be closed by this pull request
@Sytten
Copy link
Contributor

Sytten commented Jul 15, 2022

Yeah will do

@billy1624
Copy link
Member Author

Thanks! @Sytten
Do let me know if you need help :D

@billy1624 billy1624 closed this Jul 20, 2022
@ikrivosheev ikrivosheev deleted the bind-array-values branch November 30, 2022 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Query binders: Add support for postgres arrays
7 participants