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

Generated by: LCOV version 1.10