-
Notifications
You must be signed in to change notification settings - Fork 48
PR for Issue #9 #20
base: master
Are you sure you want to change the base?
PR for Issue #9 #20
Conversation
|
Thank for the PR! I love the use of What do you think of making the following PR changes?
if (typeof value === 'bigint') {
return BigInt(value)
}
|
Add Cases / Update Unit Test
|
Great feedback, updates made. |
|
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. |
|
The reason to return a string is that There is a |
Quote Literal To String
|
Completed. |
|
Thanks for fixing this bug folks, would love to see this get published! |
|
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