Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

BOOLEAN type not working with prepared statement. #198

Open
sumitsum opened this issue Sep 15, 2021 · 3 comments
Open

BOOLEAN type not working with prepared statement. #198

sumitsum opened this issue Sep 15, 2021 · 3 comments

Comments

@sumitsum
Copy link

sumitsum commented Sep 15, 2021

A prepared statement of the following kind

select * from test_boolean_type where c_boolean=?

where ? is bound to string True. It returns incorrect result. It however works if integers 0 or 1 is supplied.

Tested with version 0.8.2

@sumitsum
Copy link
Author

Some mistake on my side. closing it.

@sumitsum
Copy link
Author

sumitsum commented Sep 16, 2021

Re-opening post updating the description.

@sumitsum sumitsum reopened this Sep 16, 2021
@mirromutth
Copy link
Owner

Hi there, apologies for the late reply.

A string value cannot be a bool type, this should be a user error.

Use boolean true/false instead of a string value.

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

No branches or pull requests

2 participants