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

Parse bits to booleans #1422

Closed
igabesz opened this issue Aug 21, 2017 · 2 comments
Closed

Parse bits to booleans #1422

igabesz opened this issue Aug 21, 2017 · 2 comments

Comments

@igabesz
Copy link

igabesz commented Aug 21, 2017

Querying bit type returns "0" instead of false or 0. I don't see any reasons to have string results instead of booleans. I have read these but I don't think these problems are present here:
#339
#378

Can this be fixed?

@abenhamdine
Copy link
Contributor

I think your issue would be more relevant in https://github.com/brianc/node-pg-types

@charmander
Copy link
Collaborator

bit is equivalent to bit(1), and all bit(n)s are strings. If you want a boolean, use a boolean (including the cast 1::bit::boolean).

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

No branches or pull requests

3 participants