Closed Thallius closed 1 year ago
Hi,
it might be my fault but I am unable to use pg-types with javascript modules.
I tried
import * as pgTypes from 'pg-types'; pgTypes.setTypeParser(1114, function(stringValue) { console.log("Type Parser"); return new Date(stringValue + "+0000"); });
import * as pgTypes from 'pg-types';
pgTypes.setTypeParser(1114, function(stringValue)
{
console.log("Type Parser");
return new Date(stringValue + "+0000");
});
but the function is never called.
As I said my fault:
The correct way is:
import types from 'pg'; types.types.setTypeParser(1082, function(stringValue) { console.log("Type Parser"); return new Date(stringValue + "+0000"); });
import types from 'pg';
types.types.setTypeParser(1082, function(stringValue)
Hi,
it might be my fault but I am unable to use pg-types with javascript modules.
I tried
import * as pgTypes from 'pg-types';
pgTypes.setTypeParser(1114, function(stringValue)
{
console.log("Type Parser");
return new Date(stringValue + "+0000");
});
but the function is never called.