-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
count field filled with string at runtime, even though type is number #117
Comments
In PG SQL queries count is returned as
|
That makes sense, thank you! Would it make sense to do something like this? brianc/node-pg-types#78 |
Also, is it a bug that the type is number if it ends up being string at runtime? |
Yes it makes sense, but currently we do not offer a way to override pgTyped's default type maps if you decide to use custom type parsers with
Yes, please open an issue if that happened. Might be a mapping mistake somewhere in our type map config. |
Ah, that was the original reason for this issue. I was checking whether |
Ok, If I understood you correctly, casting |
I've got a query defined like this:
/* @name CountByName */ SELECT COUNT(*) FROM users WHERE username = :username;
But at runtime it's returning
[{count:"0"}]
.What might I be doing wrong?
The text was updated successfully, but these errors were encountered: