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

Support resultSetOptions in ExecuteStatementRequest #124

Closed
ormu5 opened this issue Apr 16, 2021 · 1 comment
Closed

Support resultSetOptions in ExecuteStatementRequest #124

ormu5 opened this issue Apr 16, 2021 · 1 comment
Labels

Comments

@ormu5
Copy link

ormu5 commented Apr 16, 2021

In previous versions of local-data-api, I utilized resultSetOptions when issuing queries to Data API via execute_statement().

It appears it is not supported in the current version, which yields an error message like:

local-data-api_1  | 2021-04-16 16:33:13.754 [eventLoopGroupProxy-4-1] ERROR Application - Unhandled: POST - /Execute
local-data-api_1  | kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 482: Encountered an unknown key 'resultSetOptions'.
local-data-api_1  | Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
local-data-api_1  | JSON input: .....:dummy", "resultSetOptions": {"decimalReturnType": "STRING"}.....
local-data-api_1  | 	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)

I'm not sure if this was deliberate or not, but it appears the option is still supported by AWS (we are in fact passing it to Data API in our deployed application):

https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ResultSetOptions.html

For now I think I'm going to withhold the parameter entirely since I happened to be specifying the default, anyway, and that'll allow us to upgrade to 0.6.8. :]

This is a great tool, by the way. It was one piece of our development test bed that allowed us to rapidly iterate a new application into production. Thank you!

@koxudaxi
Copy link
Owner

@jeffster23
Thank you for creating this issue.
I have changed the behavior to ignore unknown parameters.
It means backward compatibility.

The version has been released as 0.6.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants