Uh oh!
There was an error while loading. Please reload this page.
PR for Issue #9 - #20
Conversation
rpedela
commented
Aug 16, 2020
Thank for the PR! I love the use of What do you think of making the following PR changes?
if(typeofvalue==='bigint'){returnBigInt(value)}
|
Add Cases / Update Unit Test
cphillips
commented
Aug 16, 2020
Great feedback, updates made. |
rpedela
commented
Aug 23, 2020
Thanks for the changes. I have a couple more requests if you don't mind, and then I will be happy to merge. Great job!
|
Happy to make any changes and thanks.
Unless I misunderstood the issue, the idea was to not escape literal numbers and bigint. I will agree that doing it in quoteLiteral is an oxymoron, but I'll need to place the logic somewhere. Maybe in the replace loop here? -> https://github.com/cphillips/node-pg-format/blob/master/lib/index.js#L217
I added a test here -> https://github.com/cphillips/node-pg-format/blob/master/test/index.js#L9, but maybe I'm not understanding where I should add the test. |
rpedela
commented
Aug 23, 2020
The reason to return a string is that There is a |
Quote Literal To String
cphillips
commented
Aug 24, 2020
Completed. |
mattcan
commented
Oct 21, 2020
Thanks for fixing this bug folks, would love to see this get published! |
selmanozturk
commented
Jan 4, 2021
Thanks @cphillips. We are still suffering from this issue @rpedela. Do you planning to merge it? |
Testing are passing, however tests were changed
I also think
if (typeof (value) == 'number') {
return Number(value);
is a better choice to sanitize the value