We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I have a column of type bigint[] But in response, it is converted to an array of string.
bigint[]
How do I parse it? This works when the column is of type bigint
import { types } from "pg" types.setTypeParser(20, BigInt);
Tried this but it gives an error.
import { Client, types } from "pg" types.setTypeParser(1016, str => types.arrayParser(str,BigInt));
The text was updated successfully, but these errors were encountered:
What error?
Sorry, something went wrong.
Must be that arrayParser(...) is no longer re-exported: 09ea625#diff-168726dbe96b3ce427e7fedce31bb0bcL3
arrayParser(...)
Try something like this to use it directly from the postgres-array package:
postgres-array
const { types } = require('pg') const pgArray = require('postgres-array') types.setTypeParser(1016, text => pgArray.parse(text, BigInt))
Good catch, thanks!
No branches or pull requests
Hi,
I have a column of type
bigint[]
But in response, it is converted to an array of string.
How do I parse it?
This works when the column is of type bigint
Tried this but it gives an error.
The text was updated successfully, but these errors were encountered: