1
1
import type { ColumnBaseConfig , ColumnHKTBase } from '~/column' ;
2
- import type {
3
- ColumnBuilderBaseConfig ,
4
- ColumnBuilderHKTBase ,
5
- MakeColumnConfig ,
6
- } from '~/column-builder' ;
2
+ import type { ColumnBuilderBaseConfig , ColumnBuilderHKTBase , MakeColumnConfig } from '~/column-builder' ;
7
3
import type { AnyPgTable } from '~/pg-core/table' ;
8
4
import type { Assume } from '~/utils' ;
9
-
10
5
import { PgColumn } from './common' ;
11
-
12
6
import { PgDateColumnBaseBuilder } from './date.common' ;
13
7
14
8
export interface PgTimestampBuilderHKT extends ColumnBuilderHKTBase {
@@ -33,7 +27,11 @@ export class PgTimestampBuilder<T extends ColumnBuilderBaseConfig> extends PgDat
33
27
T ,
34
28
{ withTimezone : boolean ; precision : number | undefined }
35
29
> {
36
- constructor ( name : string , withTimezone : boolean , precision : number | undefined ) {
30
+ constructor (
31
+ name : string ,
32
+ withTimezone : boolean ,
33
+ precision : number | undefined ,
34
+ ) {
37
35
super ( name ) ;
38
36
this . config . withTimezone = withTimezone ;
39
37
this . config . precision = precision ;
@@ -51,10 +49,7 @@ export class PgTimestamp<T extends ColumnBaseConfig> extends PgColumn<PgTimestam
51
49
readonly withTimezone : boolean ;
52
50
readonly precision : number | undefined ;
53
51
54
- constructor (
55
- table : AnyPgTable < { name : T [ 'tableName' ] } > ,
56
- config : PgTimestampBuilder < T > [ 'config' ] ,
57
- ) {
52
+ constructor ( table : AnyPgTable < { name : T [ 'tableName' ] } > , config : PgTimestampBuilder < T > [ 'config' ] ) {
58
53
super ( table , config ) ;
59
54
this . withTimezone = config . withTimezone ;
60
55
this . precision = config . precision ;
@@ -91,14 +86,16 @@ export type PgTimestampStringBuilderInitial<TName extends string> = PgTimestampS
91
86
hasDefault : false ;
92
87
} > ;
93
88
94
- export class PgTimestampStringBuilder <
95
- T extends ColumnBuilderBaseConfig ,
96
- > extends PgDateColumnBaseBuilder <
89
+ export class PgTimestampStringBuilder < T extends ColumnBuilderBaseConfig > extends PgDateColumnBaseBuilder <
97
90
PgTimestampStringBuilderHKT ,
98
91
T ,
99
92
{ withTimezone : boolean ; precision : number | undefined }
100
93
> {
101
- constructor ( name : string , withTimezone : boolean , precision : number | undefined ) {
94
+ constructor (
95
+ name : string ,
96
+ withTimezone : boolean ,
97
+ precision : number | undefined ,
98
+ ) {
102
99
super ( name ) ;
103
100
this . config . withTimezone = withTimezone ;
104
101
this . config . precision = precision ;
@@ -112,17 +109,11 @@ export class PgTimestampStringBuilder<
112
109
}
113
110
}
114
111
115
- export class PgTimestampString < T extends ColumnBaseConfig > extends PgColumn <
116
- PgTimestampStringHKT ,
117
- T
118
- > {
112
+ export class PgTimestampString < T extends ColumnBaseConfig > extends PgColumn < PgTimestampStringHKT , T > {
119
113
readonly withTimezone : boolean ;
120
114
readonly precision : number | undefined ;
121
115
122
- constructor (
123
- table : AnyPgTable < { name : T [ 'tableName' ] } > ,
124
- config : PgTimestampStringBuilder < T > [ 'config' ] ,
125
- ) {
116
+ constructor ( table : AnyPgTable < { name : T [ 'tableName' ] } > , config : PgTimestampStringBuilder < T > [ 'config' ] ) {
126
117
super ( table , config ) ;
127
118
this . withTimezone = config . withTimezone ;
128
119
this . precision = config . precision ;
0 commit comments