LCOV - code coverage report
Current view: top level - connectivity/source/drivers/odbc - ODatabaseMetaData.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 882 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 152 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "odbc/ODatabaseMetaData.hxx"
      21             : #include "odbc/OTools.hxx"
      22             : #include "odbc/ODatabaseMetaDataResultSet.hxx"
      23             : #include "FDatabaseMetaDataResultSet.hxx"
      24             : #include <com/sun/star/sdbc/DataType.hpp>
      25             : #include <com/sun/star/sdbc/ResultSetType.hpp>
      26             : #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
      27             : #include <com/sun/star/sdbc/TransactionIsolation.hpp>
      28             : #include <connectivity/odbc.hxx>
      29             : #include "TPrivilegesResultSet.hxx"
      30             : #include <connectivity/dbexception.hxx>
      31             : #include <rtl/ustrbuf.hxx>
      32             : 
      33             : using namespace connectivity::odbc;
      34             : using namespace com::sun::star::uno;
      35             : using namespace com::sun::star::lang;
      36             : using namespace com::sun::star::beans;
      37             : using namespace com::sun::star::sdbc;
      38             : 
      39           0 : ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon)
      40           0 :                         : ::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo())
      41             :                         ,m_aConnectionHandle(_pHandle)
      42             :                         ,m_pConnection(_pCon)
      43             :                         ,m_bUseCatalog(true)
      44           0 :                         ,m_bOdbc3(true)
      45             : {
      46             :     OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
      47           0 :     if(!m_pConnection->isCatalogUsed())
      48             :     {
      49           0 :         osl_atomic_increment( &m_refCount );
      50             :         try
      51             :         {
      52           0 :             m_bUseCatalog   = !(usesLocalFiles() || usesLocalFilePerTable());
      53           0 :             OUString sVersion = getDriverVersion();
      54           0 :             m_bOdbc3        =  sVersion != "02.50" && sVersion != "02.00";
      55             :         }
      56           0 :         catch(SQLException& )
      57             :         { // doesn't matter here
      58             :         }
      59           0 :         osl_atomic_decrement( &m_refCount );
      60             :     }
      61           0 : }
      62             : 
      63           0 : ODatabaseMetaData::~ODatabaseMetaData()
      64             : {
      65           0 : }
      66             : 
      67           0 : Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw(  )
      68             : {
      69           0 :     Reference< XResultSet > xRef;
      70             :     try
      71             :     {
      72           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
      73           0 :         xRef = pResult;
      74           0 :         pResult->openTypeInfo();
      75             :     }
      76           0 :     catch(SQLException&)
      77             :     {
      78           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo);
      79             :     }
      80             : 
      81           0 :     return xRef;
      82             : }
      83             : 
      84           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs(  ) throw(SQLException, RuntimeException, std::exception)
      85             : {
      86           0 :     Reference< XResultSet > xRef;
      87           0 :     if(!m_bUseCatalog)
      88             :     {
      89           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs);
      90             :     }
      91             :     else
      92             :     {
      93             :         try
      94             :         {
      95           0 :             ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
      96           0 :             xRef = pResult;
      97           0 :             pResult->openCatalogs();
      98             :         }
      99           0 :         catch(SQLException&)
     100             :         {
     101           0 :             xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCatalogs);
     102             :         }
     103             :     }
     104             : 
     105           0 :     return xRef;
     106             : }
     107             : 
     108           0 : OUString ODatabaseMetaData::impl_getCatalogSeparator_throw(  )
     109             : {
     110           0 :     OUString aVal;
     111           0 :     if ( m_bUseCatalog )
     112           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_NAME_SEPARATOR,aVal,*this,m_pConnection->getTextEncoding());
     113             : 
     114           0 :     return aVal;
     115             : }
     116             : 
     117           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas(  ) throw(SQLException, RuntimeException, std::exception)
     118             : {
     119           0 :     Reference< XResultSet > xRef;
     120             :     try
     121             :     {
     122           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     123           0 :         xRef = pResult;
     124           0 :         pResult->openSchemas();
     125             :     }
     126           0 :     catch(SQLException&)
     127             :     {
     128           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eSchemas);
     129             :     }
     130           0 :     return xRef;
     131             : }
     132             : 
     133           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
     134             :     const Any& catalog, const OUString& schema, const OUString& table,
     135             :     const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
     136             : {
     137           0 :     Reference< XResultSet > xRef;
     138             :     try
     139             :     {
     140           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     141           0 :         xRef = pResult;
     142           0 :         pResult->openColumnPrivileges(m_bUseCatalog ? catalog : Any(),schema,table,columnNamePattern);
     143             :     }
     144           0 :     catch(SQLException&)
     145             :     {
     146           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumnPrivileges);
     147             :     }
     148           0 :     return xRef;
     149             : }
     150             : 
     151           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
     152             :     const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern,
     153             :     const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
     154             : {
     155           0 :     Reference< XResultSet > xRef;
     156             :     try
     157             :     {
     158           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     159           0 :         xRef = pResult;
     160           0 :         pResult->openColumns(m_bUseCatalog ? catalog : Any(),schemaPattern,tableNamePattern,columnNamePattern);
     161             :     }
     162           0 :     catch(SQLException&)
     163             :     {
     164           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns);
     165             :     }
     166           0 :     return xRef;
     167             : }
     168             : 
     169           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
     170             :     const Any& catalog, const OUString& schemaPattern,
     171             :     const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException, std::exception)
     172             : {
     173           0 :     Reference< XResultSet > xRef;
     174             :     try
     175             :     {
     176           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     177           0 :         xRef = pResult;
     178           0 :         pResult->openTables(m_bUseCatalog ? catalog : Any(),schemaPattern,tableNamePattern,types);
     179             :     }
     180           0 :     catch(SQLException&)
     181             :     {
     182           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables);
     183             :     }
     184           0 :     return xRef;
     185             : }
     186             : 
     187           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns(
     188             :     const Any& catalog, const OUString& schemaPattern,
     189             :     const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
     190             : {
     191           0 :     Reference< XResultSet > xRef;
     192             :     try
     193             :     {
     194           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     195           0 :         xRef = pResult;
     196           0 :         pResult->openProcedureColumns(m_bUseCatalog ? catalog : Any(),schemaPattern,procedureNamePattern,columnNamePattern);
     197             :     }
     198           0 :     catch(SQLException&)
     199             :     {
     200           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedureColumns);
     201             :     }
     202           0 :     return xRef;
     203             : }
     204             : 
     205           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
     206             :     const Any& catalog, const OUString& schemaPattern,
     207             :     const OUString& procedureNamePattern ) throw(SQLException, RuntimeException, std::exception)
     208             : {
     209           0 :     Reference< XResultSet > xRef;
     210             :     try
     211             :     {
     212           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     213           0 :         xRef = pResult;
     214           0 :         pResult->openProcedures(m_bUseCatalog ? catalog : Any(),schemaPattern,procedureNamePattern);
     215             :     }
     216           0 :     catch(SQLException&)
     217             :     {
     218           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eProcedures);
     219             :     }
     220           0 :     return xRef;
     221             : }
     222             : 
     223           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
     224             :     const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
     225             : {
     226           0 :     Reference< XResultSet > xRef;
     227           0 :     bool bSuccess = false;
     228             :     try
     229             :     {
     230           0 :         if ( !m_pConnection->preventGetVersionColumns() )
     231             :         {
     232           0 :             ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     233           0 :             xRef = pResult;
     234           0 :             pResult->openVersionColumns(m_bUseCatalog ? catalog : Any(),schema,table);
     235           0 :             bSuccess = true;
     236             :         }
     237             :     }
     238           0 :     catch(SQLException&)
     239             :     {
     240             :     }
     241             : 
     242           0 :     if ( !bSuccess )
     243             :     {
     244           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns);
     245             :     }
     246             : 
     247           0 :     return xRef;
     248             : }
     249             : 
     250           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength(  ) throw(SQLException, RuntimeException, std::exception)
     251             : {
     252             :     SQLUINTEGER nValue;
     253           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_BINARY_LITERAL_LEN,nValue,*this);
     254           0 :     return nValue;
     255             : }
     256             : 
     257           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize(  ) throw(SQLException, RuntimeException, std::exception)
     258             : {
     259             :     SQLUINTEGER nValue;
     260           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_ROW_SIZE,nValue,*this);
     261           0 :     return nValue;
     262             : }
     263             : 
     264           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     265             : {
     266             :     SQLUSMALLINT nValue;
     267           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CATALOG_NAME_LEN,nValue,*this);
     268           0 :     return nValue;
     269             : }
     270             : 
     271           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength(  ) throw(SQLException, RuntimeException, std::exception)
     272             : {
     273             :     SQLUINTEGER nValue;
     274           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CHAR_LITERAL_LEN,nValue,*this);
     275           0 :     return nValue;
     276             : }
     277             : 
     278           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     279             : {
     280             :     SQLUSMALLINT nValue;
     281           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMN_NAME_LEN,nValue,*this);
     282           0 :     return nValue;
     283             : }
     284             : 
     285           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex(  ) throw(SQLException, RuntimeException, std::exception)
     286             : {
     287             :     SQLUSMALLINT nValue;
     288           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_INDEX,nValue,*this);
     289           0 :     return nValue;
     290             : }
     291             : 
     292           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     293             : {
     294             :     SQLUSMALLINT nValue;
     295           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CURSOR_NAME_LEN,nValue,*this);
     296           0 :     return nValue;
     297             : }
     298             : 
     299           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections(  ) throw(SQLException, RuntimeException, std::exception)
     300             : {
     301             :     SQLUSMALLINT nValue;
     302           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_DRIVER_CONNECTIONS/*SQL_ACTIVE_CONNECTIONS*/,nValue,*this);
     303           0 :     return nValue;
     304             : }
     305             : 
     306           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable(  ) throw(SQLException, RuntimeException, std::exception)
     307             : {
     308             :     SQLUSMALLINT nValue;
     309           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_TABLE,nValue,*this);
     310           0 :     return nValue;
     311             : }
     312             : 
     313           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength(  ) throw(SQLException, RuntimeException, std::exception)
     314             : {
     315             :     SQLUINTEGER nValue;
     316           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_STATEMENT_LEN,nValue,*this);
     317           0 :     return nValue;
     318             : }
     319             : 
     320           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     321             : {
     322             :     SQLUSMALLINT nValue;
     323           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_TABLE_NAME_LEN,nValue,*this);
     324           0 :     return nValue;
     325             : }
     326             : 
     327           0 : sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw(  )
     328             : {
     329             :     SQLUSMALLINT nValue;
     330           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_TABLES_IN_SELECT,nValue,*this);
     331           0 :     return nValue;
     332             : }
     333             : 
     334           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys(
     335             :     const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
     336             : {
     337           0 :     Reference< XResultSet > xRef;
     338             :     try
     339             :     {
     340           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     341           0 :         xRef = pResult;
     342           0 :         pResult->openExportedKeys(m_bUseCatalog ? catalog : Any(),schema,table);
     343             :     }
     344           0 :     catch(SQLException&)
     345             :     {
     346           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eExportedKeys);
     347             :     }
     348           0 :     return xRef;
     349             : }
     350             : 
     351           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
     352             :     const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
     353             : {
     354           0 :     Reference< XResultSet > xRef;
     355             :     try
     356             :     {
     357           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     358           0 :         xRef = pResult;
     359           0 :         pResult->openImportedKeys(m_bUseCatalog ? catalog : Any(),schema,table);
     360             :     }
     361           0 :     catch(SQLException&)
     362             :     {
     363           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eImportedKeys);
     364             :     }
     365           0 :     return xRef;
     366             : }
     367             : 
     368           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys(
     369             :     const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
     370             : {
     371           0 :     Reference< XResultSet > xRef;
     372             :     try
     373             :     {
     374           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     375           0 :         xRef = pResult;
     376           0 :         pResult->openPrimaryKeys(m_bUseCatalog ? catalog : Any(),schema,table);
     377             :     }
     378           0 :     catch(SQLException&)
     379             :     {
     380           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::ePrimaryKeys);
     381             :     }
     382           0 :     return xRef;
     383             : }
     384             : 
     385           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
     386             :     const Any& catalog, const OUString& schema, const OUString& table,
     387             :     sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException, std::exception)
     388             : {
     389           0 :     Reference< XResultSet > xRef;
     390             :     try
     391             :     {
     392           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     393           0 :         xRef = pResult;
     394           0 :         pResult->openIndexInfo(m_bUseCatalog ? catalog : Any(),schema,table,unique,approximate);
     395             :     }
     396           0 :     catch(SQLException&)
     397             :     {
     398           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo);
     399             :     }
     400           0 :     return xRef;
     401             : }
     402             : 
     403           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
     404             :     const Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope,
     405             :     sal_Bool nullable ) throw(SQLException, RuntimeException, std::exception)
     406             : {
     407           0 :     Reference< XResultSet > xRef;
     408             :     try
     409             :     {
     410           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     411           0 :         xRef = pResult;
     412           0 :         pResult->openBestRowIdentifier(m_bUseCatalog ? catalog : Any(),schema,table,scope,nullable);
     413             :     }
     414           0 :     catch(SQLException&)
     415             :     {
     416           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eBestRowIdentifier);
     417             :     }
     418           0 :     return xRef;
     419             : }
     420             : 
     421           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
     422             :     const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) throw(SQLException, RuntimeException, std::exception)
     423             : {
     424           0 :     if ( m_pConnection->isIgnoreDriverPrivilegesEnabled() )
     425             :     {
     426           0 :         return new OResultSetPrivileges(this,catalog,schemaPattern,tableNamePattern);
     427             :     }
     428           0 :     ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     429           0 :     Reference< XResultSet > xRef = pResult;
     430           0 :     pResult->openTablePrivileges(m_bUseCatalog ? catalog : Any(),schemaPattern,tableNamePattern);
     431           0 :     return xRef;
     432             : }
     433             : 
     434           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
     435             :     const Any& primaryCatalog, const OUString& primarySchema,
     436             :     const OUString& primaryTable, const Any& foreignCatalog,
     437             :     const OUString& foreignSchema, const OUString& foreignTable ) throw(SQLException, RuntimeException, std::exception)
     438             : {
     439           0 :     Reference< XResultSet > xRef;
     440             :     try
     441             :     {
     442           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     443           0 :         xRef = pResult;
     444           0 :         pResult->openForeignKeys(m_bUseCatalog ? primaryCatalog : Any(),primarySchema.toChar() == '%' ? &primarySchema : NULL,&primaryTable,
     445           0 :             m_bUseCatalog ? foreignCatalog : Any(), foreignSchema.toChar() == '%' ? &foreignSchema : NULL,&foreignTable);
     446             :     }
     447           0 :     catch(SQLException&)
     448             :     {
     449           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eCrossReference);
     450             :     }
     451           0 :     return xRef;
     452             : }
     453             : 
     454           0 : sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs(  ) throw(SQLException, RuntimeException, std::exception)
     455             : {
     456           0 :     OUString aVal;
     457           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_ROW_SIZE_INCLUDES_LONG,aVal,*this,m_pConnection->getTextEncoding());
     458           0 :     return aVal.toChar() == 'Y';
     459             : }
     460             : 
     461           0 : sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
     462             : {
     463             :     SQLUSMALLINT nValue;
     464           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this);
     465           0 :     return nValue == SQL_IC_LOWER;
     466             : }
     467             : 
     468           0 : sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
     469             : {
     470             :     SQLUSMALLINT nValue;
     471           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this);
     472           0 :     return nValue == SQL_IC_LOWER;
     473             : }
     474             : 
     475           0 : bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw(  )
     476             : {
     477             :     SQLUSMALLINT nValue;
     478           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this);
     479           0 :     return nValue == SQL_IC_MIXED;
     480             : }
     481             : 
     482           0 : sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
     483             : {
     484             :     SQLUSMALLINT nValue;
     485           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this);
     486           0 :     return nValue == SQL_IC_MIXED;
     487             : }
     488             : 
     489           0 : sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
     490             : {
     491             :     SQLUSMALLINT nValue;
     492           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this);
     493           0 :     return nValue == SQL_IC_UPPER;
     494             : }
     495             : 
     496           0 : sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
     497             : {
     498             :     SQLUSMALLINT nValue;
     499           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this);
     500           0 :     return nValue == SQL_IC_UPPER;
     501             : }
     502             : 
     503           0 : bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw(  )
     504             : {
     505             :     SQLUINTEGER nValue;
     506           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this);
     507           0 :     return (nValue & SQL_AT_ADD_COLUMN) == SQL_AT_ADD_COLUMN;
     508             : }
     509             : 
     510           0 : bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw(  )
     511             : {
     512             :     SQLUINTEGER nValue;
     513           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this);
     514           0 :     return  ((nValue & SQL_AT_DROP_COLUMN)          == SQL_AT_DROP_COLUMN)          ||
     515           0 :             ((nValue & SQL_AT_DROP_COLUMN_CASCADE)  == SQL_AT_DROP_COLUMN_CASCADE)  ||
     516           0 :             ((nValue & SQL_AT_DROP_COLUMN_RESTRICT) == SQL_AT_DROP_COLUMN_RESTRICT);
     517             : }
     518             : 
     519           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength(  ) throw(SQLException, RuntimeException, std::exception)
     520             : {
     521             :     SQLUINTEGER nValue;
     522           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_INDEX_SIZE,nValue,*this);
     523           0 :     return nValue;
     524             : }
     525             : 
     526           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns(  ) throw(SQLException, RuntimeException, std::exception)
     527             : {
     528             :     SQLUSMALLINT nValue;
     529           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NON_NULLABLE_COLUMNS,nValue,*this);
     530           0 :     return nValue == SQL_NNC_NON_NULL;
     531             : }
     532             : 
     533           0 : OUString SAL_CALL ODatabaseMetaData::getCatalogTerm(  ) throw(SQLException, RuntimeException, std::exception)
     534             : {
     535           0 :     OUString aVal;
     536           0 :     if(m_bUseCatalog)
     537           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_TERM,aVal,*this,m_pConnection->getTextEncoding());
     538           0 :     return aVal;
     539             : }
     540             : 
     541           0 : OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw(  )
     542             : {
     543           0 :     OUString aVal;
     544           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_QUOTE_CHAR,aVal,*this,m_pConnection->getTextEncoding());
     545           0 :     return aVal;
     546             : }
     547             : 
     548           0 : OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters(  ) throw(SQLException, RuntimeException, std::exception)
     549             : {
     550           0 :     OUString aVal;
     551           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SPECIAL_CHARACTERS,aVal,*this,m_pConnection->getTextEncoding());
     552           0 :     return aVal;
     553             : }
     554             : 
     555           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames(  ) throw(SQLException, RuntimeException, std::exception)
     556             : {
     557             :     SQLUSMALLINT nValue;
     558           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     559           0 :     return nValue != SQL_CN_NONE;
     560             : }
     561             : 
     562           0 : bool ODatabaseMetaData::impl_isCatalogAtStart_throw(  )
     563             : {
     564           0 :     SQLUSMALLINT nValue=0;
     565           0 :     if ( m_bUseCatalog )
     566           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_LOCATION,nValue,*this);
     567           0 :     return nValue == SQL_CL_START;
     568             : }
     569             : 
     570           0 : sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions(  ) throw(SQLException, RuntimeException, std::exception)
     571             : {
     572             :     SQLUSMALLINT nValue;
     573           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this);
     574           0 :     return nValue == SQL_TC_DDL_IGNORE;
     575             : }
     576             : 
     577           0 : sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit(  ) throw(SQLException, RuntimeException, std::exception)
     578             : {
     579             :     SQLUSMALLINT nValue;
     580           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this);
     581           0 :     return nValue == SQL_TC_DDL_COMMIT;
     582             : }
     583             : 
     584           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly(  ) throw(SQLException, RuntimeException, std::exception)
     585             : {
     586             :     SQLUSMALLINT nValue;
     587           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this);
     588           0 :     return nValue == SQL_TC_DML;
     589             : }
     590             : 
     591           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions(  ) throw(SQLException, RuntimeException, std::exception)
     592             : {
     593             :     SQLUSMALLINT nValue;
     594           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this);
     595           0 :     return nValue == SQL_TC_ALL;
     596             : }
     597             : 
     598           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete(  ) throw(SQLException, RuntimeException, std::exception)
     599             : {
     600             :     SQLUINTEGER nValue;
     601           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this);
     602           0 :     return (nValue & SQL_CA1_POS_DELETE) == SQL_CA1_POS_DELETE;
     603             : }
     604             : 
     605           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate(  ) throw(SQLException, RuntimeException, std::exception)
     606             : {
     607             :     SQLUINTEGER nValue;
     608           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this);
     609           0 :     return (nValue & SQL_CA1_POS_UPDATE) == SQL_CA1_POS_UPDATE;
     610             : }
     611             : 
     612           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback(  ) throw(SQLException, RuntimeException, std::exception)
     613             : {
     614             :     SQLUSMALLINT nValue;
     615           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_ROLLBACK_BEHAVIOR,nValue,*this);
     616           0 :     return nValue == SQL_CB_PRESERVE || nValue == SQL_CB_CLOSE;
     617             : }
     618             : 
     619           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit(  ) throw(SQLException, RuntimeException, std::exception)
     620             : {
     621             :     SQLUSMALLINT nValue;
     622           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_COMMIT_BEHAVIOR,nValue,*this);
     623           0 :     return nValue == SQL_CB_PRESERVE || nValue == SQL_CB_CLOSE;
     624             : }
     625             : 
     626           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit(  ) throw(SQLException, RuntimeException, std::exception)
     627             : {
     628             :     SQLUSMALLINT nValue;
     629           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_COMMIT_BEHAVIOR,nValue,*this);
     630           0 :     return nValue == SQL_CB_PRESERVE;
     631             : }
     632             : 
     633           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback(  ) throw(SQLException, RuntimeException, std::exception)
     634             : {
     635             :     SQLUSMALLINT nValue;
     636           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_ROLLBACK_BEHAVIOR,nValue,*this);
     637           0 :     return nValue == SQL_CB_PRESERVE;
     638             : }
     639             : 
     640           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException, std::exception)
     641             : {
     642             :     SQLUINTEGER nValue;
     643           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_ISOLATION_OPTION,nValue,*this);
     644           0 :     return (nValue & static_cast<SQLUINTEGER>(level)) == static_cast<SQLUINTEGER>(level);
     645             : }
     646             : 
     647           0 : bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw(  )
     648             : {
     649             :     SQLUINTEGER nValue;
     650           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this);
     651           0 :     return (nValue & SQL_SU_DML_STATEMENTS) == SQL_SU_DML_STATEMENTS;
     652             : }
     653             : 
     654           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL(  ) throw(SQLException, RuntimeException, std::exception)
     655             : {
     656             :     SQLUINTEGER nValue;
     657           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this);
     658           0 :     return static_cast<bool>(nValue & SQL_SC_SQL92_FULL);
     659             : }
     660             : 
     661           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL(  ) throw(SQLException, RuntimeException, std::exception)
     662             : {
     663             :     SQLUINTEGER nValue;
     664           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this);
     665           0 :     return static_cast<bool>(nValue &SQL_SC_SQL92_ENTRY);
     666             : }
     667             : 
     668           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility(  ) throw(SQLException, RuntimeException, std::exception)
     669             : {
     670           0 :     OUString aStr;
     671           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_INTEGRITY,aStr,*this,m_pConnection->getTextEncoding());
     672           0 :     return aStr.toChar() == 'Y';
     673             : }
     674             : 
     675           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions(  ) throw(SQLException, RuntimeException, std::exception)
     676             : {
     677             :     SQLUINTEGER nValue;
     678           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this);
     679           0 :     return (nValue & SQL_SU_INDEX_DEFINITION) == SQL_SU_INDEX_DEFINITION;
     680             : }
     681             : 
     682           0 : bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw(  )
     683             : {
     684             :     SQLUINTEGER nValue;
     685           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this);
     686           0 :     return (nValue & SQL_SU_TABLE_DEFINITION) == SQL_SU_TABLE_DEFINITION;
     687             : }
     688             : 
     689           0 : bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw(  )
     690             : {
     691           0 :     SQLUINTEGER nValue=0;
     692           0 :     if(m_bUseCatalog)
     693           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this);
     694           0 :     return (nValue & SQL_CU_TABLE_DEFINITION) == SQL_CU_TABLE_DEFINITION;
     695             : }
     696             : 
     697           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions(  ) throw(SQLException, RuntimeException, std::exception)
     698             : {
     699           0 :     SQLUINTEGER nValue=0;
     700           0 :     if(m_bUseCatalog)
     701           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this);
     702           0 :     return (nValue & SQL_CU_INDEX_DEFINITION) == SQL_CU_INDEX_DEFINITION;
     703             : }
     704             : 
     705           0 : bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw(  )
     706             : {
     707           0 :     SQLUINTEGER nValue=0;
     708           0 :     if(m_bUseCatalog)
     709           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this);
     710           0 :     return (nValue & SQL_CU_DML_STATEMENTS) == SQL_CU_DML_STATEMENTS;
     711             : }
     712             : 
     713           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins(  ) throw(SQLException, RuntimeException, std::exception)
     714             : {
     715             :     SQLUINTEGER nValue;
     716           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_OJ_CAPABILITIES,nValue,*this);
     717           0 :     return ((nValue & (SQL_OJ_FULL|SQL_OJ_LEFT|SQL_OJ_RIGHT|SQL_OJ_NESTED|SQL_OJ_NOT_ORDERED|SQL_OJ_ALL_COMPARISON_OPS|SQL_OJ_INNER)) != 0);
     718             : }
     719             : 
     720           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes(  ) throw(SQLException, RuntimeException, std::exception)
     721             : {
     722           0 :     Reference< XResultSet > xRef;
     723             :     try
     724             :     {
     725           0 :         ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
     726           0 :         xRef = pResult;
     727           0 :         pResult->openTablesTypes();
     728             :     }
     729           0 :     catch(SQLException&)
     730             :     {
     731           0 :         xRef = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
     732             :     }
     733           0 :     return xRef;
     734             : }
     735             : 
     736           0 : sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw(  )
     737             : {
     738             :     SQLUSMALLINT nValue;
     739           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CONCURRENT_ACTIVITIES,nValue,*this);
     740           0 :     return nValue;
     741             : }
     742             : 
     743           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     744             : {
     745             :     SQLUSMALLINT nValue;
     746           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_PROCEDURE_NAME_LEN,nValue,*this);
     747           0 :     return nValue;
     748             : }
     749             : 
     750           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength(  ) throw(SQLException, RuntimeException, std::exception)
     751             : {
     752             :     SQLUSMALLINT nValue;
     753           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_SCHEMA_NAME_LEN,nValue,*this);
     754           0 :     return nValue;
     755             : }
     756             : 
     757           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions(  ) throw(SQLException, RuntimeException, std::exception)
     758             : {
     759             :     SQLUSMALLINT nValue;
     760           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this);
     761           0 :     return nValue != SQL_TC_NONE;
     762             : }
     763             : 
     764           0 : sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable(  ) throw(SQLException, RuntimeException, std::exception)
     765             : {
     766           0 :     OUString aValue;
     767           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ACCESSIBLE_PROCEDURES,aValue,*this,m_pConnection->getTextEncoding());
     768           0 :     return aValue.toChar() == 'Y';
     769             : }
     770             : 
     771           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures(  ) throw(SQLException, RuntimeException, std::exception)
     772             : {
     773           0 :     OUString aValue;
     774           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_PROCEDURES,aValue,*this,m_pConnection->getTextEncoding());
     775           0 :     return aValue.toChar() == 'Y';
     776             : }
     777             : 
     778           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate(  ) throw(SQLException, RuntimeException, std::exception)
     779             : {
     780             :     SQLUINTEGER nValue;
     781           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this);
     782           0 :     return (nValue & SQL_CA1_POSITIONED_UPDATE) == SQL_CA1_POSITIONED_UPDATE;
     783             : }
     784             : 
     785           0 : sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable(  ) throw(SQLException, RuntimeException, std::exception)
     786             : {
     787           0 :     OUString aValue;
     788           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ACCESSIBLE_TABLES,aValue,*this,m_pConnection->getTextEncoding());
     789           0 :     return aValue.toChar() == 'Y';
     790             : }
     791             : 
     792           0 : sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly(  ) throw(SQLException, RuntimeException, std::exception)
     793             : {
     794           0 :     return m_pConnection->isReadOnly();
     795             : }
     796             : 
     797           0 : sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles(  ) throw(SQLException, RuntimeException, std::exception)
     798             : {
     799             :     SQLUSMALLINT nValue;
     800           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_FILE_USAGE,nValue,*this);
     801           0 :     return nValue == SQL_FILE_CATALOG;
     802             : }
     803             : 
     804           0 : sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable(  ) throw(SQLException, RuntimeException, std::exception)
     805             : {
     806             :     SQLUSMALLINT nValue;
     807           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_FILE_USAGE,nValue,*this);
     808           0 :     return nValue == SQL_FILE_TABLE;
     809             : }
     810             : 
     811           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion(  ) throw(SQLException, RuntimeException, std::exception)
     812             : {
     813             :     SQLUINTEGER nValue;
     814           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_FUNCTIONS,nValue,*this);
     815           0 :     return (nValue & SQL_FN_CVT_CONVERT) == SQL_FN_CVT_CONVERT;
     816             : }
     817             : 
     818           0 : sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull(  ) throw(SQLException, RuntimeException, std::exception)
     819             : {
     820             :     SQLUSMALLINT nValue;
     821           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONCAT_NULL_BEHAVIOR,nValue,*this);
     822           0 :     return nValue == SQL_CB_NULL;
     823             : }
     824             : 
     825           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing(  ) throw(SQLException, RuntimeException, std::exception)
     826             : {
     827           0 :     OUString aValue;
     828           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_COLUMN_ALIAS,aValue,*this,m_pConnection->getTextEncoding());
     829           0 :     return aValue.toChar() == 'Y';
     830             : }
     831             : 
     832           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames(  ) throw(SQLException, RuntimeException, std::exception)
     833             : {
     834             :     SQLUSMALLINT nValue;
     835           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     836           0 :     return nValue != SQL_CN_NONE;
     837             : }
     838             : 
     839           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException, std::exception)
     840             : {
     841           0 :     if(fromType == toType)
     842           0 :         return sal_True;
     843             : 
     844           0 :     SQLUINTEGER nValue=0;
     845           0 :     switch(fromType)
     846             :     {
     847             :         case DataType::BIT:
     848           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_BIT,nValue,*this);
     849           0 :             break;
     850             :         case DataType::TINYINT:
     851           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_TINYINT,nValue,*this);
     852           0 :             break;
     853             :         case DataType::SMALLINT:
     854           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_SMALLINT,nValue,*this);
     855           0 :             break;
     856             :         case DataType::INTEGER:
     857           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_INTEGER,nValue,*this);
     858           0 :             break;
     859             :         case DataType::BIGINT:
     860           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_BIGINT,nValue,*this);
     861           0 :             break;
     862             :         case DataType::FLOAT:
     863           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_FLOAT,nValue,*this);
     864           0 :             break;
     865             :         case DataType::REAL:
     866           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_REAL,nValue,*this);
     867           0 :             break;
     868             :         case DataType::DOUBLE:
     869           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_DOUBLE,nValue,*this);
     870           0 :             break;
     871             :         case DataType::NUMERIC:
     872           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_NUMERIC,nValue,*this);
     873           0 :             break;
     874             :         case DataType::DECIMAL:
     875           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_DECIMAL,nValue,*this);
     876           0 :             break;
     877             :         case DataType::CHAR:
     878           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_CHAR,nValue,*this);
     879           0 :             break;
     880             :         case DataType::VARCHAR:
     881           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_VARCHAR,nValue,*this);
     882           0 :             break;
     883             :         case DataType::LONGVARCHAR:
     884             :         case DataType::CLOB:
     885           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_LONGVARCHAR,nValue,*this);
     886           0 :             break;
     887             :         case DataType::DATE:
     888           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_DATE,nValue,*this);
     889           0 :             break;
     890             :         case DataType::TIME:
     891           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_TIME,nValue,*this);
     892           0 :             break;
     893             :         case DataType::TIMESTAMP:
     894           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_TIMESTAMP,nValue,*this);
     895           0 :             break;
     896             :         case DataType::BINARY:
     897           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_BINARY,nValue,*this);
     898           0 :             break;
     899             :         case DataType::VARBINARY:
     900           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_VARBINARY,nValue,*this);
     901           0 :             break;
     902             :         case DataType::LONGVARBINARY:
     903             :         case DataType::BLOB:
     904           0 :             OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_LONGVARBINARY,nValue,*this);
     905           0 :             break;
     906             :         case DataType::SQLNULL:
     907             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     908           0 :             break;
     909             :         case DataType::OTHER:
     910             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     911           0 :             break;
     912             :         case DataType::OBJECT:
     913             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     914           0 :             break;
     915             :         case DataType::DISTINCT:
     916             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     917           0 :             break;
     918             :         case DataType::STRUCT:
     919             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     920           0 :             break;
     921             :         case DataType::ARRAY:
     922             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     923           0 :             break;
     924             :         case DataType::REF:
     925             :             //  OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
     926           0 :             break;
     927             :     }
     928           0 :     bool bConvert = false;
     929           0 :     switch(toType)
     930             :     {
     931             :         case DataType::BIT:
     932           0 :             bConvert = (nValue & SQL_CVT_BIT) == SQL_CVT_BIT;
     933           0 :             break;
     934             :         case DataType::TINYINT:
     935           0 :             bConvert = (nValue & SQL_CVT_TINYINT) == SQL_CVT_TINYINT;
     936           0 :             break;
     937             :         case DataType::SMALLINT:
     938           0 :             bConvert = (nValue & SQL_CVT_SMALLINT) == SQL_CVT_SMALLINT;
     939           0 :             break;
     940             :         case DataType::INTEGER:
     941           0 :             bConvert = (nValue & SQL_CVT_INTEGER) == SQL_CVT_INTEGER;
     942           0 :             break;
     943             :         case DataType::BIGINT:
     944           0 :             bConvert = (nValue & SQL_CVT_BIGINT) == SQL_CVT_BIGINT;
     945           0 :             break;
     946             :         case DataType::FLOAT:
     947           0 :             bConvert = (nValue & SQL_CVT_FLOAT) == SQL_CVT_FLOAT;
     948           0 :             break;
     949             :         case DataType::REAL:
     950           0 :             bConvert = (nValue & SQL_CVT_REAL) == SQL_CVT_REAL;
     951           0 :             break;
     952             :         case DataType::DOUBLE:
     953           0 :             bConvert = (nValue & SQL_CVT_DOUBLE) == SQL_CVT_DOUBLE;
     954           0 :             break;
     955             :         case DataType::NUMERIC:
     956           0 :             bConvert = (nValue & SQL_CVT_NUMERIC) == SQL_CVT_NUMERIC;
     957           0 :             break;
     958             :         case DataType::DECIMAL:
     959           0 :             bConvert = (nValue & SQL_CVT_DECIMAL) == SQL_CVT_DECIMAL;
     960           0 :             break;
     961             :         case DataType::CHAR:
     962           0 :             bConvert = (nValue & SQL_CVT_CHAR) == SQL_CVT_CHAR;
     963           0 :             break;
     964             :         case DataType::VARCHAR:
     965           0 :             bConvert = (nValue & SQL_CVT_VARCHAR) == SQL_CVT_VARCHAR;
     966           0 :             break;
     967             :         case DataType::LONGVARCHAR:
     968             :         case DataType::CLOB:
     969           0 :             bConvert = (nValue & SQL_CVT_LONGVARCHAR) == SQL_CVT_LONGVARCHAR;
     970           0 :             break;
     971             :         case DataType::DATE:
     972           0 :             bConvert = (nValue & SQL_CVT_DATE) == SQL_CVT_DATE;
     973           0 :             break;
     974             :         case DataType::TIME:
     975           0 :             bConvert = (nValue & SQL_CVT_TIME) == SQL_CVT_TIME;
     976           0 :             break;
     977             :         case DataType::TIMESTAMP:
     978           0 :             bConvert = (nValue & SQL_CVT_TIMESTAMP) == SQL_CVT_TIMESTAMP;
     979           0 :             break;
     980             :         case DataType::BINARY:
     981           0 :             bConvert = (nValue & SQL_CVT_BINARY) == SQL_CVT_BINARY;
     982           0 :             break;
     983             :         case DataType::VARBINARY:
     984           0 :             bConvert = (nValue & SQL_CVT_VARBINARY) == SQL_CVT_VARBINARY;
     985           0 :             break;
     986             :         case DataType::LONGVARBINARY:
     987             :         case DataType::BLOB:
     988           0 :             bConvert = (nValue & SQL_CVT_LONGVARBINARY) == SQL_CVT_LONGVARBINARY;
     989           0 :             break;
     990             :     }
     991             : 
     992           0 :     return bConvert;
     993             : }
     994             : 
     995           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy(  ) throw(SQLException, RuntimeException, std::exception)
     996             : {
     997           0 :     OUString aValue;
     998           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_EXPRESSIONS_IN_ORDERBY,aValue,*this,m_pConnection->getTextEncoding());
     999           0 :     return aValue.toChar() == 'Y';
    1000             : }
    1001             : 
    1002           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy(  ) throw(SQLException, RuntimeException, std::exception)
    1003             : {
    1004             :     SQLUSMALLINT nValue;
    1005           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this);
    1006           0 :     return nValue != SQL_GB_NOT_SUPPORTED;
    1007             : }
    1008             : 
    1009           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect(  ) throw(SQLException, RuntimeException, std::exception)
    1010             : {
    1011             :     SQLUSMALLINT nValue;
    1012           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this);
    1013           0 :     return nValue != SQL_GB_GROUP_BY_CONTAINS_SELECT;
    1014             : }
    1015             : 
    1016           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated(  ) throw(SQLException, RuntimeException, std::exception)
    1017             : {
    1018             :     SQLUSMALLINT nValue;
    1019           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this);
    1020           0 :     return nValue == SQL_GB_NO_RELATION;
    1021             : }
    1022             : 
    1023           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions(  ) throw(SQLException, RuntimeException, std::exception)
    1024             : {
    1025           0 :     OUString aValue;
    1026           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MULTIPLE_ACTIVE_TXN,aValue,*this,m_pConnection->getTextEncoding());
    1027           0 :     return aValue.toChar() == 'Y';
    1028             : }
    1029             : 
    1030           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets(  ) throw(SQLException, RuntimeException, std::exception)
    1031             : {
    1032           0 :     OUString aValue;
    1033           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MULT_RESULT_SETS,aValue,*this,m_pConnection->getTextEncoding());
    1034           0 :     return aValue.toChar() == 'Y';
    1035             : }
    1036             : 
    1037           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause(  ) throw(SQLException, RuntimeException, std::exception)
    1038             : {
    1039           0 :     OUString aValue;
    1040           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_LIKE_ESCAPE_CLAUSE,aValue,*this,m_pConnection->getTextEncoding());
    1041           0 :     return aValue.toChar() == 'Y';
    1042             : }
    1043             : 
    1044           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated(  ) throw(SQLException, RuntimeException, std::exception)
    1045             : {
    1046           0 :     OUString aValue;
    1047           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ORDER_BY_COLUMNS_IN_SELECT,aValue,*this,m_pConnection->getTextEncoding());
    1048           0 :     return aValue.toChar() == 'N';
    1049             : }
    1050             : 
    1051           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion(  ) throw(SQLException, RuntimeException, std::exception)
    1052             : {
    1053             :     SQLUINTEGER nValue;
    1054           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_UNION,nValue,*this);
    1055           0 :     return (nValue & SQL_U_UNION) == SQL_U_UNION;
    1056             : }
    1057             : 
    1058           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll(  ) throw(SQLException, RuntimeException, std::exception)
    1059             : {
    1060             :     SQLUINTEGER nValue;
    1061           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_UNION,nValue,*this);
    1062           0 :     return (nValue & SQL_U_UNION_ALL) == SQL_U_UNION_ALL;
    1063             : }
    1064             : 
    1065           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException, std::exception)
    1066             : {
    1067             :     SQLUSMALLINT nValue;
    1068           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this);
    1069           0 :     return nValue == SQL_IC_MIXED;
    1070             : }
    1071             : 
    1072           0 : bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw(  )
    1073             : {
    1074             :     SQLUSMALLINT nValue;
    1075           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this);
    1076           0 :     return nValue == SQL_IC_MIXED;
    1077             : }
    1078             : 
    1079           0 : sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd(  ) throw(SQLException, RuntimeException, std::exception)
    1080             : {
    1081             :     SQLUSMALLINT nValue;
    1082           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this);
    1083           0 :     return nValue == SQL_NC_END;
    1084             : }
    1085             : 
    1086           0 : sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart(  ) throw(SQLException, RuntimeException, std::exception)
    1087             : {
    1088             :     SQLUSMALLINT nValue;
    1089           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this);
    1090           0 :     return nValue == SQL_NC_START;
    1091             : }
    1092             : 
    1093           0 : sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh(  ) throw(SQLException, RuntimeException, std::exception)
    1094             : {
    1095             :     SQLUSMALLINT nValue;
    1096           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this);
    1097           0 :     return nValue == SQL_NC_HIGH;
    1098             : }
    1099             : 
    1100           0 : sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow(  ) throw(SQLException, RuntimeException, std::exception)
    1101             : {
    1102             :     SQLUSMALLINT nValue;
    1103           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this);
    1104           0 :     return nValue == SQL_NC_LOW;
    1105             : }
    1106             : 
    1107           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls(  ) throw(SQLException, RuntimeException, std::exception)
    1108             : {
    1109             :     SQLUINTEGER nValue;
    1110           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this);
    1111           0 :     return (nValue & SQL_SU_PROCEDURE_INVOCATION) == SQL_SU_PROCEDURE_INVOCATION;
    1112             : }
    1113             : 
    1114           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException, std::exception)
    1115             : {
    1116             :     SQLUINTEGER nValue;
    1117           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this);
    1118           0 :     return (nValue & SQL_SU_PRIVILEGE_DEFINITION) == SQL_SU_PRIVILEGE_DEFINITION;
    1119             : }
    1120             : 
    1121           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls(  ) throw(SQLException, RuntimeException, std::exception)
    1122             : {
    1123           0 :     SQLUINTEGER nValue=0;
    1124           0 :     if(m_bUseCatalog)
    1125           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this);
    1126           0 :     return (nValue & SQL_CU_PROCEDURE_INVOCATION) == SQL_CU_PROCEDURE_INVOCATION;
    1127             : }
    1128             : 
    1129           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException, std::exception)
    1130             : {
    1131           0 :     SQLUINTEGER nValue=0;
    1132           0 :     if(m_bUseCatalog)
    1133           0 :         OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this);
    1134           0 :     return (nValue & SQL_CU_PRIVILEGE_DEFINITION) == SQL_CU_PRIVILEGE_DEFINITION;
    1135             : }
    1136             : 
    1137           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries(  ) throw(SQLException, RuntimeException, std::exception)
    1138             : {
    1139             :     SQLUINTEGER nValue;
    1140           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
    1141           0 :     return (nValue & SQL_SQ_CORRELATED_SUBQUERIES) == SQL_SQ_CORRELATED_SUBQUERIES;
    1142             : }
    1143             : 
    1144           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons(  ) throw(SQLException, RuntimeException, std::exception)
    1145             : {
    1146             :     SQLUINTEGER nValue;
    1147           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
    1148           0 :     return (nValue & SQL_SQ_COMPARISON) == SQL_SQ_COMPARISON;
    1149             : }
    1150             : 
    1151           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists(  ) throw(SQLException, RuntimeException, std::exception)
    1152             : {
    1153             :     SQLUINTEGER nValue;
    1154           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
    1155           0 :     return (nValue & SQL_SQ_EXISTS) == SQL_SQ_EXISTS;
    1156             : }
    1157             : 
    1158           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns(  ) throw(SQLException, RuntimeException, std::exception)
    1159             : {
    1160             :     SQLUINTEGER nValue;
    1161           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
    1162           0 :     return (nValue & SQL_SQ_IN) == SQL_SQ_IN;
    1163             : }
    1164             : 
    1165           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds(  ) throw(SQLException, RuntimeException, std::exception)
    1166             : {
    1167             :     SQLUINTEGER nValue;
    1168           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
    1169           0 :     return (nValue & SQL_SQ_QUANTIFIED) == SQL_SQ_QUANTIFIED;
    1170             : }
    1171             : 
    1172           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL(  ) throw(SQLException, RuntimeException, std::exception)
    1173             : {
    1174             :     SQLUINTEGER nValue;
    1175           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this);
    1176           0 :     return static_cast<bool>(nValue & SQL_SC_SQL92_INTERMEDIATE);
    1177             : }
    1178             : 
    1179           0 : OUString ODatabaseMetaData::getURLImpl()
    1180             : {
    1181           0 :     OUString aValue;
    1182           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DATA_SOURCE_NAME,aValue,*this,m_pConnection->getTextEncoding());
    1183           0 :     return aValue;
    1184             : }
    1185             : 
    1186           0 : OUString SAL_CALL ODatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException, std::exception)
    1187             : {
    1188           0 :     OUString aValue = m_pConnection->getURL();
    1189           0 :     if ( aValue.isEmpty() )
    1190             :     {
    1191           0 :         aValue = "sdbc:odbc:" + getURLImpl();
    1192             :     }
    1193           0 :     return aValue;
    1194             : }
    1195             : 
    1196           0 : OUString SAL_CALL ODatabaseMetaData::getUserName(  ) throw(SQLException, RuntimeException, std::exception)
    1197             : {
    1198           0 :     OUString aValue;
    1199           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_USER_NAME,aValue,*this,m_pConnection->getTextEncoding());
    1200           0 :     return aValue;
    1201             : }
    1202             : 
    1203           0 : OUString SAL_CALL ODatabaseMetaData::getDriverName(  ) throw(SQLException, RuntimeException, std::exception)
    1204             : {
    1205           0 :     OUString aValue;
    1206           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_NAME,aValue,*this,m_pConnection->getTextEncoding());
    1207           0 :     return aValue;
    1208             : }
    1209             : 
    1210           0 : OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException, std::exception)
    1211             : {
    1212           0 :     OUString aValue;
    1213           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_ODBC_VER,aValue,*this,m_pConnection->getTextEncoding());
    1214           0 :     return aValue;
    1215             : }
    1216             : 
    1217           0 : OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  ) throw(SQLException, RuntimeException, std::exception)
    1218             : {
    1219           0 :     OUString aValue;
    1220           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding());
    1221           0 :     return aValue;
    1222             : }
    1223             : 
    1224           0 : OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  ) throw(SQLException, RuntimeException, std::exception)
    1225             : {
    1226           0 :     OUString aValue;
    1227           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DBMS_NAME,aValue,*this,m_pConnection->getTextEncoding());
    1228           0 :     return aValue;
    1229             : }
    1230             : 
    1231           0 : OUString SAL_CALL ODatabaseMetaData::getProcedureTerm(  ) throw(SQLException, RuntimeException, std::exception)
    1232             : {
    1233           0 :     OUString aValue;
    1234           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_PROCEDURE_TERM,aValue,*this,m_pConnection->getTextEncoding());
    1235           0 :     return aValue;
    1236             : }
    1237             : 
    1238           0 : OUString SAL_CALL ODatabaseMetaData::getSchemaTerm(  ) throw(SQLException, RuntimeException, std::exception)
    1239             : {
    1240           0 :     OUString aValue;
    1241           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_TERM,aValue,*this,m_pConnection->getTextEncoding());
    1242           0 :     return aValue;
    1243             : }
    1244             : 
    1245           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion(  ) throw(RuntimeException, std::exception) try
    1246             : {
    1247           0 :     OUString aValue;
    1248           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding());
    1249           0 :     return aValue.copy(0,aValue.indexOf('.')).toInt32();
    1250             : }
    1251           0 : catch (const SQLException &)
    1252             : {
    1253           0 :     return 0;
    1254             : }
    1255             : 
    1256           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation(  ) throw(SQLException, RuntimeException, std::exception)
    1257             : {
    1258             :     SQLUINTEGER nValue;
    1259             :     sal_Int32 nValueTranslated;
    1260           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DEFAULT_TXN_ISOLATION,nValue,*this);
    1261           0 :     switch(nValue)
    1262             :     {
    1263             :         case SQL_TXN_READ_UNCOMMITTED:
    1264           0 :             nValueTranslated = com::sun::star::sdbc::TransactionIsolation::READ_UNCOMMITTED;
    1265           0 :             break;
    1266             :         case SQL_TXN_READ_COMMITTED:
    1267           0 :             nValueTranslated = com::sun::star::sdbc::TransactionIsolation::READ_COMMITTED;
    1268           0 :             break;
    1269             :         case SQL_TXN_REPEATABLE_READ:
    1270           0 :             nValueTranslated = com::sun::star::sdbc::TransactionIsolation::REPEATABLE_READ;
    1271           0 :             break;
    1272             :         case  SQL_TXN_SERIALIZABLE:
    1273           0 :             nValueTranslated = com::sun::star::sdbc::TransactionIsolation::SERIALIZABLE;
    1274           0 :             break;
    1275             :         default:
    1276           0 :             nValueTranslated = 0;
    1277             :     }
    1278           0 :     return nValueTranslated;
    1279             : }
    1280             : 
    1281           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion(  ) throw(RuntimeException, std::exception) try
    1282             : {
    1283           0 :     OUString aValue;
    1284           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding());
    1285           0 :     return aValue.copy(0,aValue.lastIndexOf('.')).toInt32();
    1286             : }
    1287           0 : catch (const SQLException &)
    1288             : {
    1289           0 :     return 0;
    1290             : }
    1291             : 
    1292           0 : OUString SAL_CALL ODatabaseMetaData::getSQLKeywords(  ) throw(SQLException, RuntimeException, std::exception)
    1293             : {
    1294           0 :     OUString aValue;
    1295           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_KEYWORDS,aValue,*this,m_pConnection->getTextEncoding());
    1296           0 :     return aValue;
    1297             : }
    1298             : 
    1299           0 : OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape(  ) throw(SQLException, RuntimeException, std::exception)
    1300             : {
    1301           0 :     OUString aValue;
    1302           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SEARCH_PATTERN_ESCAPE,aValue,*this,m_pConnection->getTextEncoding());
    1303           0 :     return aValue;
    1304             : }
    1305             : 
    1306           0 : OUString SAL_CALL ODatabaseMetaData::getStringFunctions(  ) throw(SQLException, RuntimeException, std::exception)
    1307             : {
    1308             :     SQLUINTEGER nValue;
    1309           0 :     OUStringBuffer aValue;
    1310           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_STRING_FUNCTIONS,nValue,*this);
    1311           0 :     if(nValue & SQL_FN_STR_ASCII)
    1312           0 :         aValue.appendAscii("ASCII,");
    1313           0 :     if(nValue & SQL_FN_STR_BIT_LENGTH)
    1314           0 :         aValue.appendAscii("BIT_LENGTH,");
    1315           0 :     if(nValue & SQL_FN_STR_CHAR)
    1316           0 :         aValue.appendAscii("CHAR,");
    1317           0 :     if(nValue & SQL_FN_STR_CHAR_LENGTH)
    1318           0 :         aValue.appendAscii("CHAR_LENGTH,");
    1319           0 :     if(nValue & SQL_FN_STR_CHARACTER_LENGTH)
    1320           0 :         aValue.appendAscii("CHARACTER_LENGTH,");
    1321           0 :     if(nValue & SQL_FN_STR_CONCAT)
    1322           0 :         aValue.appendAscii("CONCAT,");
    1323           0 :     if(nValue & SQL_FN_STR_DIFFERENCE)
    1324           0 :         aValue.appendAscii("DIFFERENCE,");
    1325           0 :     if(nValue & SQL_FN_STR_INSERT)
    1326           0 :         aValue.appendAscii("INSERT,");
    1327           0 :     if(nValue & SQL_FN_STR_LCASE)
    1328           0 :         aValue.appendAscii("LCASE,");
    1329           0 :     if(nValue & SQL_FN_STR_LEFT)
    1330           0 :         aValue.appendAscii("LEFT,");
    1331           0 :     if(nValue & SQL_FN_STR_LENGTH)
    1332           0 :         aValue.appendAscii("LENGTH,");
    1333           0 :     if(nValue & SQL_FN_STR_LOCATE)
    1334           0 :         aValue.appendAscii("LOCATE,");
    1335           0 :     if(nValue & SQL_FN_STR_LOCATE_2)
    1336           0 :         aValue.appendAscii("LOCATE_2,");
    1337           0 :     if(nValue & SQL_FN_STR_LTRIM)
    1338           0 :         aValue.appendAscii("LTRIM,");
    1339           0 :     if(nValue & SQL_FN_STR_OCTET_LENGTH)
    1340           0 :         aValue.appendAscii("OCTET_LENGTH,");
    1341           0 :     if(nValue & SQL_FN_STR_POSITION)
    1342           0 :         aValue.appendAscii("POSITION,");
    1343           0 :     if(nValue & SQL_FN_STR_REPEAT)
    1344           0 :         aValue.appendAscii("REPEAT,");
    1345           0 :     if(nValue & SQL_FN_STR_REPLACE)
    1346           0 :         aValue.appendAscii("REPLACE,");
    1347           0 :     if(nValue & SQL_FN_STR_RIGHT)
    1348           0 :         aValue.appendAscii("RIGHT,");
    1349           0 :     if(nValue & SQL_FN_STR_RTRIM)
    1350           0 :         aValue.appendAscii("RTRIM,");
    1351           0 :     if(nValue & SQL_FN_STR_SOUNDEX)
    1352           0 :         aValue.appendAscii("SOUNDEX,");
    1353           0 :     if(nValue & SQL_FN_STR_SPACE)
    1354           0 :         aValue.appendAscii("SPACE,");
    1355           0 :     if(nValue & SQL_FN_STR_SUBSTRING)
    1356           0 :         aValue.appendAscii("SUBSTRING,");
    1357           0 :     if(nValue & SQL_FN_STR_UCASE)
    1358           0 :         aValue.appendAscii("UCASE,");
    1359             : 
    1360             : 
    1361           0 :     if ( !aValue.isEmpty() )
    1362           0 :         aValue.setLength(aValue.getLength()-1);
    1363             : 
    1364           0 :     return aValue.makeStringAndClear();
    1365             : }
    1366             : 
    1367           0 : OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions(  ) throw(SQLException, RuntimeException, std::exception)
    1368             : {
    1369             :     SQLUINTEGER nValue;
    1370           0 :     OUStringBuffer aValue;
    1371           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TIMEDATE_FUNCTIONS,nValue,*this);
    1372             : 
    1373           0 :     if(nValue & SQL_FN_TD_CURRENT_DATE)
    1374           0 :         aValue.appendAscii("CURRENT_DATE,");
    1375           0 :     if(nValue & SQL_FN_TD_CURRENT_TIME)
    1376           0 :         aValue.appendAscii("CURRENT_TIME,");
    1377           0 :     if(nValue & SQL_FN_TD_CURRENT_TIMESTAMP)
    1378           0 :         aValue.appendAscii("CURRENT_TIMESTAMP,");
    1379           0 :     if(nValue & SQL_FN_TD_CURDATE)
    1380           0 :         aValue.appendAscii("CURDATE,");
    1381           0 :     if(nValue & SQL_FN_TD_CURTIME)
    1382           0 :         aValue.appendAscii("CURTIME,");
    1383           0 :     if(nValue & SQL_FN_TD_DAYNAME)
    1384           0 :         aValue.appendAscii("DAYNAME,");
    1385           0 :     if(nValue & SQL_FN_TD_DAYOFMONTH)
    1386           0 :         aValue.appendAscii("DAYOFMONTH,");
    1387           0 :     if(nValue & SQL_FN_TD_DAYOFWEEK)
    1388           0 :         aValue.appendAscii("DAYOFWEEK,");
    1389           0 :     if(nValue & SQL_FN_TD_DAYOFYEAR)
    1390           0 :         aValue.appendAscii("DAYOFYEAR,");
    1391           0 :     if(nValue & SQL_FN_TD_EXTRACT)
    1392           0 :         aValue.appendAscii("EXTRACT,");
    1393           0 :     if(nValue & SQL_FN_TD_HOUR)
    1394           0 :         aValue.appendAscii("HOUR,");
    1395           0 :     if(nValue & SQL_FN_TD_MINUTE)
    1396           0 :         aValue.appendAscii("MINUTE,");
    1397           0 :     if(nValue & SQL_FN_TD_MONTH)
    1398           0 :         aValue.appendAscii("MONTH,");
    1399           0 :     if(nValue & SQL_FN_TD_MONTHNAME)
    1400           0 :         aValue.appendAscii("MONTHNAME,");
    1401           0 :     if(nValue & SQL_FN_TD_NOW)
    1402           0 :         aValue.appendAscii("NOW,");
    1403           0 :     if(nValue & SQL_FN_TD_QUARTER)
    1404           0 :         aValue.appendAscii("QUARTER,");
    1405           0 :     if(nValue & SQL_FN_TD_SECOND)
    1406           0 :         aValue.appendAscii("SECOND,");
    1407           0 :     if(nValue & SQL_FN_TD_TIMESTAMPADD)
    1408           0 :         aValue.appendAscii("TIMESTAMPADD,");
    1409           0 :     if(nValue & SQL_FN_TD_TIMESTAMPDIFF)
    1410           0 :         aValue.appendAscii("TIMESTAMPDIFF,");
    1411           0 :     if(nValue & SQL_FN_TD_WEEK)
    1412           0 :         aValue.appendAscii("WEEK,");
    1413           0 :     if(nValue & SQL_FN_TD_YEAR)
    1414           0 :         aValue.appendAscii("YEAR,");
    1415             : 
    1416           0 :     if ( !aValue.isEmpty() )
    1417           0 :         aValue.setLength(aValue.getLength()-1);
    1418             : 
    1419           0 :     return aValue.makeStringAndClear();
    1420             : }
    1421             : 
    1422           0 : OUString SAL_CALL ODatabaseMetaData::getSystemFunctions(  ) throw(SQLException, RuntimeException, std::exception)
    1423             : {
    1424             :     SQLUINTEGER nValue;
    1425           0 :     OUStringBuffer aValue;
    1426           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SYSTEM_FUNCTIONS,nValue,*this);
    1427             : 
    1428           0 :     if(nValue & SQL_FN_SYS_DBNAME)
    1429           0 :         aValue.appendAscii("DBNAME,");
    1430           0 :     if(nValue & SQL_FN_SYS_IFNULL)
    1431           0 :         aValue.appendAscii("IFNULL,");
    1432           0 :     if(nValue & SQL_FN_SYS_USERNAME)
    1433           0 :         aValue.appendAscii("USERNAME,");
    1434             : 
    1435           0 :     if ( !aValue.isEmpty() )
    1436           0 :         aValue.setLength(aValue.getLength()-1);
    1437             : 
    1438           0 :     return aValue.makeStringAndClear();
    1439             : }
    1440             : 
    1441           0 : OUString SAL_CALL ODatabaseMetaData::getNumericFunctions(  ) throw(SQLException, RuntimeException, std::exception)
    1442             : {
    1443             :     SQLUINTEGER nValue;
    1444           0 :     OUStringBuffer aValue;
    1445           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NUMERIC_FUNCTIONS,nValue,*this);
    1446             : 
    1447           0 :     if(nValue & SQL_FN_NUM_ABS)
    1448           0 :         aValue.appendAscii("ABS,");
    1449           0 :     if(nValue & SQL_FN_NUM_ACOS)
    1450           0 :         aValue.appendAscii("ACOS,");
    1451           0 :     if(nValue & SQL_FN_NUM_ASIN)
    1452           0 :         aValue.appendAscii("ASIN,");
    1453           0 :     if(nValue & SQL_FN_NUM_ATAN)
    1454           0 :         aValue.appendAscii("ATAN,");
    1455           0 :     if(nValue & SQL_FN_NUM_ATAN2)
    1456           0 :         aValue.appendAscii("ATAN2,");
    1457           0 :     if(nValue & SQL_FN_NUM_CEILING)
    1458           0 :         aValue.appendAscii("CEILING,");
    1459           0 :     if(nValue & SQL_FN_NUM_COS)
    1460           0 :         aValue.appendAscii("COS,");
    1461           0 :     if(nValue & SQL_FN_NUM_COT)
    1462           0 :         aValue.appendAscii("COT,");
    1463           0 :     if(nValue & SQL_FN_NUM_DEGREES)
    1464           0 :         aValue.appendAscii("DEGREES,");
    1465           0 :     if(nValue & SQL_FN_NUM_EXP)
    1466           0 :         aValue.appendAscii("EXP,");
    1467           0 :     if(nValue & SQL_FN_NUM_FLOOR)
    1468           0 :         aValue.appendAscii("FLOOR,");
    1469           0 :     if(nValue & SQL_FN_NUM_LOG)
    1470           0 :         aValue.appendAscii("LOGF,");
    1471           0 :     if(nValue & SQL_FN_NUM_LOG10)
    1472           0 :         aValue.appendAscii("LOG10,");
    1473           0 :     if(nValue & SQL_FN_NUM_MOD)
    1474           0 :         aValue.appendAscii("MOD,");
    1475           0 :     if(nValue & SQL_FN_NUM_PI)
    1476           0 :         aValue.appendAscii("PI,");
    1477           0 :     if(nValue & SQL_FN_NUM_POWER)
    1478           0 :         aValue.appendAscii("POWER,");
    1479           0 :     if(nValue & SQL_FN_NUM_RADIANS)
    1480           0 :         aValue.appendAscii("RADIANS,");
    1481           0 :     if(nValue & SQL_FN_NUM_RAND)
    1482           0 :         aValue.appendAscii("RAND,");
    1483           0 :     if(nValue & SQL_FN_NUM_ROUND)
    1484           0 :         aValue.appendAscii("ROUND,");
    1485           0 :     if(nValue & SQL_FN_NUM_SIGN)
    1486           0 :         aValue.appendAscii("SIGN,");
    1487           0 :     if(nValue & SQL_FN_NUM_SIN)
    1488           0 :         aValue.appendAscii("SIN,");
    1489           0 :     if(nValue & SQL_FN_NUM_SQRT)
    1490           0 :         aValue.appendAscii("SQRT,");
    1491           0 :     if(nValue & SQL_FN_NUM_TAN)
    1492           0 :         aValue.appendAscii("TAN,");
    1493           0 :     if(nValue & SQL_FN_NUM_TRUNCATE)
    1494           0 :         aValue.appendAscii("TRUNCATE,");
    1495             : 
    1496           0 :     if ( !aValue.isEmpty() )
    1497           0 :         aValue.setLength(aValue.getLength()-1);
    1498             : 
    1499           0 :     return aValue.makeStringAndClear();
    1500             : }
    1501             : 
    1502           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar(  ) throw(SQLException, RuntimeException, std::exception)
    1503             : {
    1504             :     SQLUINTEGER nValue;
    1505             :     // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
    1506           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ODBC_SQL_CONFORMANCE,nValue,*this);
    1507             :     SAL_WARN_IF(! (nValue == SQL_OSC_MINIMUM || nValue == SQL_OSC_CORE || nValue == SQL_OSC_EXTENDED),
    1508             :                 "connectivity.odbc",
    1509             :                 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
    1510           0 :     return nValue == SQL_OSC_EXTENDED;
    1511             : }
    1512             : 
    1513           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar(  ) throw(SQLException, RuntimeException, std::exception)
    1514             : {
    1515             :     SQLUINTEGER nValue;
    1516             :     // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
    1517           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ODBC_SQL_CONFORMANCE,nValue,*this);
    1518             :     SAL_WARN_IF(! (nValue == SQL_OSC_MINIMUM || nValue == SQL_OSC_CORE || nValue == SQL_OSC_EXTENDED),
    1519             :                 "connectivity.odbc",
    1520             :                 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
    1521           0 :     return nValue == SQL_OSC_CORE || nValue == SQL_OSC_EXTENDED;
    1522             : }
    1523             : 
    1524           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar(  ) throw(SQLException, RuntimeException, std::exception)
    1525             : {
    1526             :     SQLUINTEGER nValue;
    1527             :     // SQL_ODBC_SQL_CONFORMANCE is deprecated in ODBC 3.x, but there does not seem te be any equivalent.
    1528           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ODBC_SQL_CONFORMANCE,nValue,*this);
    1529             :     SAL_WARN_IF(! (nValue == SQL_OSC_MINIMUM || nValue == SQL_OSC_CORE || nValue == SQL_OSC_EXTENDED),
    1530             :                 "connectivity.odbc",
    1531             :                 "SQL_ODBC_SQL_CONFORMANCE is neither MINIMAL nor CORE nor EXTENDED");
    1532           0 :     return nValue == SQL_OSC_MINIMUM || nValue == SQL_OSC_CORE || nValue == SQL_OSC_EXTENDED;
    1533             : }
    1534             : 
    1535           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins(  ) throw(SQLException, RuntimeException, std::exception)
    1536             : {
    1537             :     SQLUINTEGER nValue;
    1538           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_OJ_CAPABILITIES,nValue,*this);
    1539           0 :     return (nValue & SQL_OJ_FULL) == SQL_OJ_FULL;
    1540             : }
    1541             : 
    1542           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins(  ) throw(SQLException, RuntimeException, std::exception)
    1543             : {
    1544           0 :     return supportsFullOuterJoins(  );
    1545             : }
    1546             : 
    1547           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy(  ) throw(SQLException, RuntimeException, std::exception)
    1548             : {
    1549             :     SQLUSMALLINT nValue;
    1550           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_GROUP_BY,nValue,*this);
    1551           0 :     return nValue;
    1552             : }
    1553             : 
    1554           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy(  ) throw(SQLException, RuntimeException, std::exception)
    1555             : {
    1556             :     SQLUSMALLINT nValue;
    1557           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_ORDER_BY,nValue,*this);
    1558           0 :     return nValue;
    1559             : }
    1560             : 
    1561           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect(  ) throw(SQLException, RuntimeException, std::exception)
    1562             : {
    1563             :     SQLUSMALLINT nValue;
    1564           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_SELECT,nValue,*this);
    1565           0 :     return nValue;
    1566             : }
    1567             : 
    1568           0 : sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength(  ) throw(SQLException, RuntimeException, std::exception)
    1569             : {
    1570             :     SQLUSMALLINT nValue;
    1571           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_USER_NAME_LEN,nValue,*this);
    1572           0 :     return nValue;
    1573             : }
    1574             : 
    1575           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1576             : {
    1577             :     SQLUINTEGER nValue;
    1578           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_SENSITIVITY,nValue,*this);
    1579           0 :     return (nValue & static_cast<SQLUINTEGER>(setType)) == static_cast<SQLUINTEGER>(setType);
    1580             : }
    1581             : 
    1582           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException, std::exception)
    1583             : {
    1584             :     SQLUINTEGER nValue;
    1585           0 :     SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
    1586           0 :     switch(setType)
    1587             :     {
    1588             :         default:
    1589             :         case ResultSetType::FORWARD_ONLY:
    1590           0 :             nAskFor = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2;
    1591           0 :             break;
    1592             :         case ResultSetType::SCROLL_INSENSITIVE:
    1593           0 :             nAskFor = SQL_STATIC_CURSOR_ATTRIBUTES2;
    1594           0 :             break;
    1595             :         case ResultSetType::SCROLL_SENSITIVE:
    1596           0 :             nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
    1597           0 :             break;
    1598             :     }
    1599             : 
    1600           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
    1601           0 :     bool bRet = false;
    1602           0 :     switch(concurrency)
    1603             :     {
    1604             :         case ResultSetConcurrency::READ_ONLY:
    1605           0 :             bRet = (nValue & SQL_CA2_READ_ONLY_CONCURRENCY) == SQL_CA2_READ_ONLY_CONCURRENCY;
    1606           0 :             break;
    1607             :         case ResultSetConcurrency::UPDATABLE:
    1608           0 :             bRet = (nValue & SQL_CA2_OPT_VALUES_CONCURRENCY) == SQL_CA2_OPT_VALUES_CONCURRENCY;
    1609           0 :             break;
    1610             :     }
    1611           0 :     return bRet;
    1612             : }
    1613             : 
    1614           0 : sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1615             : {
    1616             :     SQLUINTEGER nValue;
    1617           0 :     SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
    1618           0 :     switch(setType)
    1619             :     {
    1620             :         default:
    1621             :         case ResultSetType::FORWARD_ONLY:
    1622           0 :             nAskFor = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2;
    1623           0 :             break;
    1624             :         case ResultSetType::SCROLL_INSENSITIVE:
    1625           0 :             nAskFor = SQL_STATIC_CURSOR_ATTRIBUTES2;
    1626           0 :             break;
    1627             :         case ResultSetType::SCROLL_SENSITIVE:
    1628           0 :             nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
    1629           0 :             break;
    1630             :     }
    1631             : 
    1632           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
    1633           0 :     return (nValue & SQL_CA2_SENSITIVITY_UPDATES) == SQL_CA2_SENSITIVITY_UPDATES;
    1634             : }
    1635             : 
    1636           0 : sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1637             : {
    1638             :     SQLUINTEGER nValue;
    1639           0 :     SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
    1640           0 :     switch(setType)
    1641             :     {
    1642             :         default:
    1643             :         case ResultSetType::FORWARD_ONLY:
    1644           0 :             nAskFor = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2;
    1645           0 :             break;
    1646             :         case ResultSetType::SCROLL_INSENSITIVE:
    1647           0 :             nAskFor = SQL_STATIC_CURSOR_ATTRIBUTES2;
    1648           0 :             break;
    1649             :         case ResultSetType::SCROLL_SENSITIVE:
    1650           0 :             nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
    1651           0 :             break;
    1652             :     }
    1653             : 
    1654           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
    1655           0 :     return (nValue & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS;
    1656             : }
    1657             : 
    1658           0 : sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1659             : {
    1660             :     SQLUINTEGER nValue;
    1661           0 :     SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
    1662           0 :     switch(setType)
    1663             :     {
    1664             :         default:
    1665             :         case ResultSetType::FORWARD_ONLY:
    1666           0 :             nAskFor = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2;
    1667           0 :             break;
    1668             :         case ResultSetType::SCROLL_INSENSITIVE:
    1669           0 :             nAskFor = SQL_STATIC_CURSOR_ATTRIBUTES2;
    1670           0 :             break;
    1671             :         case ResultSetType::SCROLL_SENSITIVE:
    1672           0 :             nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
    1673           0 :             break;
    1674             :     }
    1675             : 
    1676           0 :     OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
    1677           0 :     return (nValue & SQL_CA2_SENSITIVITY_ADDITIONS) == SQL_CA2_SENSITIVITY_ADDITIONS;
    1678             : }
    1679             : 
    1680           0 : sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1681             : {
    1682           0 :     return ownUpdatesAreVisible(setType);
    1683             : }
    1684             : 
    1685           0 : sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1686             : {
    1687           0 :     return ownDeletesAreVisible(setType);
    1688             : }
    1689             : 
    1690           0 : sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
    1691             : {
    1692           0 :     return ownInsertsAreVisible(setType);
    1693             : }
    1694             : 
    1695           0 : sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
    1696             : {
    1697           0 :     return sal_False;
    1698             : }
    1699             : 
    1700           0 : sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
    1701             : {
    1702           0 :     return sal_False;
    1703             : }
    1704             : 
    1705           0 : sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException, std::exception)
    1706             : {
    1707           0 :     return sal_False;
    1708             : }
    1709             : 
    1710           0 : sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates(  ) throw(SQLException, RuntimeException, std::exception)
    1711             : {
    1712           0 :     return sal_False;
    1713             : }
    1714             : 
    1715           0 : Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException, std::exception)
    1716             : {
    1717           0 :     return NULL;
    1718             : }
    1719             : 
    1720             : 
    1721             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11