1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3*cdf0e10cSrcweir * 4*cdf0e10cSrcweir * Copyright 2008 by Sun Microsystems, Inc. 5*cdf0e10cSrcweir * 6*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 7*cdf0e10cSrcweir * 8*cdf0e10cSrcweir * $RCSfile: mysqlc_databasemetadata.cxx,v $ 9*cdf0e10cSrcweir * 10*cdf0e10cSrcweir * $Revision: 1.1.2.5 $ 11*cdf0e10cSrcweir * 12*cdf0e10cSrcweir * This file is part of OpenOffice.org. 13*cdf0e10cSrcweir * 14*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 15*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 16*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 17*cdf0e10cSrcweir * 18*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 19*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 20*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 22*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 23*cdf0e10cSrcweir * 24*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 25*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 26*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 27*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 28*cdf0e10cSrcweir ************************************************************************/ 29*cdf0e10cSrcweir #include "mysqlc_databasemetadata.hxx" 30*cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp> 31*cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetType.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/sdbc/TransactionIsolation.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/sdbc/KeyRule.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/sdbc/Deferrability.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/sdbc/IndexType.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/sdbc/BestRowScope.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/sdbc/ColumnType.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #include "mysqlc_general.hxx" 43*cdf0e10cSrcweir #include "mysqlc_statement.hxx" 44*cdf0e10cSrcweir #include "mysqlc_driver.hxx" 45*cdf0e10cSrcweir #include "mysqlc_preparedstatement.hxx" 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir #include <stdio.h> 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir using namespace connectivity::mysqlc; 50*cdf0e10cSrcweir using namespace com::sun::star::uno; 51*cdf0e10cSrcweir using namespace com::sun::star::lang; 52*cdf0e10cSrcweir using namespace com::sun::star::beans; 53*cdf0e10cSrcweir using namespace com::sun::star::sdbc; 54*cdf0e10cSrcweir using ::rtl::OUString; 55*cdf0e10cSrcweir using mysqlc_sdbc_driver::getStringFromAny; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir #include <preextstl.h> 58*cdf0e10cSrcweir #include <cppconn/connection.h> 59*cdf0e10cSrcweir #include <cppconn/resultset.h> 60*cdf0e10cSrcweir #include <cppconn/metadata.h> 61*cdf0e10cSrcweir #include <cppconn/statement.h> 62*cdf0e10cSrcweir #include <cppconn/prepared_statement.h> 63*cdf0e10cSrcweir #include <postextstl.h> 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir static ext_std::string wild("%"); 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir using ::rtl::OUStringToOString; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 70*cdf0e10cSrcweir void lcl_setRows_throw(const Reference< XResultSet >& _xResultSet,sal_Int32 _nType,const std::vector< std::vector< Any > >& _rRows) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir Reference< XInitialization> xIni(_xResultSet,UNO_QUERY); 73*cdf0e10cSrcweir Sequence< Any > aArgs(2); 74*cdf0e10cSrcweir aArgs[0] <<= _nType; 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir Sequence< Sequence< Any > > aRows(_rRows.size()); 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir std::vector< std::vector< Any > >::const_iterator aIter = _rRows.begin(); 79*cdf0e10cSrcweir Sequence< Any > * pRowsIter = aRows.getArray(); 80*cdf0e10cSrcweir Sequence< Any > * pRowsEnd = pRowsIter + aRows.getLength(); 81*cdf0e10cSrcweir for (; pRowsIter != pRowsEnd;++pRowsIter,++aIter) { 82*cdf0e10cSrcweir if (!aIter->empty()) { 83*cdf0e10cSrcweir Sequence<Any> aSeq(&(*aIter->begin()),aIter->size()); 84*cdf0e10cSrcweir (*pRowsIter) = aSeq; 85*cdf0e10cSrcweir } 86*cdf0e10cSrcweir } 87*cdf0e10cSrcweir aArgs[1] <<= aRows; 88*cdf0e10cSrcweir xIni->initialize(aArgs); 89*cdf0e10cSrcweir } 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::ODatabaseMetaData() -I- */ 93*cdf0e10cSrcweir ODatabaseMetaData::ODatabaseMetaData(OConnection& _rCon) 94*cdf0e10cSrcweir :m_rConnection(_rCon) 95*cdf0e10cSrcweir ,m_bUseCatalog(sal_True) 96*cdf0e10cSrcweir ,meta(_rCon.getConnectionSettings().cppConnection->getMetaData()) 97*cdf0e10cSrcweir ,identifier_quote_string_set(false) 98*cdf0e10cSrcweir { 99*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::ODatabaseMetaData"); 100*cdf0e10cSrcweir if (!m_rConnection.isCatalogUsed()) 101*cdf0e10cSrcweir { 102*cdf0e10cSrcweir osl_incrementInterlockedCount(&m_refCount); 103*cdf0e10cSrcweir m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); 104*cdf0e10cSrcweir osl_decrementInterlockedCount(&m_refCount); 105*cdf0e10cSrcweir } 106*cdf0e10cSrcweir } 107*cdf0e10cSrcweir /* }}} */ 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::~ODatabaseMetaData() -I- */ 111*cdf0e10cSrcweir ODatabaseMetaData::~ODatabaseMetaData() 112*cdf0e10cSrcweir { 113*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::~ODatabaseMetaData"); 114*cdf0e10cSrcweir } 115*cdf0e10cSrcweir /* }}} */ 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getStringMetaData() -I- */ 119*cdf0e10cSrcweir OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const ext_std::string& (sql::DatabaseMetaData::*_Method)() ) 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 122*cdf0e10cSrcweir OUString stringMetaData; 123*cdf0e10cSrcweir try { 124*cdf0e10cSrcweir stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); 125*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 126*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 127*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 128*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 129*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 130*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 131*cdf0e10cSrcweir } 132*cdf0e10cSrcweir return stringMetaData; 133*cdf0e10cSrcweir } 134*cdf0e10cSrcweir /* }}} */ 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getStringMetaData() -I- */ 138*cdf0e10cSrcweir OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, ext_std::string (sql::DatabaseMetaData::*_Method)() ) 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 141*cdf0e10cSrcweir OUString stringMetaData; 142*cdf0e10cSrcweir try { 143*cdf0e10cSrcweir stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); 144*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 145*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 146*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 147*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 148*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 149*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 150*cdf0e10cSrcweir } 151*cdf0e10cSrcweir return stringMetaData; 152*cdf0e10cSrcweir } 153*cdf0e10cSrcweir /* }}} */ 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getStringMetaData() -I- */ 157*cdf0e10cSrcweir OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ) 158*cdf0e10cSrcweir { 159*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 160*cdf0e10cSrcweir OUString stringMetaData; 161*cdf0e10cSrcweir try { 162*cdf0e10cSrcweir stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); 163*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 164*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 165*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 166*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 167*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 168*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 169*cdf0e10cSrcweir } 170*cdf0e10cSrcweir return stringMetaData; 171*cdf0e10cSrcweir } 172*cdf0e10cSrcweir /* }}} */ 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getStringMetaData() -I- */ 176*cdf0e10cSrcweir OUString ODatabaseMetaData::impl_getStringMetaData(const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ) 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 179*cdf0e10cSrcweir OUString stringMetaData; 180*cdf0e10cSrcweir try { 181*cdf0e10cSrcweir stringMetaData = mysqlc_sdbc_driver::convert((meta->*_Method)(), m_rConnection.getConnectionEncoding()); 182*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 183*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 184*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 185*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 186*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 187*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 188*cdf0e10cSrcweir } 189*cdf0e10cSrcweir return stringMetaData; 190*cdf0e10cSrcweir } 191*cdf0e10cSrcweir /* }}} */ 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getInt32MetaData() -I- */ 195*cdf0e10cSrcweir sal_Int32 ODatabaseMetaData::impl_getInt32MetaData(const sal_Char* _methodName, unsigned int (sql::DatabaseMetaData::*_Method)() ) 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 198*cdf0e10cSrcweir sal_Int32 int32MetaData(0); 199*cdf0e10cSrcweir try { 200*cdf0e10cSrcweir int32MetaData = (meta->*_Method)(); 201*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 202*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 203*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 204*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 205*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 206*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 207*cdf0e10cSrcweir } 208*cdf0e10cSrcweir return int32MetaData; 209*cdf0e10cSrcweir } 210*cdf0e10cSrcweir /* }}} */ 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getBoolMetaData() -I- */ 214*cdf0e10cSrcweir sal_Bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool (sql::DatabaseMetaData::*_Method)() ) 215*cdf0e10cSrcweir { 216*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 217*cdf0e10cSrcweir sal_Bool boolMetaData(0); 218*cdf0e10cSrcweir try { 219*cdf0e10cSrcweir boolMetaData = (meta->*_Method)() ? sal_True : sal_False; 220*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 221*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 222*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 223*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 224*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 225*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 226*cdf0e10cSrcweir } 227*cdf0e10cSrcweir return boolMetaData; 228*cdf0e10cSrcweir } 229*cdf0e10cSrcweir /* }}} */ 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getBoolMetaData() -I- */ 233*cdf0e10cSrcweir sal_Bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool (sql::DatabaseMetaData::*_Method)(int), sal_Int32 _arg ) 234*cdf0e10cSrcweir { 235*cdf0e10cSrcweir OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); 236*cdf0e10cSrcweir sal_Bool boolMetaData(0); 237*cdf0e10cSrcweir try { 238*cdf0e10cSrcweir boolMetaData = (meta->*_Method)( _arg ) ? sal_True : sal_False; 239*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 240*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); 241*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 242*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException(_methodName, *this); 243*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 244*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 245*cdf0e10cSrcweir } 246*cdf0e10cSrcweir return boolMetaData; 247*cdf0e10cSrcweir } 248*cdf0e10cSrcweir /* }}} */ 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::impl_getRSTypeMetaData() -I- */ 252*cdf0e10cSrcweir sal_Bool ODatabaseMetaData::impl_getRSTypeMetaData(const sal_Char* _methodName, bool (sql::DatabaseMetaData::*_Method)(int), sal_Int32 _resultSetType ) 253*cdf0e10cSrcweir { 254*cdf0e10cSrcweir int resultSetType(sql::ResultSet::TYPE_FORWARD_ONLY); 255*cdf0e10cSrcweir switch ( _resultSetType ) { 256*cdf0e10cSrcweir case ResultSetType::SCROLL_INSENSITIVE: resultSetType = sql::ResultSet::TYPE_SCROLL_INSENSITIVE; break; 257*cdf0e10cSrcweir case ResultSetType::SCROLL_SENSITIVE: resultSetType = sql::ResultSet::TYPE_SCROLL_SENSITIVE; break; 258*cdf0e10cSrcweir } 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir return impl_getBoolMetaData(_methodName, _Method, resultSetType); 261*cdf0e10cSrcweir } 262*cdf0e10cSrcweir /* }}} */ 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir 265*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getCatalogSeparator() -I- */ 266*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator() 267*cdf0e10cSrcweir throw(SQLException, RuntimeException) 268*cdf0e10cSrcweir { 269*cdf0e10cSrcweir return impl_getStringMetaData("getCatalogSeparator", &sql::DatabaseMetaData::getCatalogSeparator); 270*cdf0e10cSrcweir } 271*cdf0e10cSrcweir /* }}} */ 272*cdf0e10cSrcweir 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxBinaryLiteralLength() -I- */ 275*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength() 276*cdf0e10cSrcweir throw(SQLException, RuntimeException) 277*cdf0e10cSrcweir { 278*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxBinaryLiteralLength", &sql::DatabaseMetaData::getMaxBinaryLiteralLength); 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir /* }}} */ 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxRowSize() -I- */ 284*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize() 285*cdf0e10cSrcweir throw(SQLException, RuntimeException) 286*cdf0e10cSrcweir { 287*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxRowSize", &sql::DatabaseMetaData::getMaxRowSize); 288*cdf0e10cSrcweir } 289*cdf0e10cSrcweir /* }}} */ 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxCatalogNameLength() -I- */ 293*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength() 294*cdf0e10cSrcweir throw(SQLException, RuntimeException) 295*cdf0e10cSrcweir { 296*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxCatalogNameLength", &sql::DatabaseMetaData::getMaxCatalogNameLength); 297*cdf0e10cSrcweir } 298*cdf0e10cSrcweir /* }}} */ 299*cdf0e10cSrcweir 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxCharLiteralLength() -I- */ 302*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength() 303*cdf0e10cSrcweir throw(SQLException, RuntimeException) 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxCharLiteralLength", &sql::DatabaseMetaData::getMaxCharLiteralLength); 306*cdf0e10cSrcweir } 307*cdf0e10cSrcweir /* }}} */ 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnNameLength() -I- */ 311*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength() 312*cdf0e10cSrcweir throw(SQLException, RuntimeException) 313*cdf0e10cSrcweir { 314*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnNameLength", &sql::DatabaseMetaData::getMaxColumnNameLength); 315*cdf0e10cSrcweir } 316*cdf0e10cSrcweir /* }}} */ 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnsInIndex() -I- */ 320*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex() 321*cdf0e10cSrcweir throw(SQLException, RuntimeException) 322*cdf0e10cSrcweir { 323*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnsInIndex", &sql::DatabaseMetaData::getMaxColumnsInIndex); 324*cdf0e10cSrcweir } 325*cdf0e10cSrcweir /* }}} */ 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir 328*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxCursorNameLength() -I- */ 329*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength() 330*cdf0e10cSrcweir throw(SQLException, RuntimeException) 331*cdf0e10cSrcweir { 332*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxCursorNameLength", &sql::DatabaseMetaData::getMaxCursorNameLength); 333*cdf0e10cSrcweir } 334*cdf0e10cSrcweir /* }}} */ 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxConnections() -I- */ 338*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections() 339*cdf0e10cSrcweir throw(SQLException, RuntimeException) 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxConnections", &sql::DatabaseMetaData::getMaxConnections); 342*cdf0e10cSrcweir } 343*cdf0e10cSrcweir /* }}} */ 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnsInTable() -I- */ 347*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable() 348*cdf0e10cSrcweir throw(SQLException, RuntimeException) 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnsInTable", &sql::DatabaseMetaData::getMaxColumnsInTable); 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir /* }}} */ 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxStatementLength() -I- */ 356*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength() 357*cdf0e10cSrcweir throw(SQLException, RuntimeException) 358*cdf0e10cSrcweir { 359*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxStatementLength", &sql::DatabaseMetaData::getMaxStatementLength); 360*cdf0e10cSrcweir } 361*cdf0e10cSrcweir /* }}} */ 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxTableNameLength() -I- */ 365*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength() 366*cdf0e10cSrcweir throw(SQLException, RuntimeException) 367*cdf0e10cSrcweir { 368*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxTableNameLength", &sql::DatabaseMetaData::getMaxTableNameLength); 369*cdf0e10cSrcweir } 370*cdf0e10cSrcweir /* }}} */ 371*cdf0e10cSrcweir 372*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxTablesInSelect() -I- */ 373*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect() 374*cdf0e10cSrcweir throw(SQLException, RuntimeException) 375*cdf0e10cSrcweir { 376*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxTablesInSelect", &sql::DatabaseMetaData::getMaxTablesInSelect); 377*cdf0e10cSrcweir } 378*cdf0e10cSrcweir /* }}} */ 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::doesMaxRowSizeIncludeBlobs() -I- */ 382*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs() 383*cdf0e10cSrcweir throw(SQLException, RuntimeException) 384*cdf0e10cSrcweir { 385*cdf0e10cSrcweir return impl_getBoolMetaData("doesMaxRowSizeIncludeBlobs", &sql::DatabaseMetaData::doesMaxRowSizeIncludeBlobs); 386*cdf0e10cSrcweir } 387*cdf0e10cSrcweir /* }}} */ 388*cdf0e10cSrcweir 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesLowerCaseQuotedIdentifiers() -I- */ 391*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers() 392*cdf0e10cSrcweir throw(SQLException, RuntimeException) 393*cdf0e10cSrcweir { 394*cdf0e10cSrcweir return impl_getBoolMetaData("storesLowerCaseQuotedIdentifiers", &sql::DatabaseMetaData::storesLowerCaseQuotedIdentifiers); 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir /* }}} */ 397*cdf0e10cSrcweir 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesLowerCaseIdentifiers() -I- */ 400*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers() 401*cdf0e10cSrcweir throw(SQLException, RuntimeException) 402*cdf0e10cSrcweir { 403*cdf0e10cSrcweir return impl_getBoolMetaData("storesLowerCaseIdentifiers", &sql::DatabaseMetaData::storesLowerCaseIdentifiers); 404*cdf0e10cSrcweir } 405*cdf0e10cSrcweir /* }}} */ 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesMixedCaseQuotedIdentifiers() -I- */ 409*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers() 410*cdf0e10cSrcweir throw(SQLException, RuntimeException) 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir return impl_getBoolMetaData("storesMixedCaseQuotedIdentifiers", &sql::DatabaseMetaData::storesMixedCaseQuotedIdentifiers); 413*cdf0e10cSrcweir } 414*cdf0e10cSrcweir /* }}} */ 415*cdf0e10cSrcweir 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesMixedCaseIdentifiers() -I- */ 418*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers() 419*cdf0e10cSrcweir throw(SQLException, RuntimeException) 420*cdf0e10cSrcweir { 421*cdf0e10cSrcweir return impl_getBoolMetaData("storesMixedCaseIdentifiers", &sql::DatabaseMetaData::storesMixedCaseIdentifiers); 422*cdf0e10cSrcweir } 423*cdf0e10cSrcweir /* }}} */ 424*cdf0e10cSrcweir 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesUpperCaseQuotedIdentifiers() -I- */ 427*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers() 428*cdf0e10cSrcweir throw(SQLException, RuntimeException) 429*cdf0e10cSrcweir { 430*cdf0e10cSrcweir return impl_getBoolMetaData("storesUpperCaseQuotedIdentifiers", &sql::DatabaseMetaData::storesUpperCaseQuotedIdentifiers); 431*cdf0e10cSrcweir } 432*cdf0e10cSrcweir /* }}} */ 433*cdf0e10cSrcweir 434*cdf0e10cSrcweir 435*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::storesUpperCaseIdentifiers() -I- */ 436*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers() 437*cdf0e10cSrcweir throw(SQLException, RuntimeException) 438*cdf0e10cSrcweir { 439*cdf0e10cSrcweir return impl_getBoolMetaData("storesUpperCaseIdentifiers", &sql::DatabaseMetaData::storesUpperCaseIdentifiers); 440*cdf0e10cSrcweir } 441*cdf0e10cSrcweir /* }}} */ 442*cdf0e10cSrcweir 443*cdf0e10cSrcweir 444*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsAlterTableWithAddColumn() -I- */ 445*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn() 446*cdf0e10cSrcweir throw(SQLException, RuntimeException) 447*cdf0e10cSrcweir { 448*cdf0e10cSrcweir return impl_getBoolMetaData("supportsAlterTableWithAddColumn", &sql::DatabaseMetaData::supportsAlterTableWithAddColumn); 449*cdf0e10cSrcweir } 450*cdf0e10cSrcweir /* }}} */ 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir 453*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsAlterTableWithDropColumn() -I- */ 454*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithDropColumn() 455*cdf0e10cSrcweir throw(SQLException, RuntimeException) 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir return impl_getBoolMetaData("supportsAlterTableWithDropColumn", &sql::DatabaseMetaData::supportsAlterTableWithDropColumn); 458*cdf0e10cSrcweir } 459*cdf0e10cSrcweir /* }}} */ 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxIndexLength() -I- */ 463*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength() 464*cdf0e10cSrcweir throw(SQLException, RuntimeException) 465*cdf0e10cSrcweir { 466*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxIndexLength", &sql::DatabaseMetaData::getMaxIndexLength); 467*cdf0e10cSrcweir } 468*cdf0e10cSrcweir /* }}} */ 469*cdf0e10cSrcweir 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsNonNullableColumns() -I- */ 472*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns() 473*cdf0e10cSrcweir throw(SQLException, RuntimeException) 474*cdf0e10cSrcweir { 475*cdf0e10cSrcweir return impl_getBoolMetaData("supportsNonNullableColumns", &sql::DatabaseMetaData::supportsNonNullableColumns); 476*cdf0e10cSrcweir } 477*cdf0e10cSrcweir /* }}} */ 478*cdf0e10cSrcweir 479*cdf0e10cSrcweir 480*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getCatalogTerm() -I- */ 481*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() 482*cdf0e10cSrcweir throw(SQLException, RuntimeException) 483*cdf0e10cSrcweir { 484*cdf0e10cSrcweir return impl_getStringMetaData("getCatalogTerm", &sql::DatabaseMetaData::getCatalogTerm); 485*cdf0e10cSrcweir } 486*cdf0e10cSrcweir /* }}} */ 487*cdf0e10cSrcweir 488*cdf0e10cSrcweir 489*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getIdentifierQuoteString() -I- */ 490*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() 491*cdf0e10cSrcweir throw(SQLException, RuntimeException) 492*cdf0e10cSrcweir { 493*cdf0e10cSrcweir if (identifier_quote_string_set == false) { 494*cdf0e10cSrcweir identifier_quote_string = impl_getStringMetaData("getIdentifierQuoteString", &sql::DatabaseMetaData::getIdentifierQuoteString); 495*cdf0e10cSrcweir identifier_quote_string_set = true; 496*cdf0e10cSrcweir } 497*cdf0e10cSrcweir return identifier_quote_string; 498*cdf0e10cSrcweir } 499*cdf0e10cSrcweir /* }}} */ 500*cdf0e10cSrcweir 501*cdf0e10cSrcweir 502*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getExtraNameCharacters() -I- */ 503*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters() 504*cdf0e10cSrcweir throw(SQLException, RuntimeException) 505*cdf0e10cSrcweir { 506*cdf0e10cSrcweir return impl_getStringMetaData("getExtraNameCharacters", &sql::DatabaseMetaData::getExtraNameCharacters); 507*cdf0e10cSrcweir } 508*cdf0e10cSrcweir /* }}} */ 509*cdf0e10cSrcweir 510*cdf0e10cSrcweir 511*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsDifferentTableCorrelationNames() -I- */ 512*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames() 513*cdf0e10cSrcweir throw(SQLException, RuntimeException) 514*cdf0e10cSrcweir { 515*cdf0e10cSrcweir return impl_getBoolMetaData("supportsDifferentTableCorrelationNames", &sql::DatabaseMetaData::supportsDifferentTableCorrelationNames); 516*cdf0e10cSrcweir } 517*cdf0e10cSrcweir /* }}} */ 518*cdf0e10cSrcweir 519*cdf0e10cSrcweir 520*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::isCatalogAtStart() -I- */ 521*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart() 522*cdf0e10cSrcweir throw(SQLException, RuntimeException) 523*cdf0e10cSrcweir { 524*cdf0e10cSrcweir return impl_getBoolMetaData("isCatalogAtStart", &sql::DatabaseMetaData::isCatalogAtStart); 525*cdf0e10cSrcweir } 526*cdf0e10cSrcweir /* }}} */ 527*cdf0e10cSrcweir 528*cdf0e10cSrcweir 529*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::dataDefinitionIgnoredInTransactions() -I- */ 530*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions() 531*cdf0e10cSrcweir throw(SQLException, RuntimeException) 532*cdf0e10cSrcweir { 533*cdf0e10cSrcweir return impl_getBoolMetaData("dataDefinitionIgnoredInTransactions", &sql::DatabaseMetaData::dataDefinitionIgnoredInTransactions); 534*cdf0e10cSrcweir } 535*cdf0e10cSrcweir /* }}} */ 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir 538*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::dataDefinitionCausesTransactionCommit() -I- */ 539*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit() 540*cdf0e10cSrcweir throw(SQLException, RuntimeException) 541*cdf0e10cSrcweir { 542*cdf0e10cSrcweir return impl_getBoolMetaData("dataDefinitionCausesTransactionCommit", &sql::DatabaseMetaData::dataDefinitionCausesTransactionCommit); 543*cdf0e10cSrcweir } 544*cdf0e10cSrcweir /* }}} */ 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir 547*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsDataManipulationTransactionsOnly() -I- */ 548*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly() 549*cdf0e10cSrcweir throw(SQLException, RuntimeException) 550*cdf0e10cSrcweir { 551*cdf0e10cSrcweir return impl_getBoolMetaData("supportsDataManipulationTransactionsOnly", &sql::DatabaseMetaData::supportsDataManipulationTransactionsOnly); 552*cdf0e10cSrcweir } 553*cdf0e10cSrcweir /* }}} */ 554*cdf0e10cSrcweir 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions() -I- */ 557*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions() 558*cdf0e10cSrcweir throw(SQLException, RuntimeException) 559*cdf0e10cSrcweir { 560*cdf0e10cSrcweir return impl_getBoolMetaData("supportsDataDefinitionAndDataManipulationTransactions", &sql::DatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions); 561*cdf0e10cSrcweir } 562*cdf0e10cSrcweir /* }}} */ 563*cdf0e10cSrcweir 564*cdf0e10cSrcweir 565*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsPositionedDelete() -I- */ 566*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete() 567*cdf0e10cSrcweir throw(SQLException, RuntimeException) 568*cdf0e10cSrcweir { 569*cdf0e10cSrcweir return impl_getBoolMetaData("supportsPositionedDelete", &sql::DatabaseMetaData::supportsPositionedDelete); 570*cdf0e10cSrcweir } 571*cdf0e10cSrcweir /* }}} */ 572*cdf0e10cSrcweir 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsPositionedUpdate() -I- */ 575*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate() 576*cdf0e10cSrcweir throw(SQLException, RuntimeException) 577*cdf0e10cSrcweir { 578*cdf0e10cSrcweir return impl_getBoolMetaData("supportsPositionedUpdate", &sql::DatabaseMetaData::supportsPositionedUpdate); 579*cdf0e10cSrcweir } 580*cdf0e10cSrcweir /* }}} */ 581*cdf0e10cSrcweir 582*cdf0e10cSrcweir 583*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOpenStatementsAcrossRollback() -I- */ 584*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback() 585*cdf0e10cSrcweir throw(SQLException, RuntimeException) 586*cdf0e10cSrcweir { 587*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOpenStatementsAcrossRollback", &sql::DatabaseMetaData::supportsOpenStatementsAcrossRollback); 588*cdf0e10cSrcweir } 589*cdf0e10cSrcweir /* }}} */ 590*cdf0e10cSrcweir 591*cdf0e10cSrcweir 592*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOpenStatementsAcrossCommit() -I- */ 593*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit() 594*cdf0e10cSrcweir throw(SQLException, RuntimeException) 595*cdf0e10cSrcweir { 596*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOpenStatementsAcrossCommit", &sql::DatabaseMetaData::supportsOpenStatementsAcrossCommit); 597*cdf0e10cSrcweir } 598*cdf0e10cSrcweir /* }}} */ 599*cdf0e10cSrcweir 600*cdf0e10cSrcweir 601*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOpenCursorsAcrossCommit() -I- */ 602*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit() 603*cdf0e10cSrcweir throw(SQLException, RuntimeException) 604*cdf0e10cSrcweir { 605*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOpenCursorsAcrossCommit", &sql::DatabaseMetaData::supportsOpenCursorsAcrossCommit); 606*cdf0e10cSrcweir } 607*cdf0e10cSrcweir /* }}} */ 608*cdf0e10cSrcweir 609*cdf0e10cSrcweir 610*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOpenCursorsAcrossRollback() -I- */ 611*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback() 612*cdf0e10cSrcweir throw(SQLException, RuntimeException) 613*cdf0e10cSrcweir { 614*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOpenCursorsAcrossRollback", &sql::DatabaseMetaData::supportsOpenCursorsAcrossRollback); 615*cdf0e10cSrcweir } 616*cdf0e10cSrcweir /* }}} */ 617*cdf0e10cSrcweir 618*cdf0e10cSrcweir 619*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsTransactionIsolationLevel() -I- */ 620*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel(sal_Int32 level) 621*cdf0e10cSrcweir throw(SQLException, RuntimeException) 622*cdf0e10cSrcweir { 623*cdf0e10cSrcweir return impl_getBoolMetaData("supportsTransactionIsolationLevel", &sql::DatabaseMetaData::supportsTransactionIsolationLevel, level); 624*cdf0e10cSrcweir } 625*cdf0e10cSrcweir /* }}} */ 626*cdf0e10cSrcweir 627*cdf0e10cSrcweir 628*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSchemasInDataManipulation() -I- */ 629*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInDataManipulation() 630*cdf0e10cSrcweir throw(SQLException, RuntimeException) 631*cdf0e10cSrcweir { 632*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSchemasInDataManipulation", &sql::DatabaseMetaData::supportsSchemasInDataManipulation); 633*cdf0e10cSrcweir } 634*cdf0e10cSrcweir /* }}} */ 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir 637*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsANSI92FullSQL() -I- */ 638*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL() 639*cdf0e10cSrcweir throw(SQLException, RuntimeException) 640*cdf0e10cSrcweir { 641*cdf0e10cSrcweir return impl_getBoolMetaData("supportsANSI92FullSQL", &sql::DatabaseMetaData::supportsANSI92FullSQL); 642*cdf0e10cSrcweir } 643*cdf0e10cSrcweir /* }}} */ 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir 646*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsANSI92EntryLevelSQL() -I- */ 647*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL() 648*cdf0e10cSrcweir throw(SQLException, RuntimeException) 649*cdf0e10cSrcweir { 650*cdf0e10cSrcweir return impl_getBoolMetaData("supportsANSI92EntryLevelSQL", &sql::DatabaseMetaData::supportsANSI92EntryLevelSQL); 651*cdf0e10cSrcweir } 652*cdf0e10cSrcweir /* }}} */ 653*cdf0e10cSrcweir 654*cdf0e10cSrcweir 655*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsIntegrityEnhancementFacility() -I- */ 656*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility() 657*cdf0e10cSrcweir throw(SQLException, RuntimeException) 658*cdf0e10cSrcweir { 659*cdf0e10cSrcweir return impl_getBoolMetaData("supportsIntegrityEnhancementFacility", &sql::DatabaseMetaData::supportsIntegrityEnhancementFacility); 660*cdf0e10cSrcweir } 661*cdf0e10cSrcweir /* }}} */ 662*cdf0e10cSrcweir 663*cdf0e10cSrcweir 664*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSchemasInIndexDefinitions() -I- */ 665*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions() 666*cdf0e10cSrcweir throw(SQLException, RuntimeException) 667*cdf0e10cSrcweir { 668*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSchemasInIndexDefinitions", &sql::DatabaseMetaData::supportsSchemasInIndexDefinitions); 669*cdf0e10cSrcweir } 670*cdf0e10cSrcweir /* }}} */ 671*cdf0e10cSrcweir 672*cdf0e10cSrcweir 673*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSchemasInTableDefinitions() -I- */ 674*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInTableDefinitions() 675*cdf0e10cSrcweir throw(SQLException, RuntimeException) 676*cdf0e10cSrcweir { 677*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSchemasInTableDefinitions", &sql::DatabaseMetaData::supportsSchemasInTableDefinitions); 678*cdf0e10cSrcweir } 679*cdf0e10cSrcweir /* }}} */ 680*cdf0e10cSrcweir 681*cdf0e10cSrcweir 682*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCatalogsInTableDefinitions() -I- */ 683*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInTableDefinitions() 684*cdf0e10cSrcweir throw(SQLException, RuntimeException) 685*cdf0e10cSrcweir { 686*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCatalogsInTableDefinitions", &sql::DatabaseMetaData::supportsCatalogsInTableDefinitions); 687*cdf0e10cSrcweir } 688*cdf0e10cSrcweir /* }}} */ 689*cdf0e10cSrcweir 690*cdf0e10cSrcweir 691*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCatalogsInIndexDefinitions() -I- */ 692*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions() 693*cdf0e10cSrcweir throw(SQLException, RuntimeException) 694*cdf0e10cSrcweir { 695*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCatalogsInIndexDefinitions", &sql::DatabaseMetaData::supportsCatalogsInIndexDefinitions); 696*cdf0e10cSrcweir } 697*cdf0e10cSrcweir /* }}} */ 698*cdf0e10cSrcweir 699*cdf0e10cSrcweir 700*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCatalogsInDataManipulation() -I- */ 701*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInDataManipulation() 702*cdf0e10cSrcweir throw(SQLException, RuntimeException) 703*cdf0e10cSrcweir { 704*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCatalogsInDataManipulation", &sql::DatabaseMetaData::supportsCatalogsInDataManipulation); 705*cdf0e10cSrcweir } 706*cdf0e10cSrcweir /* }}} */ 707*cdf0e10cSrcweir 708*cdf0e10cSrcweir 709*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOuterJoins() -I- */ 710*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins() 711*cdf0e10cSrcweir throw(SQLException, RuntimeException) 712*cdf0e10cSrcweir { 713*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOuterJoins", &sql::DatabaseMetaData::supportsOuterJoins); 714*cdf0e10cSrcweir } 715*cdf0e10cSrcweir /* }}} */ 716*cdf0e10cSrcweir 717*cdf0e10cSrcweir 718*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxStatements() -I- */ 719*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements() 720*cdf0e10cSrcweir throw(SQLException, RuntimeException) 721*cdf0e10cSrcweir { 722*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxStatements", &sql::DatabaseMetaData::getMaxStatements); 723*cdf0e10cSrcweir } 724*cdf0e10cSrcweir /* }}} */ 725*cdf0e10cSrcweir 726*cdf0e10cSrcweir 727*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxProcedureNameLength() -I- */ 728*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength() 729*cdf0e10cSrcweir throw(SQLException, RuntimeException) 730*cdf0e10cSrcweir { 731*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxProcedureNameLength", &sql::DatabaseMetaData::getMaxProcedureNameLength); 732*cdf0e10cSrcweir } 733*cdf0e10cSrcweir /* }}} */ 734*cdf0e10cSrcweir 735*cdf0e10cSrcweir 736*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxSchemaNameLength() -I- */ 737*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength() 738*cdf0e10cSrcweir throw(SQLException, RuntimeException) 739*cdf0e10cSrcweir { 740*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxSchemaNameLength", &sql::DatabaseMetaData::getMaxSchemaNameLength); 741*cdf0e10cSrcweir } 742*cdf0e10cSrcweir /* }}} */ 743*cdf0e10cSrcweir 744*cdf0e10cSrcweir 745*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsTransactions() -I- */ 746*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions() 747*cdf0e10cSrcweir throw(SQLException, RuntimeException) 748*cdf0e10cSrcweir { 749*cdf0e10cSrcweir return impl_getBoolMetaData("supportsTransactions", &sql::DatabaseMetaData::supportsTransactions); 750*cdf0e10cSrcweir } 751*cdf0e10cSrcweir /* }}} */ 752*cdf0e10cSrcweir 753*cdf0e10cSrcweir 754*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::allProceduresAreCallable() -I- */ 755*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable() 756*cdf0e10cSrcweir throw(SQLException, RuntimeException) 757*cdf0e10cSrcweir { 758*cdf0e10cSrcweir return impl_getBoolMetaData("allProceduresAreCallable", &sql::DatabaseMetaData::allProceduresAreCallable); 759*cdf0e10cSrcweir } 760*cdf0e10cSrcweir /* }}} */ 761*cdf0e10cSrcweir 762*cdf0e10cSrcweir 763*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsStoredProcedures() -I- */ 764*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures() 765*cdf0e10cSrcweir throw(SQLException, RuntimeException) 766*cdf0e10cSrcweir { 767*cdf0e10cSrcweir return impl_getBoolMetaData("supportsStoredProcedures", &sql::DatabaseMetaData::supportsStoredProcedures); 768*cdf0e10cSrcweir } 769*cdf0e10cSrcweir /* }}} */ 770*cdf0e10cSrcweir 771*cdf0e10cSrcweir 772*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSelectForUpdate() -I- */ 773*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate() 774*cdf0e10cSrcweir throw(SQLException, RuntimeException) 775*cdf0e10cSrcweir { 776*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSelectForUpdate", &sql::DatabaseMetaData::supportsSelectForUpdate); 777*cdf0e10cSrcweir } 778*cdf0e10cSrcweir /* }}} */ 779*cdf0e10cSrcweir 780*cdf0e10cSrcweir 781*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::allTablesAreSelectable() -I- */ 782*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable() 783*cdf0e10cSrcweir throw(SQLException, RuntimeException) 784*cdf0e10cSrcweir { 785*cdf0e10cSrcweir return impl_getBoolMetaData("allTablesAreSelectable", &sql::DatabaseMetaData::allTablesAreSelectable); 786*cdf0e10cSrcweir } 787*cdf0e10cSrcweir /* }}} */ 788*cdf0e10cSrcweir 789*cdf0e10cSrcweir 790*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::isReadOnly() -I- */ 791*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly() 792*cdf0e10cSrcweir throw(SQLException, RuntimeException) 793*cdf0e10cSrcweir { 794*cdf0e10cSrcweir return impl_getBoolMetaData("isReadOnly", &sql::DatabaseMetaData::isReadOnly); 795*cdf0e10cSrcweir } 796*cdf0e10cSrcweir /* }}} */ 797*cdf0e10cSrcweir 798*cdf0e10cSrcweir 799*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::usesLocalFiles() -I- */ 800*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles() 801*cdf0e10cSrcweir throw(SQLException, RuntimeException) 802*cdf0e10cSrcweir { 803*cdf0e10cSrcweir return impl_getBoolMetaData("usesLocalFiles", &sql::DatabaseMetaData::usesLocalFiles); 804*cdf0e10cSrcweir } 805*cdf0e10cSrcweir /* }}} */ 806*cdf0e10cSrcweir 807*cdf0e10cSrcweir 808*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::usesLocalFilePerTable() -I- */ 809*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable() 810*cdf0e10cSrcweir throw(SQLException, RuntimeException) 811*cdf0e10cSrcweir { 812*cdf0e10cSrcweir return impl_getBoolMetaData("usesLocalFilePerTable", &sql::DatabaseMetaData::usesLocalFilePerTable); 813*cdf0e10cSrcweir } 814*cdf0e10cSrcweir /* }}} */ 815*cdf0e10cSrcweir 816*cdf0e10cSrcweir 817*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsTypeConversion() -I- */ 818*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion() 819*cdf0e10cSrcweir throw(SQLException, RuntimeException) 820*cdf0e10cSrcweir { 821*cdf0e10cSrcweir return impl_getBoolMetaData("supportsTypeConversion", &sql::DatabaseMetaData::supportsTypeConversion); 822*cdf0e10cSrcweir } 823*cdf0e10cSrcweir /* }}} */ 824*cdf0e10cSrcweir 825*cdf0e10cSrcweir 826*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::nullPlusNonNullIsNull() -I- */ 827*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull() 828*cdf0e10cSrcweir throw(SQLException, RuntimeException) 829*cdf0e10cSrcweir { 830*cdf0e10cSrcweir return impl_getBoolMetaData("nullPlusNonNullIsNull", &sql::DatabaseMetaData::nullPlusNonNullIsNull); 831*cdf0e10cSrcweir } 832*cdf0e10cSrcweir /* }}} */ 833*cdf0e10cSrcweir 834*cdf0e10cSrcweir 835*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsColumnAliasing() -I- */ 836*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing() 837*cdf0e10cSrcweir throw(SQLException, RuntimeException) 838*cdf0e10cSrcweir { 839*cdf0e10cSrcweir return impl_getBoolMetaData("supportsColumnAliasing", &sql::DatabaseMetaData::supportsColumnAliasing); 840*cdf0e10cSrcweir } 841*cdf0e10cSrcweir /* }}} */ 842*cdf0e10cSrcweir 843*cdf0e10cSrcweir 844*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsTableCorrelationNames() -I- */ 845*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames() 846*cdf0e10cSrcweir throw(SQLException, RuntimeException) 847*cdf0e10cSrcweir { 848*cdf0e10cSrcweir return impl_getBoolMetaData("supportsTableCorrelationNames", &sql::DatabaseMetaData::supportsTableCorrelationNames); 849*cdf0e10cSrcweir } 850*cdf0e10cSrcweir /* }}} */ 851*cdf0e10cSrcweir 852*cdf0e10cSrcweir 853*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsConvert() -I- */ 854*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert(sal_Int32 /* fromType */, sal_Int32 /* toType */) 855*cdf0e10cSrcweir throw(SQLException, RuntimeException) 856*cdf0e10cSrcweir { 857*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::supportsConvert"); 858*cdf0e10cSrcweir try { 859*cdf0e10cSrcweir /* ToDo -> use supportsConvert( fromType, toType) */ 860*cdf0e10cSrcweir return meta->supportsConvert()? sal_True:sal_False; 861*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 862*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsConvert", *this); 863*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 864*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::supportsConvert", *this); 865*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 866*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 867*cdf0e10cSrcweir } 868*cdf0e10cSrcweir return sal_False; 869*cdf0e10cSrcweir } 870*cdf0e10cSrcweir /* }}} */ 871*cdf0e10cSrcweir 872*cdf0e10cSrcweir 873*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsExpressionsInOrderBy() -I- */ 874*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy() 875*cdf0e10cSrcweir throw(SQLException, RuntimeException) 876*cdf0e10cSrcweir { 877*cdf0e10cSrcweir return impl_getBoolMetaData("supportsExpressionsInOrderBy", &sql::DatabaseMetaData::supportsExpressionsInOrderBy); 878*cdf0e10cSrcweir } 879*cdf0e10cSrcweir /* }}} */ 880*cdf0e10cSrcweir 881*cdf0e10cSrcweir 882*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsGroupBy() -I- */ 883*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy() 884*cdf0e10cSrcweir throw(SQLException, RuntimeException) 885*cdf0e10cSrcweir { 886*cdf0e10cSrcweir return impl_getBoolMetaData("supportsGroupBy", &sql::DatabaseMetaData::supportsGroupBy); 887*cdf0e10cSrcweir } 888*cdf0e10cSrcweir /* }}} */ 889*cdf0e10cSrcweir 890*cdf0e10cSrcweir 891*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsGroupByBeyondSelect() -I- */ 892*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect() 893*cdf0e10cSrcweir throw(SQLException, RuntimeException) 894*cdf0e10cSrcweir { 895*cdf0e10cSrcweir return impl_getBoolMetaData("supportsGroupByBeyondSelect", &sql::DatabaseMetaData::supportsGroupByBeyondSelect); 896*cdf0e10cSrcweir } 897*cdf0e10cSrcweir /* }}} */ 898*cdf0e10cSrcweir 899*cdf0e10cSrcweir 900*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsGroupByUnrelated() -I- */ 901*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated() 902*cdf0e10cSrcweir throw(SQLException, RuntimeException) 903*cdf0e10cSrcweir { 904*cdf0e10cSrcweir return impl_getBoolMetaData("supportsGroupByUnrelated", &sql::DatabaseMetaData::supportsGroupByUnrelated); 905*cdf0e10cSrcweir } 906*cdf0e10cSrcweir /* }}} */ 907*cdf0e10cSrcweir 908*cdf0e10cSrcweir 909*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsMultipleTransactions() -I- */ 910*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions() 911*cdf0e10cSrcweir throw(SQLException, RuntimeException) 912*cdf0e10cSrcweir { 913*cdf0e10cSrcweir return impl_getBoolMetaData("supportsMultipleTransactions", &sql::DatabaseMetaData::supportsMultipleTransactions); 914*cdf0e10cSrcweir } 915*cdf0e10cSrcweir /* }}} */ 916*cdf0e10cSrcweir 917*cdf0e10cSrcweir 918*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsMultipleResultSets() -I- */ 919*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets() 920*cdf0e10cSrcweir throw(SQLException, RuntimeException) 921*cdf0e10cSrcweir { 922*cdf0e10cSrcweir return impl_getBoolMetaData("supportsMultipleResultSets", &sql::DatabaseMetaData::supportsMultipleResultSets); 923*cdf0e10cSrcweir } 924*cdf0e10cSrcweir /* }}} */ 925*cdf0e10cSrcweir 926*cdf0e10cSrcweir 927*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsLikeEscapeClause() -I- */ 928*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause() 929*cdf0e10cSrcweir throw(SQLException, RuntimeException) 930*cdf0e10cSrcweir { 931*cdf0e10cSrcweir return impl_getBoolMetaData("supportsLikeEscapeClause", &sql::DatabaseMetaData::supportsLikeEscapeClause); 932*cdf0e10cSrcweir } 933*cdf0e10cSrcweir /* }}} */ 934*cdf0e10cSrcweir 935*cdf0e10cSrcweir 936*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsOrderByUnrelated() -I- */ 937*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated() 938*cdf0e10cSrcweir throw(SQLException, RuntimeException) 939*cdf0e10cSrcweir { 940*cdf0e10cSrcweir return impl_getBoolMetaData("supportsOrderByUnrelated", &sql::DatabaseMetaData::supportsOrderByUnrelated); 941*cdf0e10cSrcweir } 942*cdf0e10cSrcweir /* }}} */ 943*cdf0e10cSrcweir 944*cdf0e10cSrcweir 945*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsUnion() -I- */ 946*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion() 947*cdf0e10cSrcweir throw(SQLException, RuntimeException) 948*cdf0e10cSrcweir { 949*cdf0e10cSrcweir return impl_getBoolMetaData("supportsUnion", &sql::DatabaseMetaData::supportsUnion); 950*cdf0e10cSrcweir } 951*cdf0e10cSrcweir /* }}} */ 952*cdf0e10cSrcweir 953*cdf0e10cSrcweir 954*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsUnionAll() -I- */ 955*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll() 956*cdf0e10cSrcweir throw(SQLException, RuntimeException) 957*cdf0e10cSrcweir { 958*cdf0e10cSrcweir return impl_getBoolMetaData("supportsUnionAll", &sql::DatabaseMetaData::supportsUnionAll); 959*cdf0e10cSrcweir } 960*cdf0e10cSrcweir /* }}} */ 961*cdf0e10cSrcweir 962*cdf0e10cSrcweir 963*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsMixedCaseIdentifiers() -I- */ 964*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers() 965*cdf0e10cSrcweir throw(SQLException, RuntimeException) 966*cdf0e10cSrcweir { 967*cdf0e10cSrcweir return impl_getBoolMetaData("supportsMixedCaseIdentifiers", &sql::DatabaseMetaData::supportsMixedCaseIdentifiers); 968*cdf0e10cSrcweir } 969*cdf0e10cSrcweir /* }}} */ 970*cdf0e10cSrcweir 971*cdf0e10cSrcweir 972*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers() -I- */ 973*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers() 974*cdf0e10cSrcweir throw(SQLException, RuntimeException) 975*cdf0e10cSrcweir { 976*cdf0e10cSrcweir return impl_getBoolMetaData("supportsMixedCaseQuotedIdentifiers", &sql::DatabaseMetaData::supportsMixedCaseQuotedIdentifiers); 977*cdf0e10cSrcweir } 978*cdf0e10cSrcweir /* }}} */ 979*cdf0e10cSrcweir 980*cdf0e10cSrcweir 981*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::nullsAreSortedAtEnd() -I- */ 982*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd() 983*cdf0e10cSrcweir throw(SQLException, RuntimeException) 984*cdf0e10cSrcweir { 985*cdf0e10cSrcweir return impl_getBoolMetaData("nullsAreSortedAtEnd", &sql::DatabaseMetaData::nullsAreSortedAtEnd); 986*cdf0e10cSrcweir } 987*cdf0e10cSrcweir /* }}} */ 988*cdf0e10cSrcweir 989*cdf0e10cSrcweir 990*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::nullsAreSortedAtStart() -I- */ 991*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart() 992*cdf0e10cSrcweir throw(SQLException, RuntimeException) 993*cdf0e10cSrcweir { 994*cdf0e10cSrcweir return impl_getBoolMetaData("nullsAreSortedAtStart", &sql::DatabaseMetaData::nullsAreSortedAtStart); 995*cdf0e10cSrcweir } 996*cdf0e10cSrcweir /* }}} */ 997*cdf0e10cSrcweir 998*cdf0e10cSrcweir 999*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::nullsAreSortedHigh() -I- */ 1000*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh() 1001*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1002*cdf0e10cSrcweir { 1003*cdf0e10cSrcweir return impl_getBoolMetaData("nullsAreSortedHigh", &sql::DatabaseMetaData::nullsAreSortedHigh); 1004*cdf0e10cSrcweir } 1005*cdf0e10cSrcweir /* }}} */ 1006*cdf0e10cSrcweir 1007*cdf0e10cSrcweir 1008*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::nullsAreSortedLow() -I- */ 1009*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow() 1010*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1011*cdf0e10cSrcweir { 1012*cdf0e10cSrcweir return impl_getBoolMetaData("nullsAreSortedLow", &sql::DatabaseMetaData::nullsAreSortedLow); 1013*cdf0e10cSrcweir } 1014*cdf0e10cSrcweir /* }}} */ 1015*cdf0e10cSrcweir 1016*cdf0e10cSrcweir 1017*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSchemasInProcedureCalls() -I- */ 1018*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls() 1019*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1020*cdf0e10cSrcweir { 1021*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSchemasInProcedureCalls", &sql::DatabaseMetaData::supportsSchemasInProcedureCalls); 1022*cdf0e10cSrcweir } 1023*cdf0e10cSrcweir /* }}} */ 1024*cdf0e10cSrcweir 1025*cdf0e10cSrcweir 1026*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions() -I- */ 1027*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions() 1028*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1029*cdf0e10cSrcweir { 1030*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSchemasInPrivilegeDefinitions", &sql::DatabaseMetaData::supportsSchemasInPrivilegeDefinitions); 1031*cdf0e10cSrcweir } 1032*cdf0e10cSrcweir /* }}} */ 1033*cdf0e10cSrcweir 1034*cdf0e10cSrcweir 1035*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCatalogsInProcedureCalls() -I- */ 1036*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls() 1037*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1038*cdf0e10cSrcweir { 1039*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCatalogsInProcedureCalls", &sql::DatabaseMetaData::supportsCatalogsInProcedureCalls); 1040*cdf0e10cSrcweir } 1041*cdf0e10cSrcweir /* }}} */ 1042*cdf0e10cSrcweir 1043*cdf0e10cSrcweir 1044*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions() -I- */ 1045*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions() 1046*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1047*cdf0e10cSrcweir { 1048*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCatalogsInPrivilegeDefinitions", &sql::DatabaseMetaData::supportsCatalogsInPrivilegeDefinitions); 1049*cdf0e10cSrcweir } 1050*cdf0e10cSrcweir /* }}} */ 1051*cdf0e10cSrcweir 1052*cdf0e10cSrcweir 1053*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCorrelatedSubqueries() -I- */ 1054*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries() 1055*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1056*cdf0e10cSrcweir { 1057*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCorrelatedSubqueries", &sql::DatabaseMetaData::supportsCorrelatedSubqueries); 1058*cdf0e10cSrcweir } 1059*cdf0e10cSrcweir /* }}} */ 1060*cdf0e10cSrcweir 1061*cdf0e10cSrcweir 1062*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSubqueriesInComparisons() -I- */ 1063*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons() 1064*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1065*cdf0e10cSrcweir { 1066*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSubqueriesInComparisons", &sql::DatabaseMetaData::supportsSubqueriesInComparisons); 1067*cdf0e10cSrcweir } 1068*cdf0e10cSrcweir /* }}} */ 1069*cdf0e10cSrcweir 1070*cdf0e10cSrcweir 1071*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSubqueriesInExists() -I- */ 1072*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists() 1073*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1074*cdf0e10cSrcweir { 1075*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSubqueriesInExists", &sql::DatabaseMetaData::supportsSubqueriesInExists); 1076*cdf0e10cSrcweir } 1077*cdf0e10cSrcweir /* }}} */ 1078*cdf0e10cSrcweir 1079*cdf0e10cSrcweir 1080*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSubqueriesInIns() -I- */ 1081*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns() 1082*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1083*cdf0e10cSrcweir { 1084*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSubqueriesInIns", &sql::DatabaseMetaData::supportsSubqueriesInIns); 1085*cdf0e10cSrcweir } 1086*cdf0e10cSrcweir /* }}} */ 1087*cdf0e10cSrcweir 1088*cdf0e10cSrcweir 1089*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsSubqueriesInQuantifieds() -I- */ 1090*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds() 1091*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1092*cdf0e10cSrcweir { 1093*cdf0e10cSrcweir return impl_getBoolMetaData("supportsSubqueriesInQuantifieds", &sql::DatabaseMetaData::supportsSubqueriesInQuantifieds); 1094*cdf0e10cSrcweir } 1095*cdf0e10cSrcweir /* }}} */ 1096*cdf0e10cSrcweir 1097*cdf0e10cSrcweir 1098*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsANSI92IntermediateSQL() -I- */ 1099*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL() 1100*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1101*cdf0e10cSrcweir { 1102*cdf0e10cSrcweir return impl_getBoolMetaData("supportsANSI92IntermediateSQL", &sql::DatabaseMetaData::supportsANSI92IntermediateSQL); 1103*cdf0e10cSrcweir } 1104*cdf0e10cSrcweir /* }}} */ 1105*cdf0e10cSrcweir 1106*cdf0e10cSrcweir 1107*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getURL() -I- */ 1108*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getURL() 1109*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1110*cdf0e10cSrcweir { 1111*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getURL"); 1112*cdf0e10cSrcweir return m_rConnection.getConnectionSettings().connectionURL; 1113*cdf0e10cSrcweir } 1114*cdf0e10cSrcweir /* }}} */ 1115*cdf0e10cSrcweir 1116*cdf0e10cSrcweir 1117*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getUserName() -I- */ 1118*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getUserName() 1119*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1120*cdf0e10cSrcweir { 1121*cdf0e10cSrcweir return impl_getStringMetaData("getUserName", &sql::DatabaseMetaData::getUserName); 1122*cdf0e10cSrcweir } 1123*cdf0e10cSrcweir /* }}} */ 1124*cdf0e10cSrcweir 1125*cdf0e10cSrcweir 1126*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDriverName() -I- */ 1127*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getDriverName() 1128*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1129*cdf0e10cSrcweir { 1130*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getDriverName"); 1131*cdf0e10cSrcweir OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "MySQL Connector/OO.org" ) ); 1132*cdf0e10cSrcweir return aValue; 1133*cdf0e10cSrcweir } 1134*cdf0e10cSrcweir /* }}} */ 1135*cdf0e10cSrcweir 1136*cdf0e10cSrcweir 1137*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDriverVersion() -I- */ 1138*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getDriverVersion() 1139*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1140*cdf0e10cSrcweir { 1141*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getDriverVersion"); 1142*cdf0e10cSrcweir static const OUString sVersion( RTL_CONSTASCII_USTRINGPARAM( "0.9.2" ) ); 1143*cdf0e10cSrcweir return sVersion; 1144*cdf0e10cSrcweir } 1145*cdf0e10cSrcweir /* }}} */ 1146*cdf0e10cSrcweir 1147*cdf0e10cSrcweir 1148*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDatabaseProductVersion() -I- */ 1149*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion() 1150*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1151*cdf0e10cSrcweir { 1152*cdf0e10cSrcweir return impl_getStringMetaData("getDatabaseProductVersion", &sql::DatabaseMetaData::getDatabaseProductVersion); 1153*cdf0e10cSrcweir } 1154*cdf0e10cSrcweir /* }}} */ 1155*cdf0e10cSrcweir 1156*cdf0e10cSrcweir 1157*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDatabaseProductName() -I- */ 1158*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName() 1159*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1160*cdf0e10cSrcweir { 1161*cdf0e10cSrcweir return impl_getStringMetaData("getDatabaseProductName", &sql::DatabaseMetaData::getDatabaseProductName); 1162*cdf0e10cSrcweir } 1163*cdf0e10cSrcweir /* }}} */ 1164*cdf0e10cSrcweir 1165*cdf0e10cSrcweir 1166*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getProcedureTerm() -I- */ 1167*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getProcedureTerm() 1168*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1169*cdf0e10cSrcweir { 1170*cdf0e10cSrcweir return impl_getStringMetaData("getProcedureTerm", &sql::DatabaseMetaData::getProcedureTerm); 1171*cdf0e10cSrcweir } 1172*cdf0e10cSrcweir /* }}} */ 1173*cdf0e10cSrcweir 1174*cdf0e10cSrcweir 1175*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getSchemaTerm() -I- */ 1176*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getSchemaTerm() 1177*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1178*cdf0e10cSrcweir { 1179*cdf0e10cSrcweir return impl_getStringMetaData("getSchemaTerm", &sql::DatabaseMetaData::getSchemaTerm); 1180*cdf0e10cSrcweir } 1181*cdf0e10cSrcweir /* }}} */ 1182*cdf0e10cSrcweir 1183*cdf0e10cSrcweir 1184*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDriverMajorVersion() -I- */ 1185*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion() 1186*cdf0e10cSrcweir throw(RuntimeException) 1187*cdf0e10cSrcweir { 1188*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getDriverMajorVersion"); 1189*cdf0e10cSrcweir return MYSQLC_VERSION_MAJOR; 1190*cdf0e10cSrcweir } 1191*cdf0e10cSrcweir /* }}} */ 1192*cdf0e10cSrcweir 1193*cdf0e10cSrcweir 1194*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDefaultTransactionIsolation() -I- */ 1195*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation() 1196*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1197*cdf0e10cSrcweir { 1198*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getDefaultTransactionIsolation"); 1199*cdf0e10cSrcweir try { 1200*cdf0e10cSrcweir switch (meta->getDefaultTransactionIsolation()) { 1201*cdf0e10cSrcweir case sql::TRANSACTION_SERIALIZABLE: return TransactionIsolation::SERIALIZABLE; 1202*cdf0e10cSrcweir case sql::TRANSACTION_REPEATABLE_READ: return TransactionIsolation::REPEATABLE_READ; 1203*cdf0e10cSrcweir case sql::TRANSACTION_READ_COMMITTED: return TransactionIsolation::READ_COMMITTED; 1204*cdf0e10cSrcweir case sql::TRANSACTION_READ_UNCOMMITTED: return TransactionIsolation::READ_UNCOMMITTED; 1205*cdf0e10cSrcweir } 1206*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1207*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getDriverMajorVersion", *this); 1208*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1209*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getDriverMajorVersion", *this); 1210*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1211*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1212*cdf0e10cSrcweir } 1213*cdf0e10cSrcweir return TransactionIsolation::NONE; 1214*cdf0e10cSrcweir } 1215*cdf0e10cSrcweir /* }}} */ 1216*cdf0e10cSrcweir 1217*cdf0e10cSrcweir 1218*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getDriverMinorVersion() -I- */ 1219*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion() 1220*cdf0e10cSrcweir throw(RuntimeException) 1221*cdf0e10cSrcweir { 1222*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getDriverMinorVersion"); 1223*cdf0e10cSrcweir return MYSQLC_VERSION_MINOR; 1224*cdf0e10cSrcweir } 1225*cdf0e10cSrcweir /* }}} */ 1226*cdf0e10cSrcweir 1227*cdf0e10cSrcweir 1228*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getSQLKeywords() -I- */ 1229*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getSQLKeywords() 1230*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1231*cdf0e10cSrcweir { 1232*cdf0e10cSrcweir return impl_getStringMetaData("getSQLKeywords", &sql::DatabaseMetaData::getSQLKeywords); 1233*cdf0e10cSrcweir } 1234*cdf0e10cSrcweir /* }}} */ 1235*cdf0e10cSrcweir 1236*cdf0e10cSrcweir 1237*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getSearchStringEscape() -I- */ 1238*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape() 1239*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1240*cdf0e10cSrcweir { 1241*cdf0e10cSrcweir return impl_getStringMetaData("getSearchStringEscape", &sql::DatabaseMetaData::getSearchStringEscape); 1242*cdf0e10cSrcweir } 1243*cdf0e10cSrcweir /* }}} */ 1244*cdf0e10cSrcweir 1245*cdf0e10cSrcweir 1246*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getStringFunctions() -I- */ 1247*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getStringFunctions() 1248*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1249*cdf0e10cSrcweir { 1250*cdf0e10cSrcweir return impl_getStringMetaData("getStringFunctions", &sql::DatabaseMetaData::getStringFunctions); 1251*cdf0e10cSrcweir } 1252*cdf0e10cSrcweir /* }}} */ 1253*cdf0e10cSrcweir 1254*cdf0e10cSrcweir 1255*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getTimeDateFunctions() -I- */ 1256*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions() 1257*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1258*cdf0e10cSrcweir { 1259*cdf0e10cSrcweir return impl_getStringMetaData("getTimeDateFunctions", &sql::DatabaseMetaData::getTimeDateFunctions); 1260*cdf0e10cSrcweir } 1261*cdf0e10cSrcweir /* }}} */ 1262*cdf0e10cSrcweir 1263*cdf0e10cSrcweir 1264*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getSystemFunctions() -I- */ 1265*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getSystemFunctions() 1266*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1267*cdf0e10cSrcweir { 1268*cdf0e10cSrcweir return impl_getStringMetaData("getSystemFunctions", &sql::DatabaseMetaData::getSystemFunctions); 1269*cdf0e10cSrcweir } 1270*cdf0e10cSrcweir /* }}} */ 1271*cdf0e10cSrcweir 1272*cdf0e10cSrcweir 1273*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getNumericFunctions() -I- */ 1274*cdf0e10cSrcweir OUString SAL_CALL ODatabaseMetaData::getNumericFunctions() 1275*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1276*cdf0e10cSrcweir { 1277*cdf0e10cSrcweir return impl_getStringMetaData("getNumericFunctions", &sql::DatabaseMetaData::getNumericFunctions); 1278*cdf0e10cSrcweir } 1279*cdf0e10cSrcweir /* }}} */ 1280*cdf0e10cSrcweir 1281*cdf0e10cSrcweir 1282*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsExtendedSQLGrammar() -I- */ 1283*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar() 1284*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1285*cdf0e10cSrcweir { 1286*cdf0e10cSrcweir return impl_getBoolMetaData("supportsExtendedSQLGrammar", &sql::DatabaseMetaData::supportsExtendedSQLGrammar); 1287*cdf0e10cSrcweir } 1288*cdf0e10cSrcweir /* }}} */ 1289*cdf0e10cSrcweir 1290*cdf0e10cSrcweir 1291*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsCoreSQLGrammar() -I- */ 1292*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar() 1293*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1294*cdf0e10cSrcweir { 1295*cdf0e10cSrcweir return impl_getBoolMetaData("supportsCoreSQLGrammar", &sql::DatabaseMetaData::supportsCoreSQLGrammar); 1296*cdf0e10cSrcweir } 1297*cdf0e10cSrcweir /* }}} */ 1298*cdf0e10cSrcweir 1299*cdf0e10cSrcweir 1300*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsMinimumSQLGrammar() -I- */ 1301*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar() 1302*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1303*cdf0e10cSrcweir { 1304*cdf0e10cSrcweir return impl_getBoolMetaData("supportsMinimumSQLGrammar", &sql::DatabaseMetaData::supportsMinimumSQLGrammar); 1305*cdf0e10cSrcweir } 1306*cdf0e10cSrcweir /* }}} */ 1307*cdf0e10cSrcweir 1308*cdf0e10cSrcweir 1309*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsFullOuterJoins() -I- */ 1310*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins() 1311*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1312*cdf0e10cSrcweir { 1313*cdf0e10cSrcweir return impl_getBoolMetaData("supportsFullOuterJoins", &sql::DatabaseMetaData::supportsFullOuterJoins); 1314*cdf0e10cSrcweir } 1315*cdf0e10cSrcweir /* }}} */ 1316*cdf0e10cSrcweir 1317*cdf0e10cSrcweir 1318*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsLimitedOuterJoins() -I- */ 1319*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins() 1320*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1321*cdf0e10cSrcweir { 1322*cdf0e10cSrcweir return impl_getBoolMetaData("supportsLimitedOuterJoins", &sql::DatabaseMetaData::supportsLimitedOuterJoins); 1323*cdf0e10cSrcweir } 1324*cdf0e10cSrcweir /* }}} */ 1325*cdf0e10cSrcweir 1326*cdf0e10cSrcweir 1327*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnsInGroupBy() -I- */ 1328*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy() 1329*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1330*cdf0e10cSrcweir { 1331*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnsInGroupBy", &sql::DatabaseMetaData::getMaxColumnsInGroupBy); 1332*cdf0e10cSrcweir } 1333*cdf0e10cSrcweir /* }}} */ 1334*cdf0e10cSrcweir 1335*cdf0e10cSrcweir 1336*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnsInOrderBy() -I- */ 1337*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy() 1338*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1339*cdf0e10cSrcweir { 1340*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnsInOrderBy", &sql::DatabaseMetaData::getMaxColumnsInOrderBy); 1341*cdf0e10cSrcweir } 1342*cdf0e10cSrcweir /* }}} */ 1343*cdf0e10cSrcweir 1344*cdf0e10cSrcweir 1345*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxColumnsInSelect() -I- */ 1346*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect() 1347*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1348*cdf0e10cSrcweir { 1349*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxColumnsInSelect", &sql::DatabaseMetaData::getMaxColumnsInSelect); 1350*cdf0e10cSrcweir } 1351*cdf0e10cSrcweir /* }}} */ 1352*cdf0e10cSrcweir 1353*cdf0e10cSrcweir 1354*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getMaxUserNameLength() -I- */ 1355*cdf0e10cSrcweir sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength() 1356*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1357*cdf0e10cSrcweir { 1358*cdf0e10cSrcweir return impl_getInt32MetaData("getMaxUserNameLength", &sql::DatabaseMetaData::getMaxUserNameLength); 1359*cdf0e10cSrcweir } 1360*cdf0e10cSrcweir /* }}} */ 1361*cdf0e10cSrcweir 1362*cdf0e10cSrcweir 1363*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsResultSetType() -I- */ 1364*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType(sal_Int32 setType) 1365*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1366*cdf0e10cSrcweir { 1367*cdf0e10cSrcweir return impl_getRSTypeMetaData("supportsResultSetType", &sql::DatabaseMetaData::supportsResultSetType, setType); 1368*cdf0e10cSrcweir } 1369*cdf0e10cSrcweir /* }}} */ 1370*cdf0e10cSrcweir 1371*cdf0e10cSrcweir 1372*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsResultSetConcurrency() -I- */ 1373*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency(sal_Int32 setType, sal_Int32 concurrency) 1374*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1375*cdf0e10cSrcweir { 1376*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::supportsResultSetConcurrency"); 1377*cdf0e10cSrcweir /* TODO: Check this out */ 1378*cdf0e10cSrcweir try { 1379*cdf0e10cSrcweir return meta->supportsResultSetConcurrency(setType, concurrency==com::sun::star::sdbc::TransactionIsolation::READ_COMMITTED? 1380*cdf0e10cSrcweir sql::TRANSACTION_READ_COMMITTED: 1381*cdf0e10cSrcweir (concurrency == com::sun::star::sdbc::TransactionIsolation::SERIALIZABLE? 1382*cdf0e10cSrcweir sql::TRANSACTION_SERIALIZABLE:sql::TRANSACTION_SERIALIZABLE))? sal_True:sal_False; 1383*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1384*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsResultSetConcurrency", *this); 1385*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1386*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::supportsResultSetConcurrency", *this); 1387*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1388*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1389*cdf0e10cSrcweir } 1390*cdf0e10cSrcweir return sal_False; 1391*cdf0e10cSrcweir } 1392*cdf0e10cSrcweir /* }}} */ 1393*cdf0e10cSrcweir 1394*cdf0e10cSrcweir 1395*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::ownUpdatesAreVisible() -I- */ 1396*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible(sal_Int32 setType) 1397*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1398*cdf0e10cSrcweir { 1399*cdf0e10cSrcweir return impl_getRSTypeMetaData("ownUpdatesAreVisible", &sql::DatabaseMetaData::ownUpdatesAreVisible, setType); 1400*cdf0e10cSrcweir } 1401*cdf0e10cSrcweir /* }}} */ 1402*cdf0e10cSrcweir 1403*cdf0e10cSrcweir 1404*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::ownDeletesAreVisible() -I- */ 1405*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible(sal_Int32 setType) 1406*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1407*cdf0e10cSrcweir { 1408*cdf0e10cSrcweir return impl_getRSTypeMetaData("ownDeletesAreVisible", &sql::DatabaseMetaData::ownDeletesAreVisible, setType); 1409*cdf0e10cSrcweir } 1410*cdf0e10cSrcweir /* }}} */ 1411*cdf0e10cSrcweir 1412*cdf0e10cSrcweir 1413*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::ownInsertsAreVisible() -I- */ 1414*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible(sal_Int32 setType) 1415*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1416*cdf0e10cSrcweir { 1417*cdf0e10cSrcweir return impl_getRSTypeMetaData("ownInsertsAreVisible", &sql::DatabaseMetaData::ownInsertsAreVisible, setType); 1418*cdf0e10cSrcweir } 1419*cdf0e10cSrcweir /* }}} */ 1420*cdf0e10cSrcweir 1421*cdf0e10cSrcweir 1422*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::othersUpdatesAreVisible() -I- */ 1423*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible(sal_Int32 setType) 1424*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1425*cdf0e10cSrcweir { 1426*cdf0e10cSrcweir return impl_getRSTypeMetaData("othersUpdatesAreVisible", &sql::DatabaseMetaData::othersUpdatesAreVisible, setType); 1427*cdf0e10cSrcweir } 1428*cdf0e10cSrcweir /* }}} */ 1429*cdf0e10cSrcweir 1430*cdf0e10cSrcweir 1431*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::othersDeletesAreVisible() -I- */ 1432*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible(sal_Int32 setType) 1433*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1434*cdf0e10cSrcweir { 1435*cdf0e10cSrcweir return impl_getRSTypeMetaData("othersDeletesAreVisible", &sql::DatabaseMetaData::othersDeletesAreVisible, setType); 1436*cdf0e10cSrcweir } 1437*cdf0e10cSrcweir /* }}} */ 1438*cdf0e10cSrcweir 1439*cdf0e10cSrcweir 1440*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::othersInsertsAreVisible() -I- */ 1441*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible(sal_Int32 setType) 1442*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1443*cdf0e10cSrcweir { 1444*cdf0e10cSrcweir return impl_getRSTypeMetaData("othersInsertsAreVisible", &sql::DatabaseMetaData::othersInsertsAreVisible, setType); 1445*cdf0e10cSrcweir } 1446*cdf0e10cSrcweir /* }}} */ 1447*cdf0e10cSrcweir 1448*cdf0e10cSrcweir 1449*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::updatesAreDetected() -I- */ 1450*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected(sal_Int32 setType) 1451*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1452*cdf0e10cSrcweir { 1453*cdf0e10cSrcweir return impl_getRSTypeMetaData("updatesAreDetected", &sql::DatabaseMetaData::updatesAreDetected, setType); 1454*cdf0e10cSrcweir } 1455*cdf0e10cSrcweir /* }}} */ 1456*cdf0e10cSrcweir 1457*cdf0e10cSrcweir 1458*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::deletesAreDetected() -I- */ 1459*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected(sal_Int32 setType) 1460*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1461*cdf0e10cSrcweir { 1462*cdf0e10cSrcweir return impl_getRSTypeMetaData("deletesAreDetected", &sql::DatabaseMetaData::deletesAreDetected, setType); 1463*cdf0e10cSrcweir } 1464*cdf0e10cSrcweir /* }}} */ 1465*cdf0e10cSrcweir 1466*cdf0e10cSrcweir 1467*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::insertsAreDetected() -I- */ 1468*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected(sal_Int32 setType) 1469*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1470*cdf0e10cSrcweir { 1471*cdf0e10cSrcweir return impl_getRSTypeMetaData("insertsAreDetected", &sql::DatabaseMetaData::insertsAreDetected, setType); 1472*cdf0e10cSrcweir } 1473*cdf0e10cSrcweir /* }}} */ 1474*cdf0e10cSrcweir 1475*cdf0e10cSrcweir 1476*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::supportsBatchUpdates() -I- */ 1477*cdf0e10cSrcweir sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates() 1478*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1479*cdf0e10cSrcweir { 1480*cdf0e10cSrcweir return impl_getBoolMetaData("supportsBatchUpdates", &sql::DatabaseMetaData::supportsBatchUpdates); 1481*cdf0e10cSrcweir } 1482*cdf0e10cSrcweir /* }}} */ 1483*cdf0e10cSrcweir 1484*cdf0e10cSrcweir 1485*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getConnection() -I- */ 1486*cdf0e10cSrcweir Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection() 1487*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1488*cdf0e10cSrcweir { 1489*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getConnection"); 1490*cdf0e10cSrcweir return (Reference< XConnection >)&m_rConnection; 1491*cdf0e10cSrcweir } 1492*cdf0e10cSrcweir /* }}} */ 1493*cdf0e10cSrcweir 1494*cdf0e10cSrcweir 1495*cdf0e10cSrcweir /* 1496*cdf0e10cSrcweir Here follow all methods which return(a resultset 1497*cdf0e10cSrcweir the first methods is an example implementation how to use this resultset 1498*cdf0e10cSrcweir of course you could implement it on your and you should do this because 1499*cdf0e10cSrcweir the general way is more memory expensive 1500*cdf0e10cSrcweir */ 1501*cdf0e10cSrcweir 1502*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getTableTypes() -I- */ 1503*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes() 1504*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1505*cdf0e10cSrcweir { 1506*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getTableTypes"); 1507*cdf0e10cSrcweir const char * table_types[] = {"TABLE", "VIEW"}; 1508*cdf0e10cSrcweir sal_Int32 requiredVersion[] = {0, 50000}; 1509*cdf0e10cSrcweir 1510*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1511*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1512*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1513*cdf0e10cSrcweir 1514*cdf0e10cSrcweir for (sal_uInt32 i = 0; i < 2; i++) { 1515*cdf0e10cSrcweir if (m_rConnection.getMysqlVersion() >= requiredVersion[i]) { 1516*cdf0e10cSrcweir std::vector< Any > aRow(1); 1517*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(table_types[i], encoding))); 1518*cdf0e10cSrcweir rRows.push_back(aRow); 1519*cdf0e10cSrcweir } 1520*cdf0e10cSrcweir } 1521*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 5 ,rRows); 1522*cdf0e10cSrcweir return xResultSet; 1523*cdf0e10cSrcweir } 1524*cdf0e10cSrcweir /* }}} */ 1525*cdf0e10cSrcweir 1526*cdf0e10cSrcweir 1527*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getTypeInfo() -I- */ 1528*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() 1529*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1530*cdf0e10cSrcweir { 1531*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getTypeInfo"); 1532*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1533*cdf0e10cSrcweir 1534*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1535*cdf0e10cSrcweir 1536*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1537*cdf0e10cSrcweir unsigned int i = 0; 1538*cdf0e10cSrcweir while (mysqlc_types[i].typeName) { 1539*cdf0e10cSrcweir std::vector< Any > aRow(1); 1540*cdf0e10cSrcweir 1541*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types[i].typeName, encoding))); 1542*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].dataType)); 1543*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].precision)); 1544*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types[i].literalPrefix, encoding))); 1545*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types[i].literalSuffix, encoding))); 1546*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types[i].createParams, encoding))); 1547*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].nullable)); 1548*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].caseSensitive)); 1549*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].searchable)); 1550*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].isUnsigned)); 1551*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].fixedPrecScale)); 1552*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].autoIncrement)); 1553*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(mysqlc_types[i].localTypeName, encoding))); 1554*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].minScale)); 1555*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_types[i].maxScale)); 1556*cdf0e10cSrcweir aRow.push_back(makeAny(sal_Int32(0))); 1557*cdf0e10cSrcweir aRow.push_back(makeAny(sal_Int32(0))); 1558*cdf0e10cSrcweir aRow.push_back(makeAny(sal_Int32(10))); 1559*cdf0e10cSrcweir 1560*cdf0e10cSrcweir rRows.push_back(aRow); 1561*cdf0e10cSrcweir i++; 1562*cdf0e10cSrcweir } 1563*cdf0e10cSrcweir 1564*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 14, rRows); 1565*cdf0e10cSrcweir return xResultSet; 1566*cdf0e10cSrcweir } 1567*cdf0e10cSrcweir /* }}} */ 1568*cdf0e10cSrcweir 1569*cdf0e10cSrcweir 1570*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getCatalogs() -I- */ 1571*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs() 1572*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1573*cdf0e10cSrcweir { 1574*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getCatalogs"); 1575*cdf0e10cSrcweir 1576*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1577*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1578*cdf0e10cSrcweir 1579*cdf0e10cSrcweir try { 1580*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1581*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getCatalogs()); 1582*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1583*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1584*cdf0e10cSrcweir while (rset->next()) { 1585*cdf0e10cSrcweir std::vector< Any > aRow(1); 1586*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1587*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1588*cdf0e10cSrcweir } 1589*cdf0e10cSrcweir rRows.push_back(aRow); 1590*cdf0e10cSrcweir } 1591*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1592*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getCatalogs", *this); 1593*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1594*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getCatalogs", *this); 1595*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1596*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1597*cdf0e10cSrcweir } 1598*cdf0e10cSrcweir 1599*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 0, rRows); 1600*cdf0e10cSrcweir return xResultSet; 1601*cdf0e10cSrcweir } 1602*cdf0e10cSrcweir /* }}} */ 1603*cdf0e10cSrcweir 1604*cdf0e10cSrcweir 1605*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getSchemas() -I- */ 1606*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas() 1607*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1608*cdf0e10cSrcweir { 1609*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getSchemas"); 1610*cdf0e10cSrcweir 1611*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1612*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1613*cdf0e10cSrcweir 1614*cdf0e10cSrcweir try { 1615*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1616*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getSchemas()); 1617*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1618*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1619*cdf0e10cSrcweir while (rset->next()) { 1620*cdf0e10cSrcweir std::vector< Any > aRow(1); 1621*cdf0e10cSrcweir bool informationSchema = false; 1622*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1623*cdf0e10cSrcweir sql::SQLString columnStringValue = rset->getString(i); 1624*cdf0e10cSrcweir if (i == 1) { // TABLE_SCHEM 1625*cdf0e10cSrcweir informationSchema = (0 == columnStringValue.compare("information_schema")); 1626*cdf0e10cSrcweir } 1627*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(columnStringValue, encoding))); 1628*cdf0e10cSrcweir } 1629*cdf0e10cSrcweir if (!informationSchema ) { 1630*cdf0e10cSrcweir rRows.push_back(aRow); 1631*cdf0e10cSrcweir } 1632*cdf0e10cSrcweir } 1633*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1634*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getSchemas", *this); 1635*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1636*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getSchemas", *this); 1637*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1638*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1639*cdf0e10cSrcweir } 1640*cdf0e10cSrcweir 1641*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 1, rRows); 1642*cdf0e10cSrcweir return xResultSet; 1643*cdf0e10cSrcweir } 1644*cdf0e10cSrcweir /* }}} */ 1645*cdf0e10cSrcweir 1646*cdf0e10cSrcweir 1647*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getColumnPrivileges() -I- */ 1648*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( 1649*cdf0e10cSrcweir const Any& catalog, 1650*cdf0e10cSrcweir const OUString& schema, 1651*cdf0e10cSrcweir const OUString& table, 1652*cdf0e10cSrcweir const OUString& columnNamePattern) 1653*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1654*cdf0e10cSrcweir { 1655*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getColumnPrivileges"); 1656*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1657*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1658*cdf0e10cSrcweir 1659*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1660*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 1661*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()), 1662*cdf0e10cSrcweir cNamePattern(OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); 1663*cdf0e10cSrcweir try { 1664*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1665*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getColumnPrivileges(cat, sch, tab, cNamePattern.compare("")? cNamePattern:wild)); 1666*cdf0e10cSrcweir 1667*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1668*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1669*cdf0e10cSrcweir while (rset->next()) { 1670*cdf0e10cSrcweir std::vector< Any > aRow(1); 1671*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1672*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1673*cdf0e10cSrcweir } 1674*cdf0e10cSrcweir rRows.push_back(aRow); 1675*cdf0e10cSrcweir } 1676*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1677*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getColumnPrivileges", *this); 1678*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1679*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getColumnPrivileges", *this); 1680*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1681*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1682*cdf0e10cSrcweir } 1683*cdf0e10cSrcweir 1684*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 2, rRows); 1685*cdf0e10cSrcweir return xResultSet; 1686*cdf0e10cSrcweir } 1687*cdf0e10cSrcweir /* }}} */ 1688*cdf0e10cSrcweir 1689*cdf0e10cSrcweir 1690*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getColumns() -I- */ 1691*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( 1692*cdf0e10cSrcweir const Any& catalog, 1693*cdf0e10cSrcweir const OUString& schemaPattern, 1694*cdf0e10cSrcweir const OUString& tableNamePattern, 1695*cdf0e10cSrcweir const OUString& columnNamePattern) 1696*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1697*cdf0e10cSrcweir { 1698*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getColumns"); 1699*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1700*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1701*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1702*cdf0e10cSrcweir sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), 1703*cdf0e10cSrcweir tNamePattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()), 1704*cdf0e10cSrcweir cNamePattern(OUStringToOString(columnNamePattern, m_rConnection.getConnectionEncoding()).getStr()); 1705*cdf0e10cSrcweir 1706*cdf0e10cSrcweir try { 1707*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getColumns(cat, 1708*cdf0e10cSrcweir sPattern.compare("")? sPattern:wild, 1709*cdf0e10cSrcweir tNamePattern.compare("")? tNamePattern:wild, 1710*cdf0e10cSrcweir cNamePattern.compare("")? cNamePattern:wild)); 1711*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1712*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1713*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1714*cdf0e10cSrcweir while (rset->next()) { 1715*cdf0e10cSrcweir std::vector< Any > aRow(1); 1716*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1717*cdf0e10cSrcweir if (i == 5) { // ColumnType 1718*cdf0e10cSrcweir sal_Int32 sdbc_type = mysqlc_sdbc_driver::mysqlToOOOType(atoi(rset->getString(i).c_str())); 1719*cdf0e10cSrcweir aRow.push_back(makeAny(sdbc_type)); 1720*cdf0e10cSrcweir } else { 1721*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1722*cdf0e10cSrcweir } 1723*cdf0e10cSrcweir } 1724*cdf0e10cSrcweir rRows.push_back(aRow); 1725*cdf0e10cSrcweir } 1726*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1727*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getColumns", *this); 1728*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1729*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getColumns", *this); 1730*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1731*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1732*cdf0e10cSrcweir } 1733*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 3, rRows); 1734*cdf0e10cSrcweir return xResultSet; 1735*cdf0e10cSrcweir } 1736*cdf0e10cSrcweir /* }}} */ 1737*cdf0e10cSrcweir 1738*cdf0e10cSrcweir 1739*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getTables() -I- */ 1740*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( 1741*cdf0e10cSrcweir const Any& catalog, 1742*cdf0e10cSrcweir const OUString& schemaPattern, 1743*cdf0e10cSrcweir const OUString& tableNamePattern, 1744*cdf0e10cSrcweir const Sequence< OUString >& types ) 1745*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1746*cdf0e10cSrcweir { 1747*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getTables"); 1748*cdf0e10cSrcweir sal_Int32 nLength = types.getLength(); 1749*cdf0e10cSrcweir 1750*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection(). 1751*cdf0e10cSrcweir getDriver().getFactory()->createInstance( 1752*cdf0e10cSrcweir ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1753*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1754*cdf0e10cSrcweir 1755*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1756*cdf0e10cSrcweir sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), 1757*cdf0e10cSrcweir tNamePattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); 1758*cdf0e10cSrcweir 1759*cdf0e10cSrcweir ext_std::list<sql::SQLString> tabTypes; 1760*cdf0e10cSrcweir for (const OUString *pStart = types.getConstArray(), *p = pStart, *pEnd = pStart + nLength; p != pEnd; ++p) { 1761*cdf0e10cSrcweir tabTypes.push_back(OUStringToOString(*p, m_rConnection.getConnectionEncoding()).getStr()); 1762*cdf0e10cSrcweir } 1763*cdf0e10cSrcweir 1764*cdf0e10cSrcweir try { 1765*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getTables(cat, 1766*cdf0e10cSrcweir sPattern.compare("")? sPattern:wild, 1767*cdf0e10cSrcweir tNamePattern.compare("")? tNamePattern:wild, 1768*cdf0e10cSrcweir tabTypes)); 1769*cdf0e10cSrcweir 1770*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1771*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1772*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1773*cdf0e10cSrcweir while (rset->next()) { 1774*cdf0e10cSrcweir std::vector< Any > aRow(1); 1775*cdf0e10cSrcweir bool informationSchema = false; 1776*cdf0e10cSrcweir for (sal_uInt32 i = 1; (i <= columns) && !informationSchema; ++i) { 1777*cdf0e10cSrcweir sql::SQLString columnStringValue = rset->getString(i); 1778*cdf0e10cSrcweir if (i == 2) { // TABLE_SCHEM 1779*cdf0e10cSrcweir informationSchema = ( 0 == columnStringValue.compare("information_schema")); 1780*cdf0e10cSrcweir } 1781*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(columnStringValue, encoding))); 1782*cdf0e10cSrcweir } 1783*cdf0e10cSrcweir if (!informationSchema) { 1784*cdf0e10cSrcweir rRows.push_back(aRow); 1785*cdf0e10cSrcweir } 1786*cdf0e10cSrcweir } 1787*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1788*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getTables", *this); 1789*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1790*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getTables", *this); 1791*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1792*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1793*cdf0e10cSrcweir } 1794*cdf0e10cSrcweir 1795*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 4, rRows); 1796*cdf0e10cSrcweir return xResultSet; 1797*cdf0e10cSrcweir } 1798*cdf0e10cSrcweir /* }}} */ 1799*cdf0e10cSrcweir 1800*cdf0e10cSrcweir 1801*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getProcedureColumns() -I- */ 1802*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( 1803*cdf0e10cSrcweir const Any& /* catalog */, 1804*cdf0e10cSrcweir const OUString& /* schemaPattern */, 1805*cdf0e10cSrcweir const OUString& /* procedureNamePattern */, 1806*cdf0e10cSrcweir const OUString& /* columnNamePattern */) 1807*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1808*cdf0e10cSrcweir { 1809*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getProcedureColumns"); 1810*cdf0e10cSrcweir // Currently there is no information available 1811*cdf0e10cSrcweir return NULL; 1812*cdf0e10cSrcweir } 1813*cdf0e10cSrcweir /* }}} */ 1814*cdf0e10cSrcweir 1815*cdf0e10cSrcweir 1816*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getProcedures() -I- */ 1817*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( 1818*cdf0e10cSrcweir const Any& catalog, 1819*cdf0e10cSrcweir const OUString& schemaPattern, 1820*cdf0e10cSrcweir const OUString& procedureNamePattern) 1821*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1822*cdf0e10cSrcweir { 1823*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getProcedures"); 1824*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1825*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1826*cdf0e10cSrcweir 1827*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1828*cdf0e10cSrcweir sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), 1829*cdf0e10cSrcweir pNamePattern(OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr()); 1830*cdf0e10cSrcweir 1831*cdf0e10cSrcweir 1832*cdf0e10cSrcweir try { 1833*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getProcedures(cat, 1834*cdf0e10cSrcweir sPattern.compare("")? sPattern:wild, 1835*cdf0e10cSrcweir pNamePattern.compare("")? pNamePattern:wild)); 1836*cdf0e10cSrcweir 1837*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1838*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1839*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1840*cdf0e10cSrcweir while (rset->next()) { 1841*cdf0e10cSrcweir std::vector< Any > aRow(1); 1842*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1843*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1844*cdf0e10cSrcweir } 1845*cdf0e10cSrcweir rRows.push_back(aRow); 1846*cdf0e10cSrcweir } 1847*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1848*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getProcedures", *this); 1849*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1850*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getProcedures", *this); 1851*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1852*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1853*cdf0e10cSrcweir } 1854*cdf0e10cSrcweir 1855*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 7,rRows); 1856*cdf0e10cSrcweir return xResultSet; 1857*cdf0e10cSrcweir } 1858*cdf0e10cSrcweir /* }}} */ 1859*cdf0e10cSrcweir 1860*cdf0e10cSrcweir 1861*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getVersionColumns() -I- */ 1862*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( 1863*cdf0e10cSrcweir const Any& /* catalog */, 1864*cdf0e10cSrcweir const OUString& /* schema */, 1865*cdf0e10cSrcweir const OUString& /* table */) 1866*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1867*cdf0e10cSrcweir { 1868*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getVersionColumns"); 1869*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1870*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1871*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 16,rRows); 1872*cdf0e10cSrcweir return xResultSet; 1873*cdf0e10cSrcweir } 1874*cdf0e10cSrcweir /* }}} */ 1875*cdf0e10cSrcweir 1876*cdf0e10cSrcweir 1877*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getExportedKeys() -I- */ 1878*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( 1879*cdf0e10cSrcweir const Any& catalog , 1880*cdf0e10cSrcweir const OUString& schema , 1881*cdf0e10cSrcweir const OUString& table ) 1882*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1883*cdf0e10cSrcweir { 1884*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getExportedKeys"); 1885*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1886*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1887*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1888*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 1889*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); 1890*cdf0e10cSrcweir 1891*cdf0e10cSrcweir try { 1892*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1893*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getExportedKeys(cat, sch, tab)); 1894*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1895*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1896*cdf0e10cSrcweir while (rset->next()) { 1897*cdf0e10cSrcweir std::vector< Any > aRow(1); 1898*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1899*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1900*cdf0e10cSrcweir } 1901*cdf0e10cSrcweir rRows.push_back(aRow); 1902*cdf0e10cSrcweir } 1903*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1904*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getExportedKeys", *this); 1905*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1906*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getExportedKeys", *this); 1907*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1908*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1909*cdf0e10cSrcweir } 1910*cdf0e10cSrcweir 1911*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 8, rRows); 1912*cdf0e10cSrcweir return xResultSet; 1913*cdf0e10cSrcweir } 1914*cdf0e10cSrcweir /* }}} */ 1915*cdf0e10cSrcweir 1916*cdf0e10cSrcweir 1917*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getImportedKeys() -I- */ 1918*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( 1919*cdf0e10cSrcweir const Any& catalog, 1920*cdf0e10cSrcweir const OUString& schema, 1921*cdf0e10cSrcweir const OUString& table) 1922*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1923*cdf0e10cSrcweir { 1924*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getImportedKeys"); 1925*cdf0e10cSrcweir 1926*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1927*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1928*cdf0e10cSrcweir 1929*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1930*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 1931*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); 1932*cdf0e10cSrcweir 1933*cdf0e10cSrcweir try { 1934*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1935*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getImportedKeys(cat, sch, tab)); 1936*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1937*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1938*cdf0e10cSrcweir while (rset->next()) { 1939*cdf0e10cSrcweir std::vector< Any > aRow(1); 1940*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1941*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1942*cdf0e10cSrcweir } 1943*cdf0e10cSrcweir rRows.push_back(aRow); 1944*cdf0e10cSrcweir } 1945*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1946*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getImportedKeys", *this); 1947*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1948*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getImportedKeys", *this); 1949*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1950*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1951*cdf0e10cSrcweir } 1952*cdf0e10cSrcweir 1953*cdf0e10cSrcweir lcl_setRows_throw(xResultSet,9,rRows); 1954*cdf0e10cSrcweir return xResultSet; 1955*cdf0e10cSrcweir } 1956*cdf0e10cSrcweir /* }}} */ 1957*cdf0e10cSrcweir 1958*cdf0e10cSrcweir 1959*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getPrimaryKeys() -I- */ 1960*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( 1961*cdf0e10cSrcweir const Any& catalog, 1962*cdf0e10cSrcweir const OUString& schema, 1963*cdf0e10cSrcweir const OUString& table) 1964*cdf0e10cSrcweir throw(SQLException, RuntimeException) 1965*cdf0e10cSrcweir { 1966*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getPrimaryKeys"); 1967*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 1968*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 1969*cdf0e10cSrcweir 1970*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 1971*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 1972*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); 1973*cdf0e10cSrcweir 1974*cdf0e10cSrcweir try { 1975*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 1976*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getPrimaryKeys(cat, sch, tab)); 1977*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 1978*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 1979*cdf0e10cSrcweir while (rset->next()) { 1980*cdf0e10cSrcweir std::vector< Any > aRow(1); 1981*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 1982*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 1983*cdf0e10cSrcweir } 1984*cdf0e10cSrcweir rRows.push_back(aRow); 1985*cdf0e10cSrcweir } 1986*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 1987*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getPrimaryKeys", *this); 1988*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 1989*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getPrimaryKeys", *this); 1990*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 1991*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 1992*cdf0e10cSrcweir } 1993*cdf0e10cSrcweir 1994*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 10, rRows); 1995*cdf0e10cSrcweir return xResultSet; 1996*cdf0e10cSrcweir } 1997*cdf0e10cSrcweir /* }}} */ 1998*cdf0e10cSrcweir 1999*cdf0e10cSrcweir 2000*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getIndexInfo() -I- */ 2001*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( 2002*cdf0e10cSrcweir const Any& catalog, 2003*cdf0e10cSrcweir const OUString& schema, 2004*cdf0e10cSrcweir const OUString& table, 2005*cdf0e10cSrcweir sal_Bool unique, 2006*cdf0e10cSrcweir sal_Bool approximate) 2007*cdf0e10cSrcweir throw(SQLException, RuntimeException) 2008*cdf0e10cSrcweir { 2009*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getIndexInfo"); 2010*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 2011*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 2012*cdf0e10cSrcweir 2013*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 2014*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 2015*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); 2016*cdf0e10cSrcweir 2017*cdf0e10cSrcweir try { 2018*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 2019*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getIndexInfo(cat, sch, tab, unique, approximate)); 2020*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 2021*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 2022*cdf0e10cSrcweir while (rset->next()) { 2023*cdf0e10cSrcweir std::vector< Any > aRow(1); 2024*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 2025*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 2026*cdf0e10cSrcweir } 2027*cdf0e10cSrcweir rRows.push_back(aRow); 2028*cdf0e10cSrcweir } 2029*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 2030*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getIndexInfo", *this); 2031*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 2032*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getIndexInfo", *this); 2033*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 2034*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 2035*cdf0e10cSrcweir } 2036*cdf0e10cSrcweir 2037*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 11, rRows); 2038*cdf0e10cSrcweir return xResultSet; 2039*cdf0e10cSrcweir } 2040*cdf0e10cSrcweir /* }}} */ 2041*cdf0e10cSrcweir 2042*cdf0e10cSrcweir 2043*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getBestRowIdentifier() -I- */ 2044*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( 2045*cdf0e10cSrcweir const Any& catalog, 2046*cdf0e10cSrcweir const OUString& schema, 2047*cdf0e10cSrcweir const OUString& table, 2048*cdf0e10cSrcweir sal_Int32 scope, 2049*cdf0e10cSrcweir sal_Bool nullable) 2050*cdf0e10cSrcweir throw(SQLException, RuntimeException) 2051*cdf0e10cSrcweir { 2052*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getBestRowIdentifier"); 2053*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 2054*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 2055*cdf0e10cSrcweir 2056*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 2057*cdf0e10cSrcweir sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), 2058*cdf0e10cSrcweir tab(OUStringToOString(table, m_rConnection.getConnectionEncoding()).getStr()); 2059*cdf0e10cSrcweir 2060*cdf0e10cSrcweir try { 2061*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 2062*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getBestRowIdentifier(cat, sch, tab, scope, nullable)); 2063*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 2064*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 2065*cdf0e10cSrcweir while (rset->next()) { 2066*cdf0e10cSrcweir std::vector< Any > aRow(1); 2067*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 2068*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 2069*cdf0e10cSrcweir } 2070*cdf0e10cSrcweir rRows.push_back(aRow); 2071*cdf0e10cSrcweir } 2072*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 2073*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getBestRowIdentifier", *this); 2074*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 2075*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getBestRowIdentifier", *this); 2076*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 2077*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 2078*cdf0e10cSrcweir } 2079*cdf0e10cSrcweir 2080*cdf0e10cSrcweir lcl_setRows_throw(xResultSet, 15, rRows); 2081*cdf0e10cSrcweir return xResultSet; 2082*cdf0e10cSrcweir } 2083*cdf0e10cSrcweir /* }}} */ 2084*cdf0e10cSrcweir 2085*cdf0e10cSrcweir 2086*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getTablePrivileges() -I- */ 2087*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( 2088*cdf0e10cSrcweir const Any& catalog, 2089*cdf0e10cSrcweir const OUString& schemaPattern, 2090*cdf0e10cSrcweir const OUString& tableNamePattern) 2091*cdf0e10cSrcweir throw(SQLException, RuntimeException) 2092*cdf0e10cSrcweir { 2093*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getTablePrivileges"); 2094*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 2095*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 2096*cdf0e10cSrcweir 2097*cdf0e10cSrcweir ext_std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), 2098*cdf0e10cSrcweir sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), 2099*cdf0e10cSrcweir tPattern(OUStringToOString(tableNamePattern, m_rConnection.getConnectionEncoding()).getStr()); 2100*cdf0e10cSrcweir 2101*cdf0e10cSrcweir try { 2102*cdf0e10cSrcweir static bool fakeTablePrivileges = false; 2103*cdf0e10cSrcweir if (fakeTablePrivileges) { 2104*cdf0e10cSrcweir static const sal_Char* allPrivileges[] = { 2105*cdf0e10cSrcweir "ALTER", "DELETE", "DROP", "INDEX", "INSERT", "LOCK TABLES", "SELECT", "UPDATE" 2106*cdf0e10cSrcweir }; 2107*cdf0e10cSrcweir Any userName; userName <<= getUserName(); 2108*cdf0e10cSrcweir for (size_t i = 0; i < sizeof( allPrivileges ) / sizeof( allPrivileges[0]); ++i) { 2109*cdf0e10cSrcweir std::vector< Any > aRow; 2110*cdf0e10cSrcweir aRow.push_back(makeAny( sal_Int32( i ) )); 2111*cdf0e10cSrcweir aRow.push_back(catalog); // TABLE_CAT 2112*cdf0e10cSrcweir aRow.push_back(makeAny( schemaPattern )); // TABLE_SCHEM 2113*cdf0e10cSrcweir aRow.push_back(makeAny( tableNamePattern )); // TABLE_NAME 2114*cdf0e10cSrcweir aRow.push_back(Any()); // GRANTOR 2115*cdf0e10cSrcweir aRow.push_back(userName); // GRANTEE 2116*cdf0e10cSrcweir aRow.push_back(makeAny( ::rtl::OUString::createFromAscii( allPrivileges[i] ) )); // PRIVILEGE 2117*cdf0e10cSrcweir aRow.push_back(Any()); // IS_GRANTABLE 2118*cdf0e10cSrcweir 2119*cdf0e10cSrcweir rRows.push_back(aRow); 2120*cdf0e10cSrcweir } 2121*cdf0e10cSrcweir } else { 2122*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 2123*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getTablePrivileges(cat, sPattern.compare("")? sPattern:wild, tPattern.compare("")? tPattern:wild)); 2124*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 2125*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 2126*cdf0e10cSrcweir while (rset->next()) { 2127*cdf0e10cSrcweir std::vector< Any > aRow(1); 2128*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 2129*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 2130*cdf0e10cSrcweir } 2131*cdf0e10cSrcweir rRows.push_back(aRow); 2132*cdf0e10cSrcweir } 2133*cdf0e10cSrcweir } 2134*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 2135*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getTablePrivileges", *this); 2136*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 2137*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getTablePrivileges", *this); 2138*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 2139*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 2140*cdf0e10cSrcweir } 2141*cdf0e10cSrcweir 2142*cdf0e10cSrcweir lcl_setRows_throw(xResultSet,12,rRows); 2143*cdf0e10cSrcweir return xResultSet; 2144*cdf0e10cSrcweir } 2145*cdf0e10cSrcweir /* }}} */ 2146*cdf0e10cSrcweir 2147*cdf0e10cSrcweir 2148*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getCrossReference() -I- */ 2149*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( 2150*cdf0e10cSrcweir const Any& primaryCatalog, 2151*cdf0e10cSrcweir const OUString& primarySchema, 2152*cdf0e10cSrcweir const OUString& primaryTable, 2153*cdf0e10cSrcweir const Any& foreignCatalog, 2154*cdf0e10cSrcweir const OUString& foreignSchema, 2155*cdf0e10cSrcweir const OUString& foreignTable) 2156*cdf0e10cSrcweir throw(SQLException, RuntimeException) 2157*cdf0e10cSrcweir { 2158*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getCrossReference"); 2159*cdf0e10cSrcweir Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"))),UNO_QUERY); 2160*cdf0e10cSrcweir std::vector< std::vector< Any > > rRows; 2161*cdf0e10cSrcweir 2162*cdf0e10cSrcweir ext_std::string primaryCat(primaryCatalog.hasValue()? OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""), 2163*cdf0e10cSrcweir foreignCat(foreignCatalog.hasValue()? OUStringToOString(getStringFromAny(foreignCatalog), m_rConnection.getConnectionEncoding()).getStr():""), 2164*cdf0e10cSrcweir pSchema(OUStringToOString(primarySchema, m_rConnection.getConnectionEncoding()).getStr()), 2165*cdf0e10cSrcweir pTable(OUStringToOString(primaryTable, m_rConnection.getConnectionEncoding()).getStr()), 2166*cdf0e10cSrcweir fSchema(OUStringToOString(foreignSchema, m_rConnection.getConnectionEncoding()).getStr()), 2167*cdf0e10cSrcweir fTable(OUStringToOString(foreignTable, m_rConnection.getConnectionEncoding()).getStr()); 2168*cdf0e10cSrcweir 2169*cdf0e10cSrcweir try { 2170*cdf0e10cSrcweir rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); 2171*cdf0e10cSrcweir std::auto_ptr< sql::ResultSet> rset( meta->getCrossReference(primaryCat, pSchema, pTable, foreignCat, fSchema, fTable)); 2172*cdf0e10cSrcweir sql::ResultSetMetaData * rs_meta = rset->getMetaData(); 2173*cdf0e10cSrcweir sal_uInt32 columns = rs_meta->getColumnCount(); 2174*cdf0e10cSrcweir while (rset->next()) { 2175*cdf0e10cSrcweir std::vector< Any > aRow(1); 2176*cdf0e10cSrcweir for (sal_uInt32 i = 1; i <= columns; i++) { 2177*cdf0e10cSrcweir aRow.push_back(makeAny(mysqlc_sdbc_driver::convert(rset->getString(i), encoding))); 2178*cdf0e10cSrcweir } 2179*cdf0e10cSrcweir rRows.push_back(aRow); 2180*cdf0e10cSrcweir } 2181*cdf0e10cSrcweir } catch (sql::MethodNotImplementedException) { 2182*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getCrossReference", *this); 2183*cdf0e10cSrcweir } catch (sql::InvalidArgumentException) { 2184*cdf0e10cSrcweir mysqlc_sdbc_driver::throwInvalidArgumentException("ODatabaseMetaData::getCrossReference", *this); 2185*cdf0e10cSrcweir } catch (const sql::SQLException& e) { 2186*cdf0e10cSrcweir mysqlc_sdbc_driver::translateAndThrow(e, *this, m_rConnection.getConnectionEncoding()); 2187*cdf0e10cSrcweir } 2188*cdf0e10cSrcweir 2189*cdf0e10cSrcweir lcl_setRows_throw(xResultSet,13,rRows); 2190*cdf0e10cSrcweir return xResultSet; 2191*cdf0e10cSrcweir } 2192*cdf0e10cSrcweir /* }}} */ 2193*cdf0e10cSrcweir 2194*cdf0e10cSrcweir 2195*cdf0e10cSrcweir /* {{{ ODatabaseMetaData::getUDTs() -I- */ 2196*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( 2197*cdf0e10cSrcweir const Any& /* catalog */, 2198*cdf0e10cSrcweir const OUString& /* schemaPattern */, 2199*cdf0e10cSrcweir const OUString& /* typeNamePattern */, 2200*cdf0e10cSrcweir const Sequence< sal_Int32 >& /* types */) 2201*cdf0e10cSrcweir throw(SQLException, RuntimeException) 2202*cdf0e10cSrcweir { 2203*cdf0e10cSrcweir OSL_TRACE("ODatabaseMetaData::getUDTs"); 2204*cdf0e10cSrcweir mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getUDTs", *this); 2205*cdf0e10cSrcweir return NULL; 2206*cdf0e10cSrcweir } 2207*cdf0e10cSrcweir /* }}} */ 2208*cdf0e10cSrcweir 2209*cdf0e10cSrcweir /* 2210*cdf0e10cSrcweir * Local variables: 2211*cdf0e10cSrcweir * tab-width: 4 2212*cdf0e10cSrcweir * c-basic-offset: 4 2213*cdf0e10cSrcweir * End: 2214*cdf0e10cSrcweir * vim600: noet sw=4 ts=4 fdm=marker 2215*cdf0e10cSrcweir * vim<600: noet sw=4 ts=4 2216*cdf0e10cSrcweir */ 2217*cdf0e10cSrcweir 2218