packages/core/src/types/DateTimeType.ts
import { Type } from './Type';
import type { Platform } from '../platforms';
import type { EntityProperty } from '../typings';
export class DateTimeType extends Type<Date, string> {
override getColumnType(prop: EntityProperty, platform: Platform): string {
return platform.getDateTimeTypeDeclarationSQL({ length: prop.length });
}
override compareAsType(): string {
return 'Date';
}
override get runtimeType(): string {
return 'Date';
}
override ensureComparable(): boolean {
return false;
}
}