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 decimal types in prepared statements #154

Closed
aris-koning opened this issue Oct 5, 2021 · 0 comments · Fixed by #155
Closed

Support decimal types in prepared statements #154

aris-koning opened this issue Oct 5, 2021 · 0 comments · Fixed by #155
Labels
enhancement New feature or request
Milestone

Comments

@aris-koning
Copy link
Contributor

With the new extended C signature for monetdbe_prepare it is now possible determine the underlying implementation type of a value and bind it to a numerical type.

For example

CREATE TABLE test (x DECIMAL(15,5));
PREPARE SELECT x FROM test WHERE x > ?;

Say that we would like to bind the decimal value 10000.55555. Recently monetdbe_prepare can return a table with type info for each input and output parameter of the prepared statement. In this case it returns amongst others the scale 5 and implementation type short from which we can determine the short value to be bound which is 1000055555.

The Connection object API should be extended such that it can sensibly handle this new type info in order to correctly bind decimal values.

@gijzelaerr gijzelaerr added the enhancement New feature or request label Oct 13, 2021
@gijzelaerr gijzelaerr added this to the 0.11 milestone Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants