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