@@ -107,6 +107,9 @@ func jdbcSet(t ktType, idx int, name string) string {
107107 if t .IsInstant () {
108108 return fmt .Sprintf ("stmt.setTimestamp(%d, Timestamp.from(%s))" , idx , name )
109109 }
110+ if t .IsUUID () {
111+ return fmt .Sprintf ("stmt.setObject(%d, %s)" , idx , name )
112+ }
110113 return fmt .Sprintf ("stmt.set%s(%d, %s)" , t .Name , idx , name )
111114}
112115
@@ -159,6 +162,13 @@ func jdbcGet(t ktType, idx int) string {
159162 if t .IsInstant () {
160163 return fmt .Sprintf (`results.getTimestamp(%d).toInstant()` , idx )
161164 }
165+ if t .IsUUID () {
166+ var nullCast string
167+ if t .IsNull {
168+ nullCast = "?"
169+ }
170+ return fmt .Sprintf (`results.getObject(%d) as%s %s` , idx , nullCast , t .Name )
171+ }
162172 return fmt .Sprintf (`results.get%s(%d)` , t .Name , idx )
163173}
164174
@@ -350,6 +360,10 @@ func (t ktType) IsInstant() bool {
350360 return t .Name == "Instant"
351361}
352362
363+ func (t ktType ) IsUUID () bool {
364+ return t .Name == "UUID"
365+ }
366+
353367func makeType (r * compiler.Result , col * compiler.Column , settings config.CombinedSettings ) ktType {
354368 typ , isEnum := ktInnerType (r , col , settings )
355369 return ktType {
0 commit comments