pg-promise returns integers as strings

There is a lot below that’s been accumulating historically. But if you are using Node.js v10.4.0 or later, you can skip all this, and jump into section UPDATE-2 at the bottom. This is indeed the standard behavior. bigint is 64-bit, and all 64-bit integers are returned by the underlying node-postgres driver as type string, while … Read more

How do I setup Babel 6 with Node JS to use ES6 in my Server Side code?

1.a What Preset is needed? You will need to install Babel firstly with npm install babel-core –save-dev in the root directory of your project using a Terminal window like Command Prompt. Once installed, you will need to install the es2015 preset with npm install babel-preset-es2015 –save-dev. Babel-Core is Promises/A+ Compliant but not ideal for usage … Read more

Multi-row insert with pg-promise

I’m the author of pg-promise. In older versions of the library this was covered by simplified examples within the Performance Boost article, which is still a good read when writing high-performance database applications. The newer approach is to rely on the helpers namespace, which is ultimately flexible, and optimised for performance. const pgp = require(‘pg-promise’)({ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)