Java Code Examples for java.sql.ResultSetMetaData#getColumnDisplaySize()

The following examples show how to use java.sql.ResultSetMetaData#getColumnDisplaySize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DriverTest.java    From Kylin with Apache License 2.0 6 votes vote down vote up
@Ignore("not maintaining")
@Test
public void testPreStatementWithCubeData() throws SQLException {
    Driver driver = new Driver();
    Properties info = new Properties();
    info.put("user", "");
    info.put("password", "");
    Connection conn = driver.connect("jdbc:kylin://localhost/default", info);
    PreparedStatement state = conn.prepareStatement("select * from test_kylin_fact where seller_id=?");
    state.setLong(1, 10000001);
    ResultSet resultSet = state.executeQuery();

    ResultSetMetaData metadata = resultSet.getMetaData();
    System.out.println("Metadata:");

    for (int i = 0; i < metadata.getColumnCount(); i++) {
        String metaStr = metadata.getCatalogName(i + 1) + " " + metadata.getColumnClassName(i + 1) + " " + metadata.getColumnDisplaySize(i + 1) + " " + metadata.getColumnLabel(i + 1) + " " + metadata.getColumnName(i + 1) + " " + metadata.getColumnType(i + 1) + " " + metadata.getColumnTypeName(i + 1) + " " + metadata.getPrecision(i + 1) + " " + metadata.getScale(i + 1) + " " + metadata.getSchemaName(i + 1) + " " + metadata.getTableName(i + 1);
        System.out.println(metaStr);
    }

    System.out.println("Data:");
    while (resultSet.next()) {
        String dataStr = resultSet.getFloat(1) + " " + resultSet.getInt(2) + " " + resultSet.getInt(3) + " " + resultSet.getLong(4) + " " + resultSet.getDate(5) + " " + resultSet.getString(6);
        System.out.println(dataStr);
    }
}
 
Example 2
Source File: ExportResultSetForObject.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
private void getMetaDataInfo() throws SQLException {
    ResultSetMetaData metaData = rs.getMetaData();
    columnCount                = metaData.getColumnCount();
    int numColumns             = columnCount;
    columnNames                = new String[numColumns];
    columnTypes                = new String[numColumns];
    columnLengths              = new int[numColumns];

    for (int i=0; i<numColumns; i++) {
        int jdbcTypeId = metaData.getColumnType(i+1);
        columnNames[i] = metaData.getColumnName(i+1);
        columnTypes[i] = metaData.getColumnTypeName(i+1);
        if(!ColumnInfo.importExportSupportedType(jdbcTypeId))
        {
            throw LoadError.nonSupportedTypeColumn(
                        columnNames[i], columnTypes[i]); 
        }
     
        columnLengths[i] = metaData.getColumnDisplaySize(i+1);
    }
}
 
Example 3
Source File: PostgresJavaRoutineJsonOutputter.java    From sql-layer with GNU Affero General Public License v3.0 6 votes vote down vote up
protected DataTypeDescriptor resultColumnSQLType(ResultSetMetaData metaData, int i)
        throws SQLException {
    TypeId typeId = TypeId.getBuiltInTypeId(metaData.getColumnType(i));
    if (typeId == null) {
        try {
            typeId = TypeId.getUserDefinedTypeId(metaData.getColumnTypeName(i),
                                                 false);
        }
        catch (StandardException ex) {
            throw new SQLParserInternalException(ex);
        }
    }
    if (typeId.isDecimalTypeId()) {
        return new DataTypeDescriptor(typeId,
                                      metaData.getPrecision(i),
                                      metaData.getScale(i),
                                      metaData.isNullable(i) != ResultSetMetaData.columnNoNulls,
                                      metaData.getColumnDisplaySize(i));
        }
    else {
        return new DataTypeDescriptor(typeId,
                                      metaData.isNullable(i) != ResultSetMetaData.columnNoNulls,
                                      metaData.getColumnDisplaySize(i));
    }
}
 
Example 4
Source File: JDBCDisplayUtil.java    From spliceengine with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
    Calculates column display widths from the default widths of the
    result set.
 */
static private int[] getColumnDisplayWidths(ResultSetMetaData rsmd, int[] dispColumns,
											boolean localizedOutput)
	throws SQLException {
	int count = (dispColumns == null) ? rsmd.getColumnCount() : dispColumns.length;
	int[] widths = new int[count];

	for(int i=0; i<count; i++) {
		int colnum = (dispColumns == null) ? (i + 1) : dispColumns[i];
		int dispsize = localizedOutput
			? LocalizedResource.getInstance().getColumnDisplaySize(rsmd, colnum)
               : rsmd.getColumnDisplaySize(colnum);
		widths[i] = Math.min(maxWidth,
			Math.max((rsmd.isNullable(colnum) == ResultSetMetaData.columnNoNulls)?
			0 : MINWIDTH, dispsize));
	}
	return widths;
}
 
Example 5
Source File: PreparedStatementTest.java    From dremio-oss with Apache License 2.0 6 votes vote down vote up
boolean isEqualsTo(ResultSetMetaData metadata, int colNum) throws SQLException {
  return
      metadata.getCatalogName(colNum).equals(InfoSchemaConstants.IS_CATALOG_NAME) &&
      metadata.getSchemaName(colNum).isEmpty() &&
      metadata.getTableName(colNum).isEmpty() &&
      metadata.getColumnName(colNum).equals(columnName) &&
      metadata.getColumnLabel(colNum).equals(columnName) &&
      metadata.getColumnType(colNum) == type &&
      metadata.isNullable(colNum) == nullable &&
      // There is an existing bug where query results doesn't contain the precision for VARCHAR field.
      //metadata.getPrecision(colNum) == precision &&
      metadata.getScale(colNum) == scale &&
      metadata.isSigned(colNum) == signed &&
      metadata.getColumnDisplaySize(colNum) == displaySize &&
      metadata.getColumnClassName(colNum).equals(className) &&
      metadata.isSearchable(colNum) &&
      metadata.isAutoIncrement(colNum) == false &&
      metadata.isCaseSensitive(colNum) == false &&
      metadata.isReadOnly(colNum) &&
      metadata.isWritable(colNum) == false &&
      metadata.isDefinitelyWritable(colNum) == false &&
      metadata.isCurrency(colNum) == false;
}
 
Example 6
Source File: JDBCDisplayUtil.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
/**
	    Calculates column display widths from the default widths of the
	    result set.
	 */
	static private int[] getColumnDisplayWidths(ResultSetMetaData rsmd, int[] dispColumns,
												boolean localizedOutput)
		throws SQLException {
		int count = (dispColumns == null) ? rsmd.getColumnCount() : dispColumns.length;
		int[] widths = new int[count];

		for(int i=0; i<count; i++) {
			int colnum = (dispColumns == null) ? (i + 1) : dispColumns[i];
			int dispsize = localizedOutput
				? LocalizedResource.getInstance().getColumnDisplaySize(rsmd, colnum)
                : rsmd.getColumnDisplaySize(colnum);
// GemStone changes BEGIN
			final int maxWidth = getMaxColumnWidth(
			    rsmd.getColumnLabel(colnum));
// GemStone changes END
			widths[i] = Math.min(maxWidth,
				Math.max((rsmd.isNullable(colnum) == ResultSetMetaData.columnNoNulls)?
				0 : MINWIDTH, dispsize));
		}
		return widths;
	}
 
Example 7
Source File: ExportResultSetForObject.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
private void getMetaDataInfo() throws SQLException {
    ResultSetMetaData metaData = rs.getMetaData();
    columnCount                = metaData.getColumnCount();
    int numColumns             = columnCount;
    columnNames                = new String[numColumns];
    columnTypes                = new String[numColumns];
    columnLengths              = new int[numColumns];

    for (int i=0; i<numColumns; i++) {
        int jdbcTypeId = metaData.getColumnType(i+1);
        columnNames[i] = metaData.getColumnName(i+1);
        columnTypes[i] = metaData.getColumnTypeName(i+1);
        if(!ColumnInfo.importExportSupportedType(jdbcTypeId))
        {
            throw LoadError.nonSupportedTypeColumn(
                        columnNames[i], columnTypes[i]); 
        }
     
        columnLengths[i] = metaData.getColumnDisplaySize(i+1);
    }
}
 
Example 8
Source File: JdbcDatabaseManager.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
public ResultSetColumnMetaData(final ResultSetMetaData rsMetaData, final int j) throws SQLException {
    // @formatter:off
    this(rsMetaData.getSchemaName(j),
         rsMetaData.getCatalogName(j),
         rsMetaData.getTableName(j),
         rsMetaData.getColumnName(j),
         rsMetaData.getColumnLabel(j),
         rsMetaData.getColumnDisplaySize(j),
         rsMetaData.getColumnType(j),
         rsMetaData.getColumnTypeName(j),
         rsMetaData.getColumnClassName(j),
         rsMetaData.getPrecision(j),
         rsMetaData.getScale(j));
    // @formatter:on
}
 
Example 9
Source File: SQLRenderer.java    From jsqsh with Apache License 2.0 5 votes vote down vote up
/**
 * Return a description of how to format a column.
 * 
 * @param meta The metadata for a result set
 * @param idx The index of the of column to fetch in the result set
 * @return A description of how to format that column
 * @throws SQLException
 */
public ColumnDescription getDescription(ResultSetMetaData meta, int idx)
    throws SQLException {
    
    int type = meta.getColumnType(idx);
    int precision = 0;
    int scale = 0;
    
    switch (type) {
    
        case Types.BINARY:
        case Types.VARBINARY:
        case Types.LONGVARBINARY:
        case Types.CHAR:
        case Types.VARCHAR:
        case Types.NVARCHAR:
        case Types.LONGNVARCHAR:
        case Types.LONGVARCHAR:
        case Types.NCHAR:
            precision = meta.getColumnDisplaySize(idx);
            break;
            
        case Types.DECIMAL:
        case Types.NUMERIC:
            precision = meta.getPrecision(idx);
            scale = meta.getScale(idx);
            break;
            
        default:
            break;
    }
    
    return getDescription(
        meta.getColumnLabel(idx),
        type,
        precision,
        scale);
}
 
Example 10
Source File: LocalizedResource.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
public int getColumnDisplaySize(ResultSetMetaData rsm,
									int columnNumber) throws SQLException{
	  if (!enableLocalized){
			return rsm.getColumnDisplaySize(columnNumber);
	  }
	  int type = rsm.getColumnType(columnNumber);
	  if (type == Types.DATE)
				return dateSize;
	  if (type == Types.TIME)
				return timeSize;
	  if (type == Types.TIMESTAMP)
				return timestampSize;
	  return rsm.getColumnDisplaySize(columnNumber);
}
 
Example 11
Source File: DriverTest.java    From kylin with Apache License 2.0 5 votes vote down vote up
private void printResultSetMetaData(ResultSet rs) throws SQLException {
    ResultSetMetaData metadata = rs.getMetaData();
    System.out.println("Metadata:");

    for (int i = 0; i < metadata.getColumnCount(); i++) {
        String metaStr = metadata.getCatalogName(i + 1) + " " + metadata.getColumnClassName(i + 1) + " "
                + metadata.getColumnDisplaySize(i + 1) + " " + metadata.getColumnLabel(i + 1) + " "
                + metadata.getColumnName(i + 1) + " " + metadata.getColumnType(i + 1) + " "
                + metadata.getColumnTypeName(i + 1) + " " + metadata.getPrecision(i + 1) + " "
                + metadata.getScale(i + 1) + " " + metadata.getSchemaName(i + 1) + " "
                + metadata.getTableName(i + 1);
        System.out.println(metaStr);
    }
}
 
Example 12
Source File: JDBCSentence.java    From nordpos with GNU General Public License v3.0 5 votes vote down vote up
public DataField[] getDataField() throws BasicException {
    try {
        ResultSetMetaData md = m_rs.getMetaData();
        DataField[] df = new DataField[md.getColumnCount()];
        for (int i = 0; i < df.length; i++) {
            df[i] = new DataField();
            df[i].Name = md.getColumnName(i + 1);
            df[i].Size = md.getColumnDisplaySize(i + 1);
            df[i].Type = md.getColumnType(i + 1);
        }
        return df;
    } catch (SQLException eSQL) {
        throw new BasicException(eSQL);
    }
}
 
Example 13
Source File: JdbcDebugUtil.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
private static int colSize( ResultSetMetaData meta, int col ) throws Exception {
    String cLabel = meta.getColumnLabel(col);
    int sz = meta.getColumnDisplaySize(col);
    switch( meta.getColumnType(col) ) {
        case Types.CHAR:
        case Types.VARCHAR:
        case Types.LONGVARCHAR: {
            sz = Math.min( Math.max( sz, 20 ), 64 );
        }
    }
    return Math.max( sz, cLabel.length() );
}
 
Example 14
Source File: ResultSetUtil.java    From Mycat2 with GNU General Public License v3.0 5 votes vote down vote up
public static void resultSetToFieldPacket(String charset,
										  List<FieldPacket> fieldPks, ResultSet rs,
										  boolean isSpark) throws SQLException {
	ResultSetMetaData metaData = rs.getMetaData();
	int colunmCount = metaData.getColumnCount();
	if (colunmCount > 0) {
		//String values="";
		for (int i = 0; i < colunmCount; i++) {
			int j = i + 1;
			FieldPacket fieldPacket = new FieldPacket();
			fieldPacket.orgName = StringUtil.encode(metaData.getColumnName(j),charset);
			fieldPacket.name = StringUtil.encode(metaData.getColumnLabel(j), charset);
			if (! isSpark){
			  fieldPacket.orgTable = StringUtil.encode(metaData.getTableName(j), charset);
			  fieldPacket.table = StringUtil.encode(metaData.getTableName(j),	charset);
			  fieldPacket.db = StringUtil.encode(metaData.getSchemaName(j),charset);
			  fieldPacket.flags = toFlag(metaData, j);
			}
			fieldPacket.length = metaData.getColumnDisplaySize(j);
			
			fieldPacket.decimals = (byte) metaData.getScale(j);
			int javaType = MysqlDefs.javaTypeDetect(
					metaData.getColumnType(j), fieldPacket.decimals);
			fieldPacket.type = (byte) (MysqlDefs.javaTypeMysql(javaType) & 0xff);
			if(MysqlDefs.isBianry((byte) fieldPacket.type)) {
				// 63 represent binary character set
				fieldPacket.charsetIndex = 63;
			}
			fieldPks.add(fieldPacket);
			//values+=metaData.getColumnLabel(j)+"|"+metaData.getColumnName(j)+"  ";
		}
		// System.out.println(values);
	}


}
 
Example 15
Source File: SelectStatementsTester.java    From spanner-jdbc with MIT License 5 votes vote down vote up
private void testSelect(String sql, Object... parameters) throws SQLException {
  PreparedStatement ps = connection.prepareStatement(sql);
  for (int i = 1; i <= parameters.length; i++) {
    ps.setObject(i, parameters[i - 1]);
  }
  try (ResultSet rs = ps.executeQuery()) {
    ResultSetMetaData metadata = rs.getMetaData();
    for (int i = 1; i <= metadata.getColumnCount(); i++) {
      metadata.getColumnClassName(i);
      metadata.getColumnDisplaySize(i);
      metadata.getColumnLabel(i);
      metadata.getColumnName(i);
      metadata.getColumnType(i);
      metadata.getColumnTypeName(i);
      metadata.getPrecision(i);
      metadata.getScale(i);
      metadata.getCatalogName(i);
      metadata.getSchemaName(i);
      metadata.getTableName(i);
      metadata.isNullable(i);
      metadata.isAutoIncrement(i);
      metadata.isCaseSensitive(i);
      metadata.isCurrency(i);
      metadata.isDefinitelyWritable(i);
      metadata.isReadOnly(i);
      metadata.isSearchable(i);
      metadata.isSigned(i);
      metadata.isWritable(i);
    }
    while (rs.next()) {
      // do nothing
    }
  }
}
 
Example 16
Source File: ResultSetMetaDataHolder.java    From stategen with GNU Affero General Public License v3.0 5 votes vote down vote up
public ResultSetMetaDataHolder(ResultSetMetaData m, int i) throws SQLException {
       String catalogName = m.getCatalogName(i);
       String columnClassName = m.getColumnClassName(i);
       int columnDisplaySize = m.getColumnDisplaySize(i);
       String columnLabel = m.getColumnLabel(i);
       String columnName = m.getColumnName(i);
       
       int columnType = m.getColumnType(i);
       String columnTypeName = m.getColumnTypeName(i);
       int precision = m.getPrecision(i);
       int scale = m.getScale(i);
       
       String schemaName = m.getSchemaName(i);
       String tableName = m.getTableName(i);
       
       this.catalogName = catalogName;
       this.columnClassName = columnClassName ;
       this.columnDisplaySize = columnDisplaySize;
       this.columnLabel = columnLabel;
       this.columnName = columnName;
       this.columnType=  columnType;
       this.columnTypeName = columnTypeName;
       this.precision  = precision;
       this.scale = scale;
       this.schemaName = schemaName;
       this.tableName = tableName;    		
}
 
Example 17
Source File: ResultColumnList.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
/** 
 * Generate an RCL to match the contents of a ResultSetMetaData.
 * This is useful when dealing with VTIs.
 *
 * @param rsmd			The ResultSetMetaData.
 * @param tableName		The TableName for the BCNs.
 * @param javaClassName	The name of the VTI
 *
 * @exception StandardException			Thrown on error
 */
public void createListFromResultSetMetaData(ResultSetMetaData rsmd,
											TableName tableName,
											String javaClassName)
		throws StandardException
{
	try
	{
		// JDBC columns #s are 1-based
		// Check to make sure # of columns >= 1
		int numColumns = rsmd.getColumnCount();

		if (numColumns <= 0)
		{
			throw StandardException.newException(SQLState.LANG_INVALID_V_T_I_COLUMN_COUNT, 
								javaClassName, String.valueOf(numColumns));
		}

		for (int index = 1; index <= numColumns; index++)
		{
			boolean nullableResult = 
				(rsmd.isNullable(index) != ResultSetMetaData.columnNoNulls);

			TypeId cti;

			int jdbcColumnType = rsmd.getColumnType(index);

			switch (jdbcColumnType) {
			case Types.JAVA_OBJECT:
			case Types.OTHER:
			{
				cti = TypeId.getUserDefinedTypeId(rsmd.getColumnTypeName(index), false);
				break;
			}
			default:
			{
				cti = TypeId.getBuiltInTypeId(jdbcColumnType);
				break;
			}
			}

			// Handle the case where a VTI returns a bad column type
			if (cti == null)
			{
				throw StandardException.newException(SQLState.LANG_BAD_J_D_B_C_TYPE_INFO, Integer.toString(index));
			}

			// Get the maximum byte storage for this column
			int maxWidth;

			/* Get maximum byte storage from rsmd for variable
			 * width types, set it to MAXINT for the long types,
			 * otherwise get it from the TypeId
			 */
			if (cti.variableLength())
			{
				maxWidth = rsmd.getColumnDisplaySize(index);
			}
			else if (jdbcColumnType == Types.LONGVARCHAR ||
					 jdbcColumnType == Types.LONGVARBINARY)
			{
				maxWidth = Integer.MAX_VALUE;
			}
			else
			{
				maxWidth = 0;
			}

			int precision = cti.isDecimalTypeId() ? rsmd.getPrecision(index) : 0;
			int scale = cti.isDecimalTypeId() ? rsmd.getScale(index) : 0;
			DataTypeDescriptor dts = new DataTypeDescriptor(cti, 
										precision,
										scale, 
										nullableResult, 
										maxWidth);
			addColumn( tableName, rsmd.getColumnName(index), dts );
		}
	}
	catch (Throwable t)
	{
		if (t instanceof StandardException)
		{
			throw (StandardException) t;
		}
		else
		{
			throw StandardException.unexpectedUserException(t);
		}
	}
}
 
Example 18
Source File: TableColumnInfo.java    From reladomo with Apache License 2.0 4 votes vote down vote up
public static TableColumnInfo createTableMetadataWithExtraSelect(Connection connection, String schema, String tableName, String fullyQualifiedTableName)
throws SQLException
{
    TableColumnInfo tableInfo = createTableMetadata(connection, schema, tableName, fullyQualifiedTableName);

    if (tableInfo == null || tableInfo.getColumns().length == 0)
    {
        List columns = new ArrayList();
        ResultSet resultSet = null;

        // Get hold of the table catalog and schema separately from the column metadata in case we have a zero-column table/view
        String catalog = null;
        String dbSchema = null;
        String dbName = null;
        Statement stm = null;
        try
        {
            stm = connection.createStatement();
            resultSet = stm.executeQuery("select * from "+fullyQualifiedTableName+" where 0 = 1");
            resultSet.next();
            ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
            int columnCount = resultSetMetaData.getColumnCount();
            dbName = resultSetMetaData.getTableName(1);
            dbSchema = resultSetMetaData.getSchemaName(1);
            if ("".equals(dbSchema))
            {
                dbSchema = null;
            }
            for(int i=0;i< columnCount; i++)
            {
                int col = i + 1;
                ColumnInfo columnInfo = new ColumnInfo(resultSetMetaData.getColumnName(col),
                        resultSetMetaData.getColumnType(col),
                        resultSetMetaData.getColumnDisplaySize(col),
                        resultSetMetaData.getPrecision(col),
                        resultSetMetaData.getScale(col),
                        col,
                        resultSetMetaData.isNullable(col) == DatabaseMetaData.columnNullable);
                columns.add(columnInfo);
            }
        }
        catch(SQLException e)
        {
            //ignore this; it's acceptable for the table to not be found.
        }
        finally
        {
            close(stm);
            close(resultSet);
        }
        if (columns.size() == 0)
        {
            return null;
        }
        tableInfo = new TableColumnInfo(catalog, dbSchema, dbName, (ColumnInfo[]) columns.toArray(new ColumnInfo[columns.size()]));
    }
    return tableInfo;
}
 
Example 19
Source File: PgServerConnection.java    From Lealone-Plugins with Apache License 2.0 4 votes vote down vote up
private void sendRowDescription(ResultSetMetaData meta) throws Exception {
    if (meta == null) {
        sendNoData();
    } else {
        int columns = meta.getColumnCount();
        int[] types = new int[columns];
        int[] precision = new int[columns];
        String[] names = new String[columns];
        for (int i = 0; i < columns; i++) {
            String name = meta.getColumnName(i + 1);
            names[i] = name;
            int type = meta.getColumnType(i + 1);
            type = PgServer.convertType(type);
            // the ODBC client needs the column pg_catalog.pg_index
            // to be of type 'int2vector'
            // if (name.equalsIgnoreCase("indkey") &&
            // "pg_index".equalsIgnoreCase(meta.getTableName(i + 1))) {
            // type = PgServer.PG_TYPE_INT2VECTOR;
            // }
            precision[i] = meta.getColumnDisplaySize(i + 1);
            server.checkType(type);
            types[i] = type;
        }
        startMessage('T');
        writeShort(columns);
        for (int i = 0; i < columns; i++) {
            writeString(StringUtils.toLowerEnglish(names[i]));
            // object ID
            writeInt(0);
            // attribute number of the column
            writeShort(0);
            // data type
            writeInt(types[i]);
            // pg_type.typlen
            writeShort(getTypeSize(types[i], precision[i]));
            // pg_attribute.atttypmod
            writeInt(-1);
            // text
            writeShort(0);
        }
        sendMessage();
    }
}
 
Example 20
Source File: MySQLColumnDefinition41Packet.java    From shardingsphere with Apache License 2.0 4 votes vote down vote up
public MySQLColumnDefinition41Packet(final int sequenceId, final ResultSetMetaData resultSetMetaData, final int columnIndex) throws SQLException {
    this(sequenceId, resultSetMetaData.getSchemaName(columnIndex), resultSetMetaData.getTableName(columnIndex), resultSetMetaData.getTableName(columnIndex), 
            resultSetMetaData.getColumnLabel(columnIndex), resultSetMetaData.getColumnName(columnIndex), resultSetMetaData.getColumnDisplaySize(columnIndex), 
            MySQLColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(columnIndex)), resultSetMetaData.getScale(columnIndex));
}