Array parameters encoding fails
See original GitHub issueVersion: 0.10.1
This query fails:
pool.preparedQuery("select $1", Tuple.of(new Integer[] { 1, 2, 3, 4 }), System.out::println);
with this exception:
java.lang.ClassCastException: java.base/[Ljava.lang.Integer; cannot be cast to java.base/java.lang.String
Reading the message formats (https://www.postgresql.org/docs/10/static/protocol-message-formats.html), I see we can send the parameters data types.
And this project seems to have handle that in the past, because now it’s commented out: https://github.com/reactiverse/reactive-pg-client/blob/master/src/main/java/io/reactiverse/pgclient/impl/codec/encoder/MessageEncoder.java#L225
Maybe it’s not the source of the issue? But it seems related.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Error Encoding Arguments with Array of Objects
transact to merkle.mint errored: Error encoding arguments: Error: cannot encode object for signature with missing names (argument="values", ...
Read more >Error encoding array of Encodable · Issue #285 - GitHub
In a simplistic example, if you pass an Encodable object to setBody , then it encodes into JSON and returns the payload as...
Read more >JavaScript - Url encoding of Array type parameters
I can't figure out how to URL encode array params in an elegant way, in order to send XHR requests from my Vue.js...
Read more >sklearn.preprocessing.OrdinalEncoder
Encode categorical features as an integer array. ... When the parameter handle_unknown is set to 'use_encoded_value', this parameter is required and will ...
Read more >encodeURI() - JavaScript - MDN Web Docs
The encodeURI() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
great, I’m releasing a 0.10.2 today with this fix
thanks @atvictor I will investigate on this case