Skip to content

Commit

Permalink
s/required/optional/ as some checks were being done, with TODOs to do…
Browse files Browse the repository at this point in the history
… this properly
  • Loading branch information
beverloo committed Jan 4, 2024
1 parent e81b021 commit c357265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/lib/database/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export class DBConnection extends MariaDBConnection<'DBConnection'> {
value: ComparableValueSource<TABLE_OR_VIEW, DateTime, DateTime, ISO>)
: StringValueSource<TABLE_OR_VIEW, ISO>
{
return this.fragmentWithType('string', 'required')
// TODO: s/optional/ISO/
return this.fragmentWithType('string', 'optional')
.sql`date_format(${value}, '%Y-%m-%')` as StringValueSource<TABLE_OR_VIEW, ISO>;
}

Expand All @@ -75,7 +76,8 @@ export class DBConnection extends MariaDBConnection<'DBConnection'> {
value: ComparableValueSource<TABLE_OR_VIEW, DateTime, DateTime, ISO>)
: StringValueSource<TABLE_OR_VIEW, ISO>
{
return this.fragmentWithType('string', 'required')
// TODO: s/optional/ISO/
return this.fragmentWithType('string', 'optional')
.sql`date_format(${value}, '%Y-%m-%dT%TZ')` as StringValueSource<TABLE_OR_VIEW, ISO>;
}

Expand Down

0 comments on commit c357265

Please sign in to comment.