columns[i] = JdbcCompatibility.detectColumnType(vars.get(i), b.get(Var.alloc(vars.get(i))), true); LOGGER.info("High compatibility, column " + vars.get(i) + " was detected as being of type " + columns[i].getClassName());
columns[i] = JdbcCompatibility.detectColumnType(vars.get(i), b.get(Var.alloc(vars.get(i))), true); LOGGER.info("High compatibility, column " + vars.get(i) + " was detected as being of type " + columns[i].getClassName());
columns[i] = JdbcCompatibility.detectColumnType(names[i], values[i], false); LOGGER.info("High compatibility, column " + names[i] + " was detected as being of type " + columns[i].getClassName());
columns[i] = JdbcCompatibility.detectColumnType(names[i], values[i], false); LOGGER.info("High compatibility, column " + names[i] + " was detected as being of type " + columns[i].getClassName());
/** * Detects a columns types and checks basic information from the detected type, returns the detected column information so tests can make further assertions on this * @param var Variable Name i.e. Column Label * @param value Example value to detect from * @param allowNulls Whether the column allows nulls * @param jdbcType Expected detected JDBC type * @param className Expected detected class name * @return Column Information * @throws SQLException */ private ColumnInfo testColumnTypeDetection(String var, Node value, boolean allowNulls, int jdbcType, String className) throws SQLException { ColumnInfo info = JdbcCompatibility.detectColumnType(var, value, allowNulls); Assert.assertEquals(var, info.getLabel()); if (allowNulls) { Assert.assertEquals(ResultSetMetaData.columnNullable, info.getNullability()); } else { Assert.assertEquals(ResultSetMetaData.columnNoNulls, info.getNullability()); } Assert.assertEquals(jdbcType, info.getType()); Assert.assertEquals(className, info.getClassName()); Assert.assertEquals(Node.class.getCanonicalName(), info.getTypeName()); return info; }