data-api-client
data-api-client copied to clipboard
fix(pg): handle pg engine lowercase typeName
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.
@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.