@@ -11,31 +11,31 @@ func postgresType(req *plugin.GenerateRequest, col *plugin.Column) (string, bool
11
11
columnType := sdk .DataType (col .Type )
12
12
13
13
switch columnType {
14
- case "serial" , "pg_catalog.serial4" :
14
+ case "serial" , "serial4" , " pg_catalog.serial4" :
15
15
return "Int" , false
16
16
17
- case "bigserial" , "pg_catalog.serial8" :
17
+ case "bigserial" , "serial8" , " pg_catalog.serial8" :
18
18
return "Long" , false
19
19
20
- case "smallserial" , "pg_catalog.serial2" :
20
+ case "smallserial" , "serial2" , " pg_catalog.serial2" :
21
21
return "Short" , false
22
22
23
23
case "integer" , "int" , "int4" , "pg_catalog.int4" :
24
24
return "Int" , false
25
25
26
- case "bigint" , "pg_catalog.int8" :
26
+ case "bigint" , "int8" , " pg_catalog.int8" :
27
27
return "Long" , false
28
28
29
- case "smallint" , "pg_catalog.int2" :
29
+ case "smallint" , "int2" , " pg_catalog.int2" :
30
30
return "Short" , false
31
31
32
- case "float" , "double precision" , "pg_catalog.float8" :
32
+ case "float" , "double precision" , "float8" , " pg_catalog.float8" :
33
33
return "Double" , false
34
34
35
- case "real" , "pg_catalog.float4" :
35
+ case "real" , "float4" , " pg_catalog.float4" :
36
36
return "Float" , false
37
37
38
- case "pg_catalog.numeric" :
38
+ case "numeric" , " pg_catalog.numeric" :
39
39
return "java.math.BigDecimal" , false
40
40
41
41
case "bool" , "pg_catalog.bool" :
@@ -52,13 +52,13 @@ func postgresType(req *plugin.GenerateRequest, col *plugin.Column) (string, bool
52
52
// Date and time mappings from https://jdbc.postgresql.org/documentation/head/java8-date-time.html
53
53
return "LocalDate" , false
54
54
55
- case "pg_catalog.time" , "pg_catalog.timetz" :
55
+ case "time" , " pg_catalog.time" , "timetz " , "pg_catalog.timetz" :
56
56
return "LocalTime" , false
57
57
58
- case "pg_catalog.timestamp" :
58
+ case "timestamp" , " pg_catalog.timestamp" :
59
59
return "LocalDateTime" , false
60
60
61
- case "pg_catalog. timestamptz" , "timestamptz" :
61
+ case "timestamptz" , "pg_catalog. timestamptz" :
62
62
// TODO
63
63
return "OffsetDateTime" , false
64
64
0 commit comments