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

npm error when using typecast #2471

Open
Thallius opened this issue Mar 5, 2024 · 2 comments
Open

npm error when using typecast #2471

Thallius opened this issue Mar 5, 2024 · 2 comments

Comments

@Thallius
Copy link

Thallius commented Mar 5, 2024

Hi,

using typecast

typeCast: function (field, next) { if (field.type === 'JSON') { let c = field.string("utf8"); <= this is causing the warning if (c && c.toLowerCase() !== "[null]") return (JSON.parse(c)); else return []; } return next(); }

brings up npm error

typeCast: JSON column "MyColumnName" is interpreted as BINARY by default, recommended to manually set utf8 encoding: field.string("utf8")

For every query which contains a JSON_ARRAYAGG command.

This is spamming the logs so I really need to get rid of it

sorry do not know how to format the code correct

@Thallius
Copy link
Author

So no one else has this problem and is interested in a solution?

@wellwelwel
Copy link
Collaborator

wellwelwel commented May 22, 2024

So no one else has this problem and is interested in a solution?

Hi @Thallius, please see the #2481 (comment) 🙋🏻‍♂️

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

2 participants