-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Unable to bind Vec<Uuid> in postgres #1035
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
Comments
This seems to not be possible at the moment see #656, a workaround suggested in that topic is to use |
"not working" is not a useful description of an error. What's the actual error message you get? |
Sorry, I did not post the error msg because i though it was weird, but then i ran the query by manually addind variable and it working fine. Anyway this is the error msg from database:
|
The SQL code you shared never uses the column name |
I apologize, i just now found the issue. I was mapping to wrong struct and the issue was with the same key so i assumed it was because of the vector. |
@jplatte Just a followup question will be I be able to use custom vectors with |
Something like this: let suspended_status = vec![
LeadStatus::Suspended,
LeadStatus::Awaitingissuance,
LeadStatus::Paidsuspended,
];
.....
.bind(suspended_status)
.fetch_all(pool)
.await?; sqlx::Type has been added to |
Unfortunately that doesn't work, see #298. |
First i tried binding this way, assuming sqlx will spread it on it's own, but it did not work
The I read on discord to try
ANY
But even this is not working!
I just want to know that the 2nd option requires spread as postgres array, Is something like this happening?
How should i proceed here? Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: