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

Generated by: LCOV version 1.10