import { Type } from './Type.js';
/** Maps a database INTERVAL column (PostgreSQL) to a JS `string`. */
export class IntervalType extends Type {
  getColumnType(prop, platform) {
    return platform.getIntervalTypeDeclarationSQL(prop);
  }
  convertToJSValue(value, platform) {
    return platform.convertIntervalToJSValue(value);
  }
  convertToDatabaseValue(value, platform) {
    return platform.convertIntervalToDatabaseValue(value);
  }
  getDefaultLength(platform) {
    return platform.getDefaultDateTimeLength();
  }
}
