Skip to content

Commit e43f3ed

Browse files
authored
Define GraalVM types for JOOQ as Strings (#197)
Fixes #151
1 parent 71504c9 commit e43f3ed

File tree

1 file changed

+39
-47
lines changed

1 file changed

+39
-47
lines changed

jooq/src/main/java/io/micronaut/configuration/jooq/graal/DefaultDataTypeReflection.java

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,46 @@
1717

1818
import io.micronaut.core.annotation.TypeHint;
1919
import io.micronaut.core.annotation.TypeHint.AccessType;
20-
import org.jooq.*;
21-
import org.jooq.types.*;
22-
import org.jooq.Record;
2320

24-
import java.math.BigDecimal;
25-
import java.math.BigInteger;
26-
import java.sql.Date;
27-
import java.sql.Time;
28-
import java.sql.Timestamp;
29-
import java.time.*;
30-
import java.util.UUID;
31-
32-
@TypeHint(accessType = AccessType.ALL_PUBLIC_CONSTRUCTORS, value = {
33-
LocalDate[].class,
34-
LocalDateTime[].class,
35-
LocalTime[].class,
36-
ZonedDateTime[].class,
37-
OffsetDateTime[].class,
38-
OffsetTime[].class,
39-
Instant[].class,
40-
Timestamp[].class,
41-
Date[].class,
42-
Time[].class,
43-
BigInteger[].class,
44-
BigDecimal[].class,
45-
UNumber[].class,
46-
UByte[].class,
47-
UInteger[].class,
48-
ULong[].class,
49-
Unsigned[].class,
50-
UShort[].class,
51-
Byte[].class,
52-
Integer[].class,
53-
Long[].class,
54-
Float[].class,
55-
Double[].class,
56-
String[].class,
57-
YearToMonth[].class,
58-
YearToSecond[].class,
59-
DayToSecond[].class,
60-
RowId[].class,
61-
Result[].class,
62-
Record[].class,
63-
JSON[].class,
64-
JSONB[].class,
65-
UUID[].class,
66-
byte[].class
67-
})
21+
@TypeHint(
22+
typeNames = {
23+
"java.time.LocalDate[]",
24+
"java.time.LocalDateTime[]",
25+
"java.time.LocalTime[]",
26+
"java.time.ZonedDateTime[]",
27+
"java.time.OffsetDateTime[]",
28+
"java.time.OffsetTime[]",
29+
"java.time.Instant[]",
30+
"java.sql.Timestamp[]",
31+
"java.sql.Date[]",
32+
"java.sql.Time[]",
33+
"java.math.BigInteger[]",
34+
"java.math.BigDecimal[]",
35+
"org.jooq.types.UNumber[]",
36+
"org.jooq.types.UByte[]",
37+
"org.jooq.types.UInteger[]",
38+
"org.jooq.types.ULong[]",
39+
"org.jooq.types.Unsigned[]",
40+
"org.jooq.types.UShort[]",
41+
"java.lang.Byte[]",
42+
"java.lang.Integer[]",
43+
"java.lang.Long[]",
44+
"java.lang.Float[]",
45+
"java.lang.Double[]",
46+
"java.lang.String[]",
47+
"org.jooq.types.YearToMonth[]",
48+
"org.jooq.types.YearToSecond[]",
49+
"org.jooq.types.DayToSecond[]",
50+
"org.jooq.RowId[]",
51+
"org.jooq.Result[]",
52+
"org.jooq.Record[]",
53+
"org.jooq.JSON[]",
54+
"org.jooq.JSONB[]",
55+
"java.util.UUID[]",
56+
"byte[]",
57+
},
58+
accessType = AccessType.ALL_PUBLIC_CONSTRUCTORS
59+
)
6860
final class DefaultDataTypeReflection {
6961

7062
}

0 commit comments

Comments
 (0)