BoltNeo4jResultSetMetaData extends Neo4jResultSetMetaData { @Override public int getColumnType(int column) throws SQLException { Type type = this.columnType[column - 1]; if(INTERNAL_TYPE_TO_SQL_TYPES_MAP.containsKey(type)){ return INTERNAL_TYPE_TO_SQL_TYPES_MAP.get(type); } return Types.JAVA_OBJECT; } private  BoltNeo4jResultSetMetaData(List<Type> types, List<String> keys); static ResultSetMetaData newInstance(boolean debug, List<Type> types, List<String> keys); @Override int getColumnCount(); @Override String getColumnClassName(int column); @Override int getColumnType(int column); @Override String getColumnTypeName(int column);  }
@Test public void getColumnTypeTest() throws SQLException { List<Type> types = Arrays.asList( InternalTypeSystem.TYPE_SYSTEM.STRING(), InternalTypeSystem.TYPE_SYSTEM.INTEGER(), InternalTypeSystem.TYPE_SYSTEM.BOOLEAN(), InternalTypeSystem.TYPE_SYSTEM.FLOAT(), InternalTypeSystem.TYPE_SYSTEM.NODE(), InternalTypeSystem.TYPE_SYSTEM.RELATIONSHIP(), InternalTypeSystem.TYPE_SYSTEM.PATH(), InternalTypeSystem.TYPE_SYSTEM.MAP(), InternalTypeSystem.TYPE_SYSTEM.ANY(), InternalTypeSystem.TYPE_SYSTEM.LIST(), InternalTypeSystem.TYPE_SYSTEM.NUMBER(), InternalTypeSystem.TYPE_SYSTEM.NULL() ); List<String> cols = Arrays.asList( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" ); ResultSetMetaData rsm = BoltNeo4jResultSetMetaData.newInstance(false, types, cols); assertEquals(Types.VARCHAR, rsm.getColumnType(1)); assertEquals(Types.INTEGER, rsm.getColumnType(2)); assertEquals(Types.BOOLEAN, rsm.getColumnType(3)); assertEquals(Types.FLOAT, rsm.getColumnType(4)); assertEquals(Types.JAVA_OBJECT, rsm.getColumnType(5)); assertEquals(Types.JAVA_OBJECT, rsm.getColumnType(6)); assertEquals(Types.JAVA_OBJECT, rsm.getColumnType(7)); assertEquals(Types.JAVA_OBJECT, rsm.getColumnType(8)); assertEquals(Types.JAVA_OBJECT, rsm.getColumnType(9)); assertEquals(Types.ARRAY, rsm.getColumnType(10)); assertEquals(Types.FLOAT, rsm.getColumnType(11)); assertEquals(Types.NULL, rsm.getColumnType(12)); }