data-api-client icon indicating copy to clipboard operation
data-api-client copied to clipboard

fix(pg): handle pg engine lowercase typeName

Open calvin-cdev opened this issue 3 years ago • 1 comments

aurora serverless with postgresql returns typeName as lowercase. because of this, the function formatRecordValue does not function properly for pg responses.

to fix, I cast the typeName to uppercase at the start of the function, storing it in a new const standardizedTypeName. added a test case to cover this issue.

calvin-cdev avatar Apr 07 '22 14:04 calvin-cdev

@jeremydaly any chance you'd be okay with me rebasing this onto main so we can get it in? i'm currently having to write custom logic to resolve generated date strings into date objects and i'd rather have the driver do it as expected.

calvin-cdev avatar Jul 01 '22 17:07 calvin-cdev