import { Type } from './Type.js';
/** Maps a database DATE column (date without time) to a JS `string` in YYYY-MM-DD format. */
export class DateType extends Type {
  compareAsType() {
    return 'string';
  }
  ensureComparable() {
    return false;
  }
  convertToJSValue(value, platform) {
    return platform.convertDateToJSValue(value);
  }
  getColumnType(prop, platform) {
    return platform.getDateTypeDeclarationSQL(prop.length);
  }
  getDefaultLength(platform) {
    return 0;
  }
}
