summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
diff options
context:
space:
mode:
authorTamás Bunth <btomi96@gmail.com>2017-01-29 14:26:16 +0100
committerTamás Bunth <btomi96@gmail.com>2017-01-30 14:57:40 +0000
commit4a193d39fb785c75668c977cf6b40d11b0ef4afe (patch)
tree626c25dc18f925d948b67c2e9eedf392837cd057 /connectivity/source/drivers/firebird/ResultSetMetaData.cxx
parente7606f1f19b2970f0160075f56d4d97029f1e47a (diff)
tdf#105101 check scale to determine subtype
For computed decimal/numeric values firebird's subtype remains 0. In this case we check for the scale of column. If it is not 0 (negative), than imply numeric. Change-Id: Ie5a023d165852fe402b3b4cac817b0bbef58e7cd Reviewed-on: https://gerrit.libreoffice.org/33660 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'connectivity/source/drivers/firebird/ResultSetMetaData.cxx')
-rw-r--r--connectivity/source/drivers/firebird/ResultSetMetaData.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
index 79262d8f1d70..498bbaee3087 100644
--- a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
@@ -62,8 +62,9 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType(sal_Int32 column)
short aType = m_pSqlda->sqlvar[column-1].sqltype;
short aSubType = m_pSqlda->sqlvar[column-1].sqlsubtype;
+ short aScale = m_pSqlda->sqlvar[column-1].sqlscale;
- return getColumnTypeFromFBType(aType, aSubType);
+ return getColumnTypeFromFBType(aType, aSubType, aScale);
}
sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive(sal_Int32 column)
@@ -113,8 +114,9 @@ OUString SAL_CALL OResultSetMetaData::getColumnTypeName(sal_Int32 column)
short aType = m_pSqlda->sqlvar[column-1].sqltype;
short aSubType = m_pSqlda->sqlvar[column-1].sqlsubtype;
+ short aScale = m_pSqlda->sqlvar[column-1].sqlscale;
- return getColumnTypeNameFromFBType(aType, aSubType);
+ return getColumnTypeNameFromFBType(aType, aSubType, aScale);
}
OUString SAL_CALL OResultSetMetaData::getColumnLabel(sal_Int32 column)