File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
fdb-relational-api/src/main/java/com/apple/foundationdb/relational/api/metadata
fdb-relational-jdbc/src/main/java/com/apple/foundationdb/relational/jdbc Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ public abstract class DataType {
71
71
typeCodeJdbcTypeMap .put (Code .ENUM , Types .OTHER );
72
72
typeCodeJdbcTypeMap .put (Code .UUID , Types .OTHER );
73
73
typeCodeJdbcTypeMap .put (Code .BYTES , Types .BINARY );
74
+ typeCodeJdbcTypeMap .put (Code .VERSION , Types .BINARY );
74
75
typeCodeJdbcTypeMap .put (Code .STRUCT , Types .STRUCT );
75
76
typeCodeJdbcTypeMap .put (Code .ARRAY , Types .ARRAY );
76
77
typeCodeJdbcTypeMap .put (Code .NULL , Types .NULL );
@@ -199,7 +200,7 @@ public static DataType getDataTypeFromObject(@Nullable Object obj) {
199
200
} else if (obj instanceof String ) {
200
201
return Primitives .STRING .type ();
201
202
} else if (obj instanceof UUID ) {
202
- return Primitives .LONG .type ();
203
+ return Primitives .UUID .type ();
203
204
} else if (obj instanceof RelationalStruct ) {
204
205
return ((RelationalStruct ) obj ).getMetaData ().getRelationalDataType ();
205
206
} else if (obj instanceof RelationalArray ) {
Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ public static Parameter ofArray(final Array a) throws SQLException {
136
136
}
137
137
138
138
public static Parameter ofObject (Object x ) throws SQLException {
139
+ if (x instanceof JDBCArrayImpl ) {
140
+ return ofArray ((Array ) x );
141
+ }
139
142
final int typeCodeFromObject = DataType .getDataTypeFromObject (x ).getJdbcSqlCode ();
140
143
switch (typeCodeFromObject ) {
141
144
case Types .BIGINT :
You can’t perform that action at this time.
0 commit comments