@@ -19,16 +19,15 @@ public class ColumnInfo {
1919 private final boolean isNumber ;
2020 private final boolean isNull ;
2121
22- public ColumnInfo (String name , Type type ) {
22+ public ColumnInfo (String name , TypeDescription type ) {
2323 this .name = name ;
2424
25- TypeDescription desc = TypeDescription .of (type );
26- this .sqlType = desc .sqlType ();
27- this .getters = desc .getters ();
28- this .isOptional = desc .isOptional ();
29- this .ydbType = desc .ydbType ();
25+ this .sqlType = type .sqlType ();
26+ this .getters = type .getters ();
27+ this .isOptional = type .isOptional ();
28+ this .ydbType = type .ydbType ();
3029
31- this .isTimestamp = ydbType == PrimitiveType .Timestamp ;
30+ this .isTimestamp = ydbType == PrimitiveType .Timestamp || ydbType == PrimitiveType . Timestamp64 ;
3231 this .isNumber = ydbType == PrimitiveType .Int8 || ydbType == PrimitiveType .Uint8
3332 || ydbType == PrimitiveType .Int16 || ydbType == PrimitiveType .Uint16
3433 || ydbType == PrimitiveType .Int32 || ydbType == PrimitiveType .Uint32
@@ -68,10 +67,11 @@ public MappingGetters.Getters getGetters() {
6867 return this .getters ;
6968 }
7069
71- public static ColumnInfo [] fromResultSetReader (ResultSetReader rsr ) {
70+ public static ColumnInfo [] fromResultSetReader (YdbTypes types , ResultSetReader rsr ) {
7271 ColumnInfo [] columns = new ColumnInfo [rsr .getColumnCount ()];
7372 for (int idx = 0 ; idx < rsr .getColumnCount (); idx += 1 ) {
74- columns [idx ] = new ColumnInfo (rsr .getColumnName (idx ), rsr .getColumnType (idx ));
73+ TypeDescription type = types .find (rsr .getColumnType (idx ));
74+ columns [idx ] = new ColumnInfo (rsr .getColumnName (idx ), type );
7575 }
7676 return columns ;
7777 }
0 commit comments