@@ -4,7 +4,7 @@ import type BinaryWriter from './binary_writer';
44import { ConnectionId , type ConnectionIdAlgebraicType } from './connection_id' ;
55import { Identity , type IdentityAlgebraicType } from './identity' ;
66import { Option , type OptionAlgebraicType } from './option' ;
7- import ScheduleAt from './schedule_at' ;
7+ import ScheduleAt , { type ScheduleAtAlgebraicType } from './schedule_at' ;
88import type { CoerceRow } from './table' ;
99import { TimeDuration , type TimeDurationAlgebraicType } from './time_duration' ;
1010import { Timestamp , type TimestampAlgebraicType } from './timestamp' ;
@@ -1487,6 +1487,26 @@ export const SimpleSumBuilder: {
14871487export type SimpleSumBuilder < Variants extends SimpleVariantsObj > =
14881488 SimpleSumBuilderImpl < Variants > & SumBuilderVariantConstructors < Variants > ;
14891489
1490+ export class ScheduleAtBuilder
1491+ extends TypeBuilder < ScheduleAt , ScheduleAtAlgebraicType >
1492+ implements
1493+ Defaultable < ScheduleAt , ScheduleAtAlgebraicType >
1494+ {
1495+ constructor ( ) {
1496+ super ( ScheduleAt . getAlgebraicType ( ) ) ;
1497+ }
1498+ default (
1499+ value : ScheduleAt
1500+ ) : ScheduleAtColumnBuilder <
1501+ SetField < DefaultMetadata , 'defaultValue' , ScheduleAt >
1502+ > {
1503+ return new ScheduleAtColumnBuilder (
1504+ this ,
1505+ set ( defaultMetadata , { defaultValue : value } )
1506+ ) ;
1507+ }
1508+ }
1509+
14901510export class IdentityBuilder
14911511 extends TypeBuilder < Identity , IdentityAlgebraicType >
14921512 implements
@@ -1748,7 +1768,6 @@ export type ColumnMetadata<Type = any> = {
17481768 isPrimaryKey ?: true ;
17491769 isUnique ?: true ;
17501770 isAutoIncrement ?: true ;
1751- isScheduleAt ?: true ;
17521771 indexType ?: IndexTypes ;
17531772 defaultValue ?: Type ;
17541773} ;
@@ -2727,6 +2746,23 @@ export class SimpleSumColumnBuilder<
27272746 }
27282747}
27292748
2749+ export class ScheduleAtColumnBuilder <
2750+ M extends ColumnMetadata < ScheduleAt > = DefaultMetadata ,
2751+ >
2752+ extends ColumnBuilder < ScheduleAt , ScheduleAtAlgebraicType , M >
2753+ implements
2754+ Defaultable < ScheduleAt , ScheduleAtAlgebraicType >
2755+ {
2756+ default (
2757+ value : ScheduleAt
2758+ ) : ScheduleAtColumnBuilder < SetField < M , 'defaultValue' , ScheduleAt > > {
2759+ return new ScheduleAtColumnBuilder (
2760+ this . typeBuilder ,
2761+ set ( this . columnMetadata , { defaultValue : value } )
2762+ ) ;
2763+ }
2764+ }
2765+
27302766export class IdentityColumnBuilder <
27312767 M extends ColumnMetadata < Identity > = DefaultMetadata ,
27322768 >
@@ -3241,15 +3277,8 @@ export const t = {
32413277 * This is a special helper function for conveniently creating {@link ScheduleAt} type columns.
32423278 * @returns A new ColumnBuilder instance with the {@link ScheduleAt} type.
32433279 */
3244- scheduleAt : ( ) : ColumnBuilder <
3245- ScheduleAt ,
3246- ReturnType < typeof ScheduleAt . getAlgebraicType > ,
3247- Omit < ColumnMetadata < ScheduleAt > , 'isScheduleAt' > & { isScheduleAt : true }
3248- > => {
3249- return new ColumnBuilder (
3250- new TypeBuilder ( ScheduleAt . getAlgebraicType ( ) ) ,
3251- set ( defaultMetadata , { isScheduleAt : true } )
3252- ) ;
3280+ scheduleAt : ( ) : ScheduleAtBuilder => {
3281+ return new ScheduleAtBuilder ( ) ;
32533282 } ,
32543283
32553284 /**
0 commit comments