xref: /AOO41X/main/connectivity/source/drivers/kab/KDatabaseMetaData.cxx (revision 9b5730f6ddef7eb82608ca4d31dc0d7678e652cf)
1*9b5730f6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*9b5730f6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*9b5730f6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*9b5730f6SAndrew Rist  * distributed with this work for additional information
6*9b5730f6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*9b5730f6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*9b5730f6SAndrew Rist  * "License"); you may not use this file except in compliance
9*9b5730f6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*9b5730f6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*9b5730f6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*9b5730f6SAndrew Rist  * software distributed under the License is distributed on an
15*9b5730f6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9b5730f6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*9b5730f6SAndrew Rist  * specific language governing permissions and limitations
18*9b5730f6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*9b5730f6SAndrew Rist  *************************************************************/
21*9b5730f6SAndrew Rist 
22*9b5730f6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_connectivity.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "KDatabaseMetaData.hxx"
28cdf0e10cSrcweir #include "kfields.hxx"
29cdf0e10cSrcweir #include "KDEInit.h"
30cdf0e10cSrcweir #include <shell/kde_headers.h>
31cdf0e10cSrcweir #include "FDatabaseMetaDataResultSet.hxx"
32cdf0e10cSrcweir #include "OTypeInfo.hxx"
33cdf0e10cSrcweir #include <com/sun/star/sdbc/ColumnValue.hpp>
34cdf0e10cSrcweir #include <com/sun/star/sdbc/ResultSetType.hpp>
35cdf0e10cSrcweir #include <com/sun/star/sdbc/TransactionIsolation.hpp>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir using namespace connectivity::kab;
38cdf0e10cSrcweir using namespace com::sun::star::uno;
39cdf0e10cSrcweir using namespace com::sun::star::lang;
40cdf0e10cSrcweir using namespace com::sun::star::beans;
41cdf0e10cSrcweir using namespace com::sun::star::sdbc;
42cdf0e10cSrcweir 
KabDatabaseMetaData(KabConnection * _pCon)43cdf0e10cSrcweir KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon)
44cdf0e10cSrcweir 		: m_xConnection(_pCon),
45cdf0e10cSrcweir 		  m_bUseCatalog(sal_True)
46cdf0e10cSrcweir {
47cdf0e10cSrcweir 	OSL_ENSURE(_pCon,"KabDatabaseMetaData::KabDatabaseMetaData: No connection set!");
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 	osl_incrementInterlockedCount( &m_refCount );
50cdf0e10cSrcweir 	m_bUseCatalog	= !(usesLocalFiles() || usesLocalFilePerTable());
51cdf0e10cSrcweir 	osl_decrementInterlockedCount( &m_refCount );
52cdf0e10cSrcweir }
53cdf0e10cSrcweir // -------------------------------------------------------------------------
~KabDatabaseMetaData()54cdf0e10cSrcweir KabDatabaseMetaData::~KabDatabaseMetaData()
55cdf0e10cSrcweir {
56cdf0e10cSrcweir }
57cdf0e10cSrcweir // -------------------------------------------------------------------------
getAddressBookTableName()58cdf0e10cSrcweir const ::rtl::OUString & KabDatabaseMetaData::getAddressBookTableName()
59cdf0e10cSrcweir {
60cdf0e10cSrcweir 	static const ::rtl::OUString aAddressBookTableName
61cdf0e10cSrcweir 		(::rtl::OUString::createFromAscii( i18n("Address Book") ));
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	return aAddressBookTableName;
64cdf0e10cSrcweir }
65cdf0e10cSrcweir // -------------------------------------------------------------------------
getCatalogSeparator()66cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getCatalogSeparator(  ) throw(SQLException, RuntimeException)
67cdf0e10cSrcweir {
68cdf0e10cSrcweir 	::rtl::OUString aVal;
69cdf0e10cSrcweir 	if (m_bUseCatalog)
70cdf0e10cSrcweir 	{ // do some special here for you database
71cdf0e10cSrcweir 	}
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 	return aVal;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxBinaryLiteralLength()76cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxBinaryLiteralLength(  ) throw(SQLException, RuntimeException)
77cdf0e10cSrcweir {
78cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
79cdf0e10cSrcweir 	return nValue;
80cdf0e10cSrcweir }
81cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxRowSize()82cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxRowSize(  ) throw(SQLException, RuntimeException)
83cdf0e10cSrcweir {
84cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
85cdf0e10cSrcweir 	return nValue;
86cdf0e10cSrcweir }
87cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxCatalogNameLength()88cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCatalogNameLength(  ) throw(SQLException, RuntimeException)
89cdf0e10cSrcweir {
90cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
91cdf0e10cSrcweir 	return nValue;
92cdf0e10cSrcweir }
93cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxCharLiteralLength()94cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCharLiteralLength(  ) throw(SQLException, RuntimeException)
95cdf0e10cSrcweir {
96cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
97cdf0e10cSrcweir 	return nValue;
98cdf0e10cSrcweir }
99cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnNameLength()100cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnNameLength(  ) throw(SQLException, RuntimeException)
101cdf0e10cSrcweir {
102cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
103cdf0e10cSrcweir 	return nValue;
104cdf0e10cSrcweir }
105cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnsInIndex()106cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInIndex(  ) throw(SQLException, RuntimeException)
107cdf0e10cSrcweir {
108cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
109cdf0e10cSrcweir 	return nValue;
110cdf0e10cSrcweir }
111cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxCursorNameLength()112cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCursorNameLength(  ) throw(SQLException, RuntimeException)
113cdf0e10cSrcweir {
114cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
115cdf0e10cSrcweir 	return nValue;
116cdf0e10cSrcweir }
117cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxConnections()118cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxConnections(  ) throw(SQLException, RuntimeException)
119cdf0e10cSrcweir {
120cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
121cdf0e10cSrcweir 	return nValue;
122cdf0e10cSrcweir }
123cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnsInTable()124cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInTable(  ) throw(SQLException, RuntimeException)
125cdf0e10cSrcweir {
126cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
127cdf0e10cSrcweir 	return nValue;
128cdf0e10cSrcweir }
129cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxStatementLength()130cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxStatementLength(  ) throw(SQLException, RuntimeException)
131cdf0e10cSrcweir {
132cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
133cdf0e10cSrcweir 	return nValue;
134cdf0e10cSrcweir }
135cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxTableNameLength()136cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTableNameLength(  ) throw(SQLException, RuntimeException)
137cdf0e10cSrcweir {
138cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
139cdf0e10cSrcweir 	return nValue;
140cdf0e10cSrcweir }
141cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxTablesInSelect()142cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTablesInSelect(  ) throw(SQLException, RuntimeException)
143cdf0e10cSrcweir {
144cdf0e10cSrcweir 	// MaxTablesInSelect describes how many tables can participate in the FROM part of a given SELECT statement,
145cdf0e10cSrcweir 	// currently, the resultset/statement implementations can cope with one table only
146cdf0e10cSrcweir 	sal_Int32 nValue = 1;
147cdf0e10cSrcweir 	return nValue;
148cdf0e10cSrcweir }
149cdf0e10cSrcweir // -------------------------------------------------------------------------
doesMaxRowSizeIncludeBlobs()150cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::doesMaxRowSizeIncludeBlobs(  ) throw(SQLException, RuntimeException)
151cdf0e10cSrcweir {
152cdf0e10cSrcweir 	return sal_False;
153cdf0e10cSrcweir }
154cdf0e10cSrcweir // -------------------------------------------------------------------------
storesLowerCaseQuotedIdentifiers()155cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesLowerCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
156cdf0e10cSrcweir {
157cdf0e10cSrcweir 	return sal_False;
158cdf0e10cSrcweir }
159cdf0e10cSrcweir // -------------------------------------------------------------------------
storesLowerCaseIdentifiers()160cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesLowerCaseIdentifiers(  ) throw(SQLException, RuntimeException)
161cdf0e10cSrcweir {
162cdf0e10cSrcweir 	return sal_False;
163cdf0e10cSrcweir }
164cdf0e10cSrcweir // -------------------------------------------------------------------------
storesMixedCaseQuotedIdentifiers()165cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesMixedCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
166cdf0e10cSrcweir {
167cdf0e10cSrcweir 	return sal_False;
168cdf0e10cSrcweir }
169cdf0e10cSrcweir // -------------------------------------------------------------------------
storesMixedCaseIdentifiers()170cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException)
171cdf0e10cSrcweir {
172cdf0e10cSrcweir 	return sal_False;
173cdf0e10cSrcweir }
174cdf0e10cSrcweir // -------------------------------------------------------------------------
storesUpperCaseQuotedIdentifiers()175cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesUpperCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
176cdf0e10cSrcweir {
177cdf0e10cSrcweir 	return sal_False;
178cdf0e10cSrcweir }
179cdf0e10cSrcweir // -------------------------------------------------------------------------
storesUpperCaseIdentifiers()180cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::storesUpperCaseIdentifiers(  ) throw(SQLException, RuntimeException)
181cdf0e10cSrcweir {
182cdf0e10cSrcweir 	return sal_False;
183cdf0e10cSrcweir }
184cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsAlterTableWithAddColumn()185cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsAlterTableWithAddColumn(  ) throw(SQLException, RuntimeException)
186cdf0e10cSrcweir {
187cdf0e10cSrcweir 	return sal_False;
188cdf0e10cSrcweir }
189cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsAlterTableWithDropColumn()190cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsAlterTableWithDropColumn(  ) throw(SQLException, RuntimeException)
191cdf0e10cSrcweir {
192cdf0e10cSrcweir 	return sal_False;
193cdf0e10cSrcweir }
194cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxIndexLength()195cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxIndexLength(  ) throw(SQLException, RuntimeException)
196cdf0e10cSrcweir {
197cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
198cdf0e10cSrcweir 	return nValue;
199cdf0e10cSrcweir }
200cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsNonNullableColumns()201cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsNonNullableColumns(  ) throw(SQLException, RuntimeException)
202cdf0e10cSrcweir {
203cdf0e10cSrcweir 	return sal_False;
204cdf0e10cSrcweir }
205cdf0e10cSrcweir // -------------------------------------------------------------------------
getCatalogTerm()206cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getCatalogTerm(  ) throw(SQLException, RuntimeException)
207cdf0e10cSrcweir {
208cdf0e10cSrcweir 	::rtl::OUString aVal;
209cdf0e10cSrcweir 	if (m_bUseCatalog)
210cdf0e10cSrcweir 	{
211cdf0e10cSrcweir 	}
212cdf0e10cSrcweir 	return aVal;
213cdf0e10cSrcweir }
214cdf0e10cSrcweir // -------------------------------------------------------------------------
getIdentifierQuoteString()215cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getIdentifierQuoteString(  ) throw(SQLException, RuntimeException)
216cdf0e10cSrcweir {
217cdf0e10cSrcweir 	// normally this is "
218cdf0e10cSrcweir 	::rtl::OUString aVal = ::rtl::OUString::createFromAscii("\"");
219cdf0e10cSrcweir 	return aVal;
220cdf0e10cSrcweir }
221cdf0e10cSrcweir // -------------------------------------------------------------------------
getExtraNameCharacters()222cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getExtraNameCharacters(  ) throw(SQLException, RuntimeException)
223cdf0e10cSrcweir {
224cdf0e10cSrcweir 	::rtl::OUString aVal;
225cdf0e10cSrcweir 	return aVal;
226cdf0e10cSrcweir }
227cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsDifferentTableCorrelationNames()228cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsDifferentTableCorrelationNames(  ) throw(SQLException, RuntimeException)
229cdf0e10cSrcweir {
230cdf0e10cSrcweir 	return sal_False;
231cdf0e10cSrcweir }
232cdf0e10cSrcweir // -------------------------------------------------------------------------
isCatalogAtStart()233cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::isCatalogAtStart(  ) throw(SQLException, RuntimeException)
234cdf0e10cSrcweir {
235cdf0e10cSrcweir 	sal_Bool bValue = sal_False;
236cdf0e10cSrcweir 	if (m_bUseCatalog)
237cdf0e10cSrcweir 	{
238cdf0e10cSrcweir 	}
239cdf0e10cSrcweir 	return bValue;
240cdf0e10cSrcweir }
241cdf0e10cSrcweir // -------------------------------------------------------------------------
dataDefinitionIgnoredInTransactions()242cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::dataDefinitionIgnoredInTransactions(  ) throw(SQLException, RuntimeException)
243cdf0e10cSrcweir {
244cdf0e10cSrcweir 	return sal_True;
245cdf0e10cSrcweir }
246cdf0e10cSrcweir // -------------------------------------------------------------------------
dataDefinitionCausesTransactionCommit()247cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::dataDefinitionCausesTransactionCommit(  ) throw(SQLException, RuntimeException)
248cdf0e10cSrcweir {
249cdf0e10cSrcweir 	return sal_True;
250cdf0e10cSrcweir }
251cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsDataManipulationTransactionsOnly()252cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsDataManipulationTransactionsOnly(  ) throw(SQLException, RuntimeException)
253cdf0e10cSrcweir {
254cdf0e10cSrcweir 	return sal_True;
255cdf0e10cSrcweir }
256cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsDataDefinitionAndDataManipulationTransactions()257cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions(  ) throw(SQLException, RuntimeException)
258cdf0e10cSrcweir {
259cdf0e10cSrcweir 	return sal_True;
260cdf0e10cSrcweir }
261cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsPositionedDelete()262cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsPositionedDelete(  ) throw(SQLException, RuntimeException)
263cdf0e10cSrcweir {
264cdf0e10cSrcweir 	return sal_False;
265cdf0e10cSrcweir }
266cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsPositionedUpdate()267cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsPositionedUpdate(  ) throw(SQLException, RuntimeException)
268cdf0e10cSrcweir {
269cdf0e10cSrcweir 	return sal_False;
270cdf0e10cSrcweir }
271cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOpenStatementsAcrossRollback()272cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenStatementsAcrossRollback(  ) throw(SQLException, RuntimeException)
273cdf0e10cSrcweir {
274cdf0e10cSrcweir 	return sal_False;
275cdf0e10cSrcweir }
276cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOpenStatementsAcrossCommit()277cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenStatementsAcrossCommit(  ) throw(SQLException, RuntimeException)
278cdf0e10cSrcweir {
279cdf0e10cSrcweir 	return sal_False;
280cdf0e10cSrcweir }
281cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOpenCursorsAcrossCommit()282cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenCursorsAcrossCommit(  ) throw(SQLException, RuntimeException)
283cdf0e10cSrcweir {
284cdf0e10cSrcweir 	return sal_False;
285cdf0e10cSrcweir }
286cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOpenCursorsAcrossRollback()287cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenCursorsAcrossRollback(  ) throw(SQLException, RuntimeException)
288cdf0e10cSrcweir {
289cdf0e10cSrcweir 	return sal_False;
290cdf0e10cSrcweir }
291cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsTransactionIsolationLevel(sal_Int32)292cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 ) throw(SQLException, RuntimeException)
293cdf0e10cSrcweir {
294cdf0e10cSrcweir 	return sal_False;
295cdf0e10cSrcweir }
296cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSchemasInDataManipulation()297cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInDataManipulation(  ) throw(SQLException, RuntimeException)
298cdf0e10cSrcweir {
299cdf0e10cSrcweir 	return sal_False;
300cdf0e10cSrcweir }
301cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsANSI92FullSQL()302cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92FullSQL(  ) throw(SQLException, RuntimeException)
303cdf0e10cSrcweir {
304cdf0e10cSrcweir 	return sal_False;
305cdf0e10cSrcweir }
306cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsANSI92EntryLevelSQL()307cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92EntryLevelSQL(  ) throw(SQLException, RuntimeException)
308cdf0e10cSrcweir {
309cdf0e10cSrcweir 	return sal_True; // should be supported at least
310cdf0e10cSrcweir }
311cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsIntegrityEnhancementFacility()312cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsIntegrityEnhancementFacility(  ) throw(SQLException, RuntimeException)
313cdf0e10cSrcweir {
314cdf0e10cSrcweir 	return sal_False;
315cdf0e10cSrcweir }
316cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSchemasInIndexDefinitions()317cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInIndexDefinitions(  ) throw(SQLException, RuntimeException)
318cdf0e10cSrcweir {
319cdf0e10cSrcweir 	return sal_False;
320cdf0e10cSrcweir }
321cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSchemasInTableDefinitions()322cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInTableDefinitions(  ) throw(SQLException, RuntimeException)
323cdf0e10cSrcweir {
324cdf0e10cSrcweir 	return sal_False;
325cdf0e10cSrcweir }
326cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCatalogsInTableDefinitions()327cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInTableDefinitions(  ) throw(SQLException, RuntimeException)
328cdf0e10cSrcweir {
329cdf0e10cSrcweir 	return sal_False;
330cdf0e10cSrcweir }
331cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCatalogsInIndexDefinitions()332cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInIndexDefinitions(  ) throw(SQLException, RuntimeException)
333cdf0e10cSrcweir {
334cdf0e10cSrcweir 	return sal_False;
335cdf0e10cSrcweir }
336cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCatalogsInDataManipulation()337cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInDataManipulation(  ) throw(SQLException, RuntimeException)
338cdf0e10cSrcweir {
339cdf0e10cSrcweir 	return sal_False;
340cdf0e10cSrcweir }
341cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOuterJoins()342cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOuterJoins(  ) throw(SQLException, RuntimeException)
343cdf0e10cSrcweir {
344cdf0e10cSrcweir 	return sal_False;
345cdf0e10cSrcweir }
346cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxStatements()347cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxStatements(  ) throw(SQLException, RuntimeException)
348cdf0e10cSrcweir {
349cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
350cdf0e10cSrcweir 	return nValue;
351cdf0e10cSrcweir }
352cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxProcedureNameLength()353cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxProcedureNameLength(  ) throw(SQLException, RuntimeException)
354cdf0e10cSrcweir {
355cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
356cdf0e10cSrcweir 	return nValue;
357cdf0e10cSrcweir }
358cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxSchemaNameLength()359cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxSchemaNameLength(  ) throw(SQLException, RuntimeException)
360cdf0e10cSrcweir {
361cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
362cdf0e10cSrcweir 	return nValue;
363cdf0e10cSrcweir }
364cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsTransactions()365cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsTransactions(  ) throw(SQLException, RuntimeException)
366cdf0e10cSrcweir {
367cdf0e10cSrcweir 	return sal_False;
368cdf0e10cSrcweir }
369cdf0e10cSrcweir // -------------------------------------------------------------------------
allProceduresAreCallable()370cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::allProceduresAreCallable(  ) throw(SQLException, RuntimeException)
371cdf0e10cSrcweir {
372cdf0e10cSrcweir 	return sal_False;
373cdf0e10cSrcweir }
374cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsStoredProcedures()375cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsStoredProcedures(  ) throw(SQLException, RuntimeException)
376cdf0e10cSrcweir {
377cdf0e10cSrcweir 	return sal_False;
378cdf0e10cSrcweir }
379cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSelectForUpdate()380cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSelectForUpdate(  ) throw(SQLException, RuntimeException)
381cdf0e10cSrcweir {
382cdf0e10cSrcweir 	return sal_False;
383cdf0e10cSrcweir }
384cdf0e10cSrcweir // -------------------------------------------------------------------------
allTablesAreSelectable()385cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::allTablesAreSelectable(  ) throw(SQLException, RuntimeException)
386cdf0e10cSrcweir {
387cdf0e10cSrcweir 	return sal_False;
388cdf0e10cSrcweir }
389cdf0e10cSrcweir // -------------------------------------------------------------------------
isReadOnly()390cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::isReadOnly(  ) throw(SQLException, RuntimeException)
391cdf0e10cSrcweir {
392cdf0e10cSrcweir 	// for the moment, we have read-only addresses, but this might change in the future
393cdf0e10cSrcweir 	return sal_True;
394cdf0e10cSrcweir }
395cdf0e10cSrcweir // -------------------------------------------------------------------------
usesLocalFiles()396cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::usesLocalFiles(  ) throw(SQLException, RuntimeException)
397cdf0e10cSrcweir {
398cdf0e10cSrcweir 	return sal_False;
399cdf0e10cSrcweir }
400cdf0e10cSrcweir // -------------------------------------------------------------------------
usesLocalFilePerTable()401cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::usesLocalFilePerTable(  ) throw(SQLException, RuntimeException)
402cdf0e10cSrcweir {
403cdf0e10cSrcweir 	return sal_False;
404cdf0e10cSrcweir }
405cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsTypeConversion()406cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsTypeConversion(  ) throw(SQLException, RuntimeException)
407cdf0e10cSrcweir {
408cdf0e10cSrcweir 	return sal_False;
409cdf0e10cSrcweir }
410cdf0e10cSrcweir // -------------------------------------------------------------------------
nullPlusNonNullIsNull()411cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::nullPlusNonNullIsNull(  ) throw(SQLException, RuntimeException)
412cdf0e10cSrcweir {
413cdf0e10cSrcweir 	return sal_False;
414cdf0e10cSrcweir }
415cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsColumnAliasing()416cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsColumnAliasing(  ) throw(SQLException, RuntimeException)
417cdf0e10cSrcweir {
418cdf0e10cSrcweir 	return sal_False;
419cdf0e10cSrcweir }
420cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsTableCorrelationNames()421cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsTableCorrelationNames(  ) throw(SQLException, RuntimeException)
422cdf0e10cSrcweir {
423cdf0e10cSrcweir 	return sal_False;
424cdf0e10cSrcweir }
425cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsConvert(sal_Int32,sal_Int32)426cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsConvert( sal_Int32, sal_Int32 ) throw(SQLException, RuntimeException)
427cdf0e10cSrcweir {
428cdf0e10cSrcweir 	return sal_False;
429cdf0e10cSrcweir }
430cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsExpressionsInOrderBy()431cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsExpressionsInOrderBy(  ) throw(SQLException, RuntimeException)
432cdf0e10cSrcweir {
433cdf0e10cSrcweir 	return sal_False;
434cdf0e10cSrcweir }
435cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsGroupBy()436cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupBy(  ) throw(SQLException, RuntimeException)
437cdf0e10cSrcweir {
438cdf0e10cSrcweir 	return sal_False;
439cdf0e10cSrcweir }
440cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsGroupByBeyondSelect()441cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupByBeyondSelect(  ) throw(SQLException, RuntimeException)
442cdf0e10cSrcweir {
443cdf0e10cSrcweir 	return sal_False;
444cdf0e10cSrcweir }
445cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsGroupByUnrelated()446cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupByUnrelated(  ) throw(SQLException, RuntimeException)
447cdf0e10cSrcweir {
448cdf0e10cSrcweir 	return sal_False;
449cdf0e10cSrcweir }
450cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsMultipleTransactions()451cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsMultipleTransactions(  ) throw(SQLException, RuntimeException)
452cdf0e10cSrcweir {
453cdf0e10cSrcweir 	return sal_False;
454cdf0e10cSrcweir }
455cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsMultipleResultSets()456cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsMultipleResultSets(  ) throw(SQLException, RuntimeException)
457cdf0e10cSrcweir {
458cdf0e10cSrcweir 	return sal_False;
459cdf0e10cSrcweir }
460cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsLikeEscapeClause()461cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsLikeEscapeClause(  ) throw(SQLException, RuntimeException)
462cdf0e10cSrcweir {
463cdf0e10cSrcweir 	return sal_False;
464cdf0e10cSrcweir }
465cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsOrderByUnrelated()466cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsOrderByUnrelated(  ) throw(SQLException, RuntimeException)
467cdf0e10cSrcweir {
468cdf0e10cSrcweir 	return sal_False;
469cdf0e10cSrcweir }
470cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsUnion()471cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsUnion(  ) throw(SQLException, RuntimeException)
472cdf0e10cSrcweir {
473cdf0e10cSrcweir 	return sal_False;
474cdf0e10cSrcweir }
475cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsUnionAll()476cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsUnionAll(  ) throw(SQLException, RuntimeException)
477cdf0e10cSrcweir {
478cdf0e10cSrcweir 	return sal_False;
479cdf0e10cSrcweir }
480cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsMixedCaseIdentifiers()481cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException)
482cdf0e10cSrcweir {
483cdf0e10cSrcweir 	return sal_False;
484cdf0e10cSrcweir }
485cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsMixedCaseQuotedIdentifiers()486cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsMixedCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
487cdf0e10cSrcweir {
488cdf0e10cSrcweir 	return sal_False;
489cdf0e10cSrcweir }
490cdf0e10cSrcweir // -------------------------------------------------------------------------
nullsAreSortedAtEnd()491cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedAtEnd(  ) throw(SQLException, RuntimeException)
492cdf0e10cSrcweir {
493cdf0e10cSrcweir 	return sal_False;
494cdf0e10cSrcweir }
495cdf0e10cSrcweir // -------------------------------------------------------------------------
nullsAreSortedAtStart()496cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedAtStart(  ) throw(SQLException, RuntimeException)
497cdf0e10cSrcweir {
498cdf0e10cSrcweir 	return sal_False;
499cdf0e10cSrcweir }
500cdf0e10cSrcweir // -------------------------------------------------------------------------
nullsAreSortedHigh()501cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedHigh(  ) throw(SQLException, RuntimeException)
502cdf0e10cSrcweir {
503cdf0e10cSrcweir 	return sal_False;
504cdf0e10cSrcweir }
505cdf0e10cSrcweir // -------------------------------------------------------------------------
nullsAreSortedLow()506cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedLow(  ) throw(SQLException, RuntimeException)
507cdf0e10cSrcweir {
508cdf0e10cSrcweir 	return sal_False;
509cdf0e10cSrcweir }
510cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSchemasInProcedureCalls()511cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInProcedureCalls(  ) throw(SQLException, RuntimeException)
512cdf0e10cSrcweir {
513cdf0e10cSrcweir 	return sal_False;
514cdf0e10cSrcweir }
515cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSchemasInPrivilegeDefinitions()516cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException)
517cdf0e10cSrcweir {
518cdf0e10cSrcweir 	return sal_False;
519cdf0e10cSrcweir }
520cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCatalogsInProcedureCalls()521cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInProcedureCalls(  ) throw(SQLException, RuntimeException)
522cdf0e10cSrcweir {
523cdf0e10cSrcweir 	return sal_False;
524cdf0e10cSrcweir }
525cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCatalogsInPrivilegeDefinitions()526cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException)
527cdf0e10cSrcweir {
528cdf0e10cSrcweir 	return sal_False;
529cdf0e10cSrcweir }
530cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCorrelatedSubqueries()531cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCorrelatedSubqueries(  ) throw(SQLException, RuntimeException)
532cdf0e10cSrcweir {
533cdf0e10cSrcweir 	return sal_False;
534cdf0e10cSrcweir }
535cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSubqueriesInComparisons()536cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInComparisons(  ) throw(SQLException, RuntimeException)
537cdf0e10cSrcweir {
538cdf0e10cSrcweir 	return sal_False;
539cdf0e10cSrcweir }
540cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSubqueriesInExists()541cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInExists(  ) throw(SQLException, RuntimeException)
542cdf0e10cSrcweir {
543cdf0e10cSrcweir 	return sal_False;
544cdf0e10cSrcweir }
545cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSubqueriesInIns()546cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInIns(  ) throw(SQLException, RuntimeException)
547cdf0e10cSrcweir {
548cdf0e10cSrcweir 	return sal_False;
549cdf0e10cSrcweir }
550cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsSubqueriesInQuantifieds()551cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInQuantifieds(  ) throw(SQLException, RuntimeException)
552cdf0e10cSrcweir {
553cdf0e10cSrcweir 	return sal_False;
554cdf0e10cSrcweir }
555cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsANSI92IntermediateSQL()556cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL(  ) throw(SQLException, RuntimeException)
557cdf0e10cSrcweir {
558cdf0e10cSrcweir 	return sal_False;
559cdf0e10cSrcweir }
560cdf0e10cSrcweir // -------------------------------------------------------------------------
getURL()561cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException)
562cdf0e10cSrcweir {
563cdf0e10cSrcweir 	// if someday we support more than the default address book,
564cdf0e10cSrcweir 	// this method should return the URL which was used to create it
565cdf0e10cSrcweir 	::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:address:kab:");
566cdf0e10cSrcweir 	return aValue;
567cdf0e10cSrcweir }
568cdf0e10cSrcweir // -------------------------------------------------------------------------
getUserName()569cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getUserName(  ) throw(SQLException, RuntimeException)
570cdf0e10cSrcweir {
571cdf0e10cSrcweir 	::rtl::OUString aValue;
572cdf0e10cSrcweir 	return aValue;
573cdf0e10cSrcweir }
574cdf0e10cSrcweir // -------------------------------------------------------------------------
getDriverName()575cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverName(  ) throw(SQLException, RuntimeException)
576cdf0e10cSrcweir {
577cdf0e10cSrcweir 	::rtl::OUString aValue = ::rtl::OUString::createFromAscii("kab");
578cdf0e10cSrcweir 	return aValue;
579cdf0e10cSrcweir }
580cdf0e10cSrcweir // -------------------------------------------------------------------------
getDriverVersion()581cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
582cdf0e10cSrcweir {
583cdf0e10cSrcweir 	::rtl::OUString aValue = ::rtl::OUString::createFromAscii(KAB_DRIVER_VERSION);
584cdf0e10cSrcweir 	return aValue;
585cdf0e10cSrcweir }
586cdf0e10cSrcweir // -------------------------------------------------------------------------
getDatabaseProductVersion()587cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDatabaseProductVersion(  ) throw(SQLException, RuntimeException)
588cdf0e10cSrcweir {
589cdf0e10cSrcweir 	::rtl::OUString aValue;
590cdf0e10cSrcweir 	return aValue;
591cdf0e10cSrcweir }
592cdf0e10cSrcweir // -------------------------------------------------------------------------
getDatabaseProductName()593cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getDatabaseProductName(  ) throw(SQLException, RuntimeException)
594cdf0e10cSrcweir {
595cdf0e10cSrcweir 	::rtl::OUString aValue;
596cdf0e10cSrcweir 	return aValue;
597cdf0e10cSrcweir }
598cdf0e10cSrcweir // -------------------------------------------------------------------------
getProcedureTerm()599cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getProcedureTerm(  ) throw(SQLException, RuntimeException)
600cdf0e10cSrcweir {
601cdf0e10cSrcweir 	::rtl::OUString aValue;
602cdf0e10cSrcweir 	return aValue;
603cdf0e10cSrcweir }
604cdf0e10cSrcweir // -------------------------------------------------------------------------
getSchemaTerm()605cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getSchemaTerm(  ) throw(SQLException, RuntimeException)
606cdf0e10cSrcweir {
607cdf0e10cSrcweir 	::rtl::OUString aValue;
608cdf0e10cSrcweir 	return aValue;
609cdf0e10cSrcweir }
610cdf0e10cSrcweir // -------------------------------------------------------------------------
getDriverMajorVersion()611cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getDriverMajorVersion(  ) throw(RuntimeException)
612cdf0e10cSrcweir {
613cdf0e10cSrcweir 	return KAB_DRIVER_VERSION_MAJOR;
614cdf0e10cSrcweir }
615cdf0e10cSrcweir // -------------------------------------------------------------------------
getDefaultTransactionIsolation()616cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getDefaultTransactionIsolation(  ) throw(SQLException, RuntimeException)
617cdf0e10cSrcweir {
618cdf0e10cSrcweir 	return TransactionIsolation::NONE;
619cdf0e10cSrcweir }
620cdf0e10cSrcweir // -------------------------------------------------------------------------
getDriverMinorVersion()621cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getDriverMinorVersion(  ) throw(RuntimeException)
622cdf0e10cSrcweir {
623cdf0e10cSrcweir 	return KAB_DRIVER_VERSION_MINOR;
624cdf0e10cSrcweir }
625cdf0e10cSrcweir // -------------------------------------------------------------------------
getSQLKeywords()626cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getSQLKeywords(  ) throw(SQLException, RuntimeException)
627cdf0e10cSrcweir {
628cdf0e10cSrcweir 	::rtl::OUString aValue;
629cdf0e10cSrcweir 	return aValue;
630cdf0e10cSrcweir }
631cdf0e10cSrcweir // -------------------------------------------------------------------------
getSearchStringEscape()632cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getSearchStringEscape(  ) throw(SQLException, RuntimeException)
633cdf0e10cSrcweir {
634cdf0e10cSrcweir 	::rtl::OUString aValue;
635cdf0e10cSrcweir 	return aValue;
636cdf0e10cSrcweir }
637cdf0e10cSrcweir // -------------------------------------------------------------------------
getStringFunctions()638cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getStringFunctions(  ) throw(SQLException, RuntimeException)
639cdf0e10cSrcweir {
640cdf0e10cSrcweir 	return ::rtl::OUString();
641cdf0e10cSrcweir }
642cdf0e10cSrcweir // -------------------------------------------------------------------------
getTimeDateFunctions()643cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getTimeDateFunctions(  ) throw(SQLException, RuntimeException)
644cdf0e10cSrcweir {
645cdf0e10cSrcweir 	return ::rtl::OUString();
646cdf0e10cSrcweir }
647cdf0e10cSrcweir // -------------------------------------------------------------------------
getSystemFunctions()648cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getSystemFunctions(  ) throw(SQLException, RuntimeException)
649cdf0e10cSrcweir {
650cdf0e10cSrcweir 	return ::rtl::OUString();
651cdf0e10cSrcweir }
652cdf0e10cSrcweir // -------------------------------------------------------------------------
getNumericFunctions()653cdf0e10cSrcweir ::rtl::OUString SAL_CALL KabDatabaseMetaData::getNumericFunctions(  ) throw(SQLException, RuntimeException)
654cdf0e10cSrcweir {
655cdf0e10cSrcweir 	return ::rtl::OUString();
656cdf0e10cSrcweir }
657cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsExtendedSQLGrammar()658cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsExtendedSQLGrammar(  ) throw(SQLException, RuntimeException)
659cdf0e10cSrcweir {
660cdf0e10cSrcweir 	return sal_False;
661cdf0e10cSrcweir }
662cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsCoreSQLGrammar()663cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsCoreSQLGrammar(  ) throw(SQLException, RuntimeException)
664cdf0e10cSrcweir {
665cdf0e10cSrcweir 	return sal_False;
666cdf0e10cSrcweir }
667cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsMinimumSQLGrammar()668cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsMinimumSQLGrammar(  ) throw(SQLException, RuntimeException)
669cdf0e10cSrcweir {
670cdf0e10cSrcweir 	return sal_True;
671cdf0e10cSrcweir }
672cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsFullOuterJoins()673cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsFullOuterJoins(  ) throw(SQLException, RuntimeException)
674cdf0e10cSrcweir {
675cdf0e10cSrcweir 	return sal_False;
676cdf0e10cSrcweir }
677cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsLimitedOuterJoins()678cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsLimitedOuterJoins(  ) throw(SQLException, RuntimeException)
679cdf0e10cSrcweir {
680cdf0e10cSrcweir 	return sal_False;
681cdf0e10cSrcweir }
682cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnsInGroupBy()683cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInGroupBy(  ) throw(SQLException, RuntimeException)
684cdf0e10cSrcweir {
685cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
686cdf0e10cSrcweir 	return nValue;
687cdf0e10cSrcweir }
688cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnsInOrderBy()689cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInOrderBy(  ) throw(SQLException, RuntimeException)
690cdf0e10cSrcweir {
691cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
692cdf0e10cSrcweir 	return nValue;
693cdf0e10cSrcweir }
694cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxColumnsInSelect()695cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInSelect(  ) throw(SQLException, RuntimeException)
696cdf0e10cSrcweir {
697cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
698cdf0e10cSrcweir 	return nValue;
699cdf0e10cSrcweir }
700cdf0e10cSrcweir // -------------------------------------------------------------------------
getMaxUserNameLength()701cdf0e10cSrcweir sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxUserNameLength(  ) throw(SQLException, RuntimeException)
702cdf0e10cSrcweir {
703cdf0e10cSrcweir 	sal_Int32 nValue = 0; // 0 means no limit
704cdf0e10cSrcweir 	return nValue;
705cdf0e10cSrcweir }
706cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsResultSetType(sal_Int32 setType)707cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException)
708cdf0e10cSrcweir {
709cdf0e10cSrcweir 	switch (setType)
710cdf0e10cSrcweir 	{
711cdf0e10cSrcweir 		case ResultSetType::FORWARD_ONLY:
712cdf0e10cSrcweir 		case ResultSetType::SCROLL_INSENSITIVE:
713cdf0e10cSrcweir 			return sal_True;
714cdf0e10cSrcweir 	}
715cdf0e10cSrcweir 	return sal_False;
716cdf0e10cSrcweir }
717cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsResultSetConcurrency(sal_Int32 setType,sal_Int32)718cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 ) throw(SQLException, RuntimeException)
719cdf0e10cSrcweir {
720cdf0e10cSrcweir 	switch (setType)
721cdf0e10cSrcweir 	{
722cdf0e10cSrcweir 		case ResultSetType::FORWARD_ONLY:
723cdf0e10cSrcweir 		case ResultSetType::SCROLL_INSENSITIVE:
724cdf0e10cSrcweir 			return sal_True;
725cdf0e10cSrcweir 	}
726cdf0e10cSrcweir 	return sal_False;
727cdf0e10cSrcweir }
728cdf0e10cSrcweir // -------------------------------------------------------------------------
ownUpdatesAreVisible(sal_Int32)729cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::ownUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
730cdf0e10cSrcweir {
731cdf0e10cSrcweir 	return sal_False;
732cdf0e10cSrcweir }
733cdf0e10cSrcweir // -------------------------------------------------------------------------
ownDeletesAreVisible(sal_Int32)734cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::ownDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
735cdf0e10cSrcweir {
736cdf0e10cSrcweir 	return sal_False;
737cdf0e10cSrcweir }
738cdf0e10cSrcweir // -------------------------------------------------------------------------
ownInsertsAreVisible(sal_Int32)739cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::ownInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
740cdf0e10cSrcweir {
741cdf0e10cSrcweir 	return sal_False;
742cdf0e10cSrcweir }
743cdf0e10cSrcweir // -------------------------------------------------------------------------
othersUpdatesAreVisible(sal_Int32)744cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::othersUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
745cdf0e10cSrcweir {
746cdf0e10cSrcweir 	return sal_False;
747cdf0e10cSrcweir }
748cdf0e10cSrcweir // -------------------------------------------------------------------------
othersDeletesAreVisible(sal_Int32)749cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::othersDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
750cdf0e10cSrcweir {
751cdf0e10cSrcweir 	return sal_False;
752cdf0e10cSrcweir }
753cdf0e10cSrcweir // -------------------------------------------------------------------------
othersInsertsAreVisible(sal_Int32)754cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::othersInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException)
755cdf0e10cSrcweir {
756cdf0e10cSrcweir 	return sal_False;
757cdf0e10cSrcweir }
758cdf0e10cSrcweir // -------------------------------------------------------------------------
updatesAreDetected(sal_Int32)759cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::updatesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException)
760cdf0e10cSrcweir {
761cdf0e10cSrcweir 	return sal_False;
762cdf0e10cSrcweir }
763cdf0e10cSrcweir // -------------------------------------------------------------------------
deletesAreDetected(sal_Int32)764cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::deletesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException)
765cdf0e10cSrcweir {
766cdf0e10cSrcweir 	return sal_False;
767cdf0e10cSrcweir }
768cdf0e10cSrcweir // -------------------------------------------------------------------------
insertsAreDetected(sal_Int32)769cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::insertsAreDetected( sal_Int32 ) throw(SQLException, RuntimeException)
770cdf0e10cSrcweir {
771cdf0e10cSrcweir 	return sal_False;
772cdf0e10cSrcweir }
773cdf0e10cSrcweir // -------------------------------------------------------------------------
supportsBatchUpdates()774cdf0e10cSrcweir sal_Bool SAL_CALL KabDatabaseMetaData::supportsBatchUpdates(  ) throw(SQLException, RuntimeException)
775cdf0e10cSrcweir {
776cdf0e10cSrcweir 	return sal_False;
777cdf0e10cSrcweir }
778cdf0e10cSrcweir // -------------------------------------------------------------------------
getConnection()779cdf0e10cSrcweir Reference< XConnection > SAL_CALL KabDatabaseMetaData::getConnection(  ) throw(SQLException, RuntimeException)
780cdf0e10cSrcweir {
781cdf0e10cSrcweir 	return (Reference< XConnection >) m_xConnection.get();
782cdf0e10cSrcweir }
783cdf0e10cSrcweir // -------------------------------------------------------------------------
getTableTypes()784cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes(  ) throw(SQLException, RuntimeException)
785cdf0e10cSrcweir {
786cdf0e10cSrcweir 	::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
787cdf0e10cSrcweir 	Reference< XResultSet > xRef = pResult;
788cdf0e10cSrcweir 
789cdf0e10cSrcweir 	static ODatabaseMetaDataResultSet::ORows aRows;
790cdf0e10cSrcweir 	static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE"));
791cdf0e10cSrcweir 
792cdf0e10cSrcweir 	if (aRows.empty())
793cdf0e10cSrcweir 	{
794cdf0e10cSrcweir 		ODatabaseMetaDataResultSet::ORow aRow(2);
795cdf0e10cSrcweir 		aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
796cdf0e10cSrcweir 		aRow[1] = new ORowSetValueDecorator(aTable);
797cdf0e10cSrcweir 		aRows.push_back(aRow);
798cdf0e10cSrcweir 	}
799cdf0e10cSrcweir 	pResult->setRows(aRows);
800cdf0e10cSrcweir 	return xRef;
801cdf0e10cSrcweir }
802cdf0e10cSrcweir // -------------------------------------------------------------------------
getTypeInfo()803cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTypeInfo(  ) throw(SQLException, RuntimeException)
804cdf0e10cSrcweir {
805cdf0e10cSrcweir 	::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo);
806cdf0e10cSrcweir 	Reference< XResultSet > xRef = pResult;
807cdf0e10cSrcweir 
808cdf0e10cSrcweir 	static ODatabaseMetaDataResultSet::ORows aRows;
809cdf0e10cSrcweir 	if (aRows.empty())
810cdf0e10cSrcweir 	{
811cdf0e10cSrcweir 		ODatabaseMetaDataResultSet::ORow aRow(19);
812cdf0e10cSrcweir 
813cdf0e10cSrcweir 		aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
814cdf0e10cSrcweir 		aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR"));
815cdf0e10cSrcweir 		aRow[2] = new ORowSetValueDecorator(DataType::CHAR);
816cdf0e10cSrcweir 		aRow[3] = new ORowSetValueDecorator((sal_Int32) 254);
817cdf0e10cSrcweir 		aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue();
818cdf0e10cSrcweir 		aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue();
819cdf0e10cSrcweir 		aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue();
820cdf0e10cSrcweir 		aRow[7] = new ORowSetValueDecorator((sal_Int32) ColumnValue::NULLABLE);
821cdf0e10cSrcweir 		aRow[8] = ODatabaseMetaDataResultSet::get1Value();
822cdf0e10cSrcweir 		aRow[9] = new ORowSetValueDecorator((sal_Int32) ColumnSearch::CHAR);
823cdf0e10cSrcweir 		aRow[10] = ODatabaseMetaDataResultSet::get1Value();
824cdf0e10cSrcweir 		aRow[11] = ODatabaseMetaDataResultSet::get0Value();
825cdf0e10cSrcweir 		aRow[12] = ODatabaseMetaDataResultSet::get0Value();
826cdf0e10cSrcweir 		aRow[13] = ODatabaseMetaDataResultSet::getEmptyValue();
827cdf0e10cSrcweir 		aRow[14] = ODatabaseMetaDataResultSet::get0Value();
828cdf0e10cSrcweir 		aRow[15] = ODatabaseMetaDataResultSet::get0Value();
829cdf0e10cSrcweir 		aRow[16] = ODatabaseMetaDataResultSet::getEmptyValue();
830cdf0e10cSrcweir 		aRow[17] = ODatabaseMetaDataResultSet::getEmptyValue();
831cdf0e10cSrcweir 		aRow[18] = new ORowSetValueDecorator((sal_Int32) 10);
832cdf0e10cSrcweir 		aRows.push_back(aRow);
833cdf0e10cSrcweir // Much more types might appear in KDE address books
834cdf0e10cSrcweir // To be completed
835cdf0e10cSrcweir 	}
836cdf0e10cSrcweir 	pResult->setRows(aRows);
837cdf0e10cSrcweir 	return xRef;
838cdf0e10cSrcweir }
839cdf0e10cSrcweir // -------------------------------------------------------------------------
getCatalogs()840cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCatalogs(  ) throw(SQLException, RuntimeException)
841cdf0e10cSrcweir {
842cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs );
843cdf0e10cSrcweir }
844cdf0e10cSrcweir // -----------------------------------------------------------------------------
getSchemas()845cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getSchemas(  ) throw(SQLException, RuntimeException)
846cdf0e10cSrcweir {
847cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas );
848cdf0e10cSrcweir }
849cdf0e10cSrcweir // -------------------------------------------------------------------------
getColumnPrivileges(const Any &,const::rtl::OUString &,const::rtl::OUString &,const::rtl::OUString &)850cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumnPrivileges(
851cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString&,
852cdf0e10cSrcweir 	const ::rtl::OUString& ) throw(SQLException, RuntimeException)
853cdf0e10cSrcweir {
854cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges );
855cdf0e10cSrcweir }
856cdf0e10cSrcweir // -------------------------------------------------------------------------
getColumns(const Any &,const::rtl::OUString &,const::rtl::OUString & tableNamePattern,const::rtl::OUString & columnNamePattern)857cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns(
858cdf0e10cSrcweir 	const Any&,
859cdf0e10cSrcweir 	const ::rtl::OUString&,
860cdf0e10cSrcweir 	const ::rtl::OUString& tableNamePattern,
861cdf0e10cSrcweir 	const ::rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException)
862cdf0e10cSrcweir {
863cdf0e10cSrcweir 	::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns);
864cdf0e10cSrcweir 	Reference< XResultSet > xRef = pResult;
865cdf0e10cSrcweir 
866cdf0e10cSrcweir 	ODatabaseMetaDataResultSet::ORows aRows;
867cdf0e10cSrcweir 
868cdf0e10cSrcweir 	if (match(tableNamePattern, getAddressBookTableName(), '\0'))
869cdf0e10cSrcweir 	{
870cdf0e10cSrcweir 		ODatabaseMetaDataResultSet::ORow aRow(19);
871cdf0e10cSrcweir 
872cdf0e10cSrcweir 		aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
873cdf0e10cSrcweir 		aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue();
874cdf0e10cSrcweir 		aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue();
875cdf0e10cSrcweir 		aRow[3] = new ORowSetValueDecorator(getAddressBookTableName());
876cdf0e10cSrcweir 		aRow[8] = ODatabaseMetaDataResultSet::getEmptyValue();
877cdf0e10cSrcweir 		aRow[9] = ODatabaseMetaDataResultSet::get0Value();
878cdf0e10cSrcweir 		aRow[10] = new ORowSetValueDecorator((sal_Int32) 10);
879cdf0e10cSrcweir 		aRow[11] = ODatabaseMetaDataResultSet::get1Value();
880cdf0e10cSrcweir 		aRow[12] = ODatabaseMetaDataResultSet::getEmptyValue();
881cdf0e10cSrcweir 		aRow[13] = ODatabaseMetaDataResultSet::getEmptyValue();
882cdf0e10cSrcweir 		aRow[14] = ODatabaseMetaDataResultSet::getEmptyValue();
883cdf0e10cSrcweir 		aRow[15] = ODatabaseMetaDataResultSet::getEmptyValue();
884cdf0e10cSrcweir 		aRow[16] = new ORowSetValueDecorator((sal_Int32) 254);
885cdf0e10cSrcweir 		aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES"));
886cdf0e10cSrcweir 
887cdf0e10cSrcweir 		sal_Int32 nPosition = 1;
888cdf0e10cSrcweir 		QString aQtName;
889cdf0e10cSrcweir 		::rtl::OUString sName;
890cdf0e10cSrcweir 
891cdf0e10cSrcweir 		aQtName = ::KABC::Addressee::revisionLabel();
892cdf0e10cSrcweir 		sName = (const sal_Unicode *) aQtName.ucs2();
893cdf0e10cSrcweir 		if (match(columnNamePattern, sName, '\0'))
894cdf0e10cSrcweir 		{
895cdf0e10cSrcweir 			aRow[4] = new ORowSetValueDecorator(sName);
896cdf0e10cSrcweir 			aRow[5] = new ORowSetValueDecorator(DataType::TIMESTAMP);
897cdf0e10cSrcweir 			aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP"));
898cdf0e10cSrcweir 			aRow[17] = new ORowSetValueDecorator(nPosition++);
899cdf0e10cSrcweir 			aRows.push_back(aRow);
900cdf0e10cSrcweir 		}
901cdf0e10cSrcweir 
902cdf0e10cSrcweir 		::KABC::Field::List aFields = ::KABC::Field::allFields();
903cdf0e10cSrcweir 		::KABC::Field::List::iterator aField;
904cdf0e10cSrcweir 
905cdf0e10cSrcweir 		for (	aField = aFields.begin();
906cdf0e10cSrcweir 				aField != aFields.end();
907cdf0e10cSrcweir 				++aField, ++nPosition)
908cdf0e10cSrcweir 		{
909cdf0e10cSrcweir 			aQtName = (*aField)->label();
910cdf0e10cSrcweir 			sName = (const sal_Unicode *) aQtName.ucs2();
911cdf0e10cSrcweir 			if (match(columnNamePattern, sName, '\0'))
912cdf0e10cSrcweir 			{
913cdf0e10cSrcweir 				aRow[4] = new ORowSetValueDecorator(sName);
914cdf0e10cSrcweir 				aRow[5] = new ORowSetValueDecorator(DataType::CHAR);
915cdf0e10cSrcweir 				aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CHAR"));
916cdf0e10cSrcweir 				aRow[7] = new ORowSetValueDecorator((sal_Int32) 256);
917cdf0e10cSrcweir // Might be VARCHAR and not CHAR[256]...
918cdf0e10cSrcweir 				aRow[17] = new ORowSetValueDecorator(nPosition);
919cdf0e10cSrcweir 				aRows.push_back(aRow);
920cdf0e10cSrcweir 			}
921cdf0e10cSrcweir 		}
922cdf0e10cSrcweir 	}
923cdf0e10cSrcweir 	pResult->setRows(aRows);
924cdf0e10cSrcweir 	return xRef;
925cdf0e10cSrcweir }
926cdf0e10cSrcweir // -------------------------------------------------------------------------
getTables(const Any &,const::rtl::OUString &,const::rtl::OUString &,const Sequence<::rtl::OUString> & types)927cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables(
928cdf0e10cSrcweir 	const Any&,
929cdf0e10cSrcweir 	const ::rtl::OUString&,
930cdf0e10cSrcweir 	const ::rtl::OUString&,
931cdf0e10cSrcweir 	const Sequence< ::rtl::OUString >& types) throw(SQLException, RuntimeException)
932cdf0e10cSrcweir {
933cdf0e10cSrcweir 	::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTables);
934cdf0e10cSrcweir 	Reference< XResultSet > xRef = pResult;
935cdf0e10cSrcweir 
936cdf0e10cSrcweir 	// check whether we have tables in the requested types
937cdf0e10cSrcweir 	// for the moment, we answer only the "TABLE" table type
938cdf0e10cSrcweir 	// when no types are given at all, we return all the tables
939cdf0e10cSrcweir 	static const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE"));
940cdf0e10cSrcweir 	sal_Bool bTableFound = sal_False;
941cdf0e10cSrcweir 	const ::rtl::OUString* p = types.getConstArray(),
942cdf0e10cSrcweir 	                     * pEnd = p + types.getLength();
943cdf0e10cSrcweir 
944cdf0e10cSrcweir 	if (p == pEnd)
945cdf0e10cSrcweir 	{
946cdf0e10cSrcweir 		bTableFound = sal_True;
947cdf0e10cSrcweir 	}
948cdf0e10cSrcweir 	else while (p < pEnd)
949cdf0e10cSrcweir 	{
950cdf0e10cSrcweir 		if (match(*p, aTable, '\0'))
951cdf0e10cSrcweir 		{
952cdf0e10cSrcweir 			bTableFound = sal_True;
953cdf0e10cSrcweir 			break;
954cdf0e10cSrcweir 		}
955cdf0e10cSrcweir 		p++;
956cdf0e10cSrcweir 	}
957cdf0e10cSrcweir 	if (!bTableFound)
958cdf0e10cSrcweir 		return xRef;
959cdf0e10cSrcweir 
960cdf0e10cSrcweir 	static ODatabaseMetaDataResultSet::ORows aRows;
961cdf0e10cSrcweir 
962cdf0e10cSrcweir 	if (aRows.empty())
963cdf0e10cSrcweir 	{
964cdf0e10cSrcweir 		ODatabaseMetaDataResultSet::ORow aRow(6);
965cdf0e10cSrcweir 
966cdf0e10cSrcweir 		aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
967cdf0e10cSrcweir 		aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue();
968cdf0e10cSrcweir 		aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue();
969cdf0e10cSrcweir 		aRow[3] = new ORowSetValueDecorator(getAddressBookTableName());
970cdf0e10cSrcweir 		aRow[4] = new ORowSetValueDecorator(aTable);
971cdf0e10cSrcweir 		aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue();
972cdf0e10cSrcweir 		aRows.push_back(aRow);
973cdf0e10cSrcweir 	}
974cdf0e10cSrcweir 	pResult->setRows(aRows);
975cdf0e10cSrcweir 	return xRef;
976cdf0e10cSrcweir }
977cdf0e10cSrcweir // -------------------------------------------------------------------------
getProcedureColumns(const Any &,const::rtl::OUString &,const::rtl::OUString &,const::rtl::OUString &)978cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedureColumns(
979cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&,
980cdf0e10cSrcweir 	const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
981cdf0e10cSrcweir {
982cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns );
983cdf0e10cSrcweir }
984cdf0e10cSrcweir // -------------------------------------------------------------------------
getProcedures(const Any &,const::rtl::OUString &,const::rtl::OUString &)985cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedures(
986cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&,
987cdf0e10cSrcweir 	const ::rtl::OUString& ) throw(SQLException, RuntimeException)
988cdf0e10cSrcweir {
989cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures );
990cdf0e10cSrcweir }
991cdf0e10cSrcweir // -------------------------------------------------------------------------
getVersionColumns(const Any &,const::rtl::OUString &,const::rtl::OUString & table)992cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns(
993cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
994cdf0e10cSrcweir {
995cdf0e10cSrcweir     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns);
996cdf0e10cSrcweir 
997cdf0e10cSrcweir 	Reference< XResultSet > xRef = pResult;
998cdf0e10cSrcweir 
999cdf0e10cSrcweir 	ODatabaseMetaDataResultSet::ORows aRows;
1000cdf0e10cSrcweir 
1001cdf0e10cSrcweir 	if (table == getAddressBookTableName())
1002cdf0e10cSrcweir 	{
1003cdf0e10cSrcweir 		ODatabaseMetaDataResultSet::ORow aRow( 9 );
1004cdf0e10cSrcweir 		QString aQtName = ::KABC::Addressee::revisionLabel();
1005cdf0e10cSrcweir 		::rtl::OUString sName = (const sal_Unicode *) aQtName.ucs2();
1006cdf0e10cSrcweir 
1007cdf0e10cSrcweir 		aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
1008cdf0e10cSrcweir 		aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue();
1009cdf0e10cSrcweir 
1010cdf0e10cSrcweir 		aRow[2] = new ORowSetValueDecorator(sName);
1011cdf0e10cSrcweir 		aRow[3] = new ORowSetValueDecorator(DataType::TIMESTAMP);
1012cdf0e10cSrcweir 		aRow[4] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP"));
1013cdf0e10cSrcweir 
1014cdf0e10cSrcweir 		aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue();
1015cdf0e10cSrcweir 		aRow[6] = ODatabaseMetaDataResultSet::getEmptyValue();
1016cdf0e10cSrcweir 		aRow[7] = ODatabaseMetaDataResultSet::getEmptyValue();
1017cdf0e10cSrcweir 		aRow[8] = ODatabaseMetaDataResultSet::getEmptyValue();
1018cdf0e10cSrcweir 
1019cdf0e10cSrcweir 		aRows.push_back(aRow);
1020cdf0e10cSrcweir 	}
1021cdf0e10cSrcweir 	pResult->setRows(aRows);
1022cdf0e10cSrcweir 	return xRef;
1023cdf0e10cSrcweir }
1024cdf0e10cSrcweir // -------------------------------------------------------------------------
getExportedKeys(const Any &,const::rtl::OUString &,const::rtl::OUString &)1025cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getExportedKeys(
1026cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
1027cdf0e10cSrcweir {
1028cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys );
1029cdf0e10cSrcweir }
1030cdf0e10cSrcweir // -------------------------------------------------------------------------
getImportedKeys(const Any &,const::rtl::OUString &,const::rtl::OUString &)1031cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getImportedKeys(
1032cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
1033cdf0e10cSrcweir {
1034cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys );
1035cdf0e10cSrcweir }
1036cdf0e10cSrcweir // -------------------------------------------------------------------------
getPrimaryKeys(const Any &,const::rtl::OUString &,const::rtl::OUString &)1037cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getPrimaryKeys(
1038cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
1039cdf0e10cSrcweir {
1040cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys );
1041cdf0e10cSrcweir }
1042cdf0e10cSrcweir // -------------------------------------------------------------------------
getIndexInfo(const Any &,const::rtl::OUString &,const::rtl::OUString &,sal_Bool,sal_Bool)1043cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getIndexInfo(
1044cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString&,
1045cdf0e10cSrcweir 	sal_Bool, sal_Bool ) throw(SQLException, RuntimeException)
1046cdf0e10cSrcweir {
1047cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo );
1048cdf0e10cSrcweir }
1049cdf0e10cSrcweir // -------------------------------------------------------------------------
getBestRowIdentifier(const Any &,const::rtl::OUString &,const::rtl::OUString &,sal_Int32,sal_Bool)1050cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getBestRowIdentifier(
1051cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32,
1052cdf0e10cSrcweir 	sal_Bool ) throw(SQLException, RuntimeException)
1053cdf0e10cSrcweir {
1054cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier );
1055cdf0e10cSrcweir }
1056cdf0e10cSrcweir // -------------------------------------------------------------------------
getTablePrivileges(const Any &,const::rtl::OUString &,const::rtl::OUString &)1057cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTablePrivileges(
1058cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
1059cdf0e10cSrcweir {
1060cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges );
1061cdf0e10cSrcweir }
1062cdf0e10cSrcweir // -------------------------------------------------------------------------
getCrossReference(const Any &,const::rtl::OUString &,const::rtl::OUString &,const Any &,const::rtl::OUString &,const::rtl::OUString &)1063cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference(
1064cdf0e10cSrcweir 	const Any&, const ::rtl::OUString&,
1065cdf0e10cSrcweir 	const ::rtl::OUString&, const Any&,
1066cdf0e10cSrcweir 	const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException)
1067cdf0e10cSrcweir {
1068cdf0e10cSrcweir     return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference );
1069cdf0e10cSrcweir }
1070cdf0e10cSrcweir // -------------------------------------------------------------------------
getUDTs(const Any &,const::rtl::OUString &,const::rtl::OUString &,const Sequence<sal_Int32> &)1071cdf0e10cSrcweir Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException)
1072cdf0e10cSrcweir {
1073cdf0e10cSrcweir 	OSL_ENSURE(0,"Not implemented yet!");
1074cdf0e10cSrcweir 	throw SQLException();
1075cdf0e10cSrcweir }
1076cdf0e10cSrcweir // -----------------------------------------------------------------------------
1077