-
Notifications
You must be signed in to change notification settings - Fork 132
Binding an array type to an update query using database client execute #474
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
Naming parameter support unrolls The only thing that is supported is passing array values as bind values. I'm not sure about:
Do you mean |
Yes, that works, thanks a lot closing the issue ! |
Do you think we should add a note in the reference documentation to outline this distinction? |
I guess I got confused by
I assumed support for lists worked as well on other types of queries, but it makes sense that it takes in a native array 🤦♀️. |
Thanks a lot. That section went into Spring Framework so I'll file a ticket/submit a PR to improve the documentation and make it less confusing. |
Hi, Im trying to do the following
where tags is declared in the database as type
text[]
when I run I get the following
I think the following is because
substituteNamedParameters
inNamedParameterUtils
where there is a condition that checks
if (value instanceof Collection)
and this creates separate markers for each item in the list. The case mentioned in the docs mentions queries such asselect id, name, state from table where (name, age) in (('John', 35), ('Ann', 50))}
where you do want each item to be a different parameter but for my case I want it to be treated as one array type, is this supported at the moment?When I try to pass it as a string in the format of arrays
{new,here}
the error returned instead isERROR: column "tags" is of type text[] but expression is of type character varying at character 441
is there a workaround?
Thanks
The text was updated successfully, but these errors were encountered: