use of org.datanucleus.store.rdbms.schema.RDBMSColumnInfo in project datanucleus-rdbms by datanucleus.
the class SQLServerAdapter method newRDBMSColumnInfo.
/**
* Method to create a column info for the current row.
* Overrides the dataType/columnSize/decimalDigits to cater for SQLServer particularities.
* @param rs ResultSet from DatabaseMetaData.getColumns()
* @return column info
*/
public RDBMSColumnInfo newRDBMSColumnInfo(ResultSet rs) {
RDBMSColumnInfo info = new RDBMSColumnInfo(rs);
short dataType = info.getDataType();
switch(dataType) {
case Types.DATE:
case Types.TIME:
case Types.TIMESTAMP:
// Values > 0 inexplicably get returned here.
info.setDecimalDigits(0);
break;
default:
break;
}
return info;
}
use of org.datanucleus.store.rdbms.schema.RDBMSColumnInfo in project datanucleus-rdbms by datanucleus.
the class SybaseAdapter method newRDBMSColumnInfo.
/**
* Method to create a column info for the current row.
* Overrides the dataType/columnSize/decimalDigits to cater for Sybase particularities.
* @param rs ResultSet from DatabaseMetaData.getColumns()
* @return column info
*/
public RDBMSColumnInfo newRDBMSColumnInfo(ResultSet rs) {
RDBMSColumnInfo info = new RDBMSColumnInfo(rs);
short dataType = info.getDataType();
switch(dataType) {
case Types.DATE:
case Types.TIME:
case Types.TIMESTAMP:
// Values > 0 inexplicably get returned here.
info.setDecimalDigits(0);
break;
default:
break;
}
return info;
}
Aggregations