-
Notifications
You must be signed in to change notification settings - Fork 121
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
[manifold-sql] Code doesn't compile when using :: to cast a parameter or call function on parameter. #589
Comments
Hi @oldshensheep. Manifold uses named parameters prefixed with DB.addSqlChange(ctx -> {
"[.sql/] insert into table_name(data) values(to_hex(:data)) ".execute(ctx,"string");
});
DB.addSqlChange(ctx -> {
"[.sql/] insert into table_name(data) values(:data::jsonb) ".execute(ctx,"string");
}); See the Query docs for this. |
I just tried, still the same error. |
Or if I remove the
Is this an expected error? JDBC standard can't map jsonb so it fallback to string. |
Ah, yes there appears to be an issue with the json/jsonb postgresql data type. Will have a deeper look. Thanks. |
- support postgresql json & jsonb types - fix parameter parser to account for postgresql '::' cast operator
Fix available with release 2024.1.15. Thanks for reporting this! |
using |
If your app defines more than one dbconfig, you probably need to qualify your sql command. Instead of |
Ah, I see the manifold plugin error |
Describe the bug
Code doesn't compile when using
::
to cast a parameter.To Reproduce
Steps to reproduce the behavior:
table_name(data)
is jsonb in postgresqlExpected behavior
The code should work like the example below.
Screenshots
If applicable, add screenshots to help explain your problem (drag/drop them here).
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Stack trace
Please include a stack trace if applicable
The text was updated successfully, but these errors were encountered: