Jam
Any plan to complete the Postgres dialect?
I mean adding some keywords that exist only in the SQL of Postgres. Not all of them of course, but I'm just wondering if that's part of the project scope.
As well, if you would take open source contributions that implement them.
5 replies
Convert date to timestamptz
Column sys_period is defined that way (it's a tstzrange, I want to use the @> to check if it contains the date):
export const sysPeriodSettings: ColumnOptions & PrimaryColumnOptions = {
name: 'sys_period',
type: 'tstzrange',
nullable: false,
default: () => 'tstzrange(now(), null)',
};
// In entity:
@PrimaryColumn(sysPeriodSettings)
sysPeriod: string; // A string because TypeORM does not support timestamp ranges
How mapping is done is a good question as at the moment it's magically handled by TypeORM.7 replies