summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/odbcbase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-16 09:48:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-16 10:26:03 +0000
commit08c475bb24a34f3a6a3f08e8490b521e8dcc96be (patch)
tree45380d74b4b7f751d43041f28e9588f8ca7a1a89 /connectivity/source/drivers/odbcbase
parent46087fd1b7186cd181275693e72494c4a07c0c38 (diff)
callcatcher: update unused code list
Diffstat (limited to 'connectivity/source/drivers/odbcbase')
-rw-r--r--connectivity/source/drivers/odbcbase/OConnection.cxx105
1 files changed, 0 insertions, 105 deletions
diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx
index 04df960eade3..323e9d2e44ee 100644
--- a/connectivity/source/drivers/odbcbase/OConnection.cxx
+++ b/connectivity/source/drivers/odbcbase/OConnection.cxx
@@ -495,111 +495,6 @@ Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException)
void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException)
{
}
-//--------------------------------------------------------------------
-void OConnection::buildTypeInfo() throw( SQLException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- Reference< XResultSet> xRs = getMetaData ()->getTypeInfo ();
- if(xRs.is())
- {
- Reference< XRow> xRow(xRs,UNO_QUERY);
- // Information for a single SQL type
-
- ::connectivity::ORowSetValue aValue;
- ::std::vector<sal_Int32> aTypes;
- Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData();
- sal_Int32 nCount = xResultSetMetaData->getColumnCount();
- // Loop on the result set until we reach end of file
- while (xRs->next ())
- {
- OTypeInfo aInfo;
- sal_Int32 nPos = 1;
- if ( aTypes.empty() )
- {
- if ( nCount < 1 )
- nCount = 18;
- aTypes.reserve(nCount+1);
- aTypes.push_back(-1);
- for (sal_Int32 j = 1; j <= nCount ; ++j)
- aTypes.push_back(xResultSetMetaData->getColumnType(j));
- }
-
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.aTypeName = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nType = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nPrecision = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.aLiteralPrefix = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.aLiteralSuffix = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.aCreateParams = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.bCaseSensitive = (sal_Bool)aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nSearchType = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.bUnsigned = (sal_Bool)aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.bCurrency = (sal_Bool)aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.bAutoIncrement = (sal_Bool)aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.aLocalTypeName = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nMinimumScale = aValue;
- ++nPos;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nMaximumScale = aValue;
- if ( nCount >= 18 )
- {
- nPos = 18;
- aValue.fill(nPos,aTypes[nPos],xRow);
- aInfo.nNumPrecRadix = aValue;
- }
-
- // check if values are less than zero like it happens in a oracle jdbc driver
- if( aInfo.nPrecision < 0)
- aInfo.nPrecision = 0;
- if( aInfo.nMinimumScale < 0)
- aInfo.nMinimumScale = 0;
- if( aInfo.nMaximumScale < 0)
- aInfo.nMaximumScale = 0;
- if( aInfo.nNumPrecRadix < 0)
- aInfo.nNumPrecRadix = 10;
-
- // Now that we have the type info, save it
- // in the Hashtable if we don't already have an
- // entry for this SQL type.
-
- m_aTypeInfo.push_back(aInfo);
- }
-
- // Close the result set/statement.
-
- Reference< XCloseable> xClose(xRs,UNO_QUERY);
- if(xClose.is())
- xClose->close();
- }
-}
//------------------------------------------------------------------------------
void OConnection::disposing()
{