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
For context, I want to throw an error when an attempt is made to serialize BigInt to a JSON.
gajus/slonik#515
The reason being that handling values in such a way may produce unexpected results:
test.only('serializes BigInt to JSON', async (t) => { const pool = await createPool(t.context.dsn, { PgPool, }); const result = await pool.oneFirst(sql.unsafe` SELECT json_object_agg('foo', ${BigInt( 1_000_000_000_000_000_001n, )}::bigint) `); t.deepEqual(result, { foo: 1_000_000_000_000_000_000, }); await pool.end(); });
I would therefore rather require that the end user cast the value to ::text or whatever else.
::text
I am trying to figure out which part of the node-postgres API I could use to tap into this happening?
node-postgres
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For context, I want to throw an error when an attempt is made to serialize BigInt to a JSON.
gajus/slonik#515
The reason being that handling values in such a way may produce unexpected results:
I would therefore rather require that the end user cast the value to
::text
or whatever else.I am trying to figure out which part of the
node-postgres
API I could use to tap into this happening?The text was updated successfully, but these errors were encountered: