1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include "SDatabaseMetaData.hxx"
25 #include <com/sun/star/sdbc/DataType.hpp>
26 #include <com/sun/star/sdbc/ResultSetType.hpp>
27 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
28 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
29 
30 using namespace connectivity::skeleton;
31 using namespace com::sun::star::uno;
32 using namespace com::sun::star::lang;
33 using namespace com::sun::star::beans;
34 using namespace com::sun::star::sdbc;
35 
ODatabaseMetaData(OConnection * _pCon)36 ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon)
37 : m_pConnection(_pCon)
38 , m_bUseCatalog(sal_True)
39 {
40 	OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
41 	if(!m_pConnection->isCatalogUsed())
42 	{
43 		osl_incrementInterlockedCount( &m_refCount );
44 		m_bUseCatalog	= !(usesLocalFiles() || usesLocalFilePerTable());
45 		osl_decrementInterlockedCount( &m_refCount );
46 	}
47 }
48 // -------------------------------------------------------------------------
~ODatabaseMetaData()49 ODatabaseMetaData::~ODatabaseMetaData()
50 {
51 }
52 // -------------------------------------------------------------------------
getCatalogSeparator()53 ::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator(  ) throw(SQLException, RuntimeException)
54 {
55 	::rtl::OUString aVal;
56 	if(m_bUseCatalog)
57 	{ // do some special here for you database
58 	}
59 
60 	return aVal;
61 }
62 // -------------------------------------------------------------------------
getMaxBinaryLiteralLength()63 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength(  ) throw(SQLException, RuntimeException)
64 {
65 	sal_Int32 nValue = 0; // 0 means no limit
66 	return nValue;
67 }
68 // -------------------------------------------------------------------------
getMaxRowSize()69 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize(  ) throw(SQLException, RuntimeException)
70 {
71 	sal_Int32 nValue = 0; // 0 means no limit
72 	return nValue;
73 }
74 // -------------------------------------------------------------------------
getMaxCatalogNameLength()75 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength(  ) throw(SQLException, RuntimeException)
76 {
77 	sal_Int32 nValue = 0; // 0 means no limit
78 	return nValue;
79 }
80 // -------------------------------------------------------------------------
getMaxCharLiteralLength()81 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength(  ) throw(SQLException, RuntimeException)
82 {
83 	sal_Int32 nValue = 0; // 0 means no limit
84 	return nValue;
85 }
86 // -------------------------------------------------------------------------
getMaxColumnNameLength()87 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength(  ) throw(SQLException, RuntimeException)
88 {
89 	sal_Int32 nValue = 0; // 0 means no limit
90 	return nValue;
91 }
92 // -------------------------------------------------------------------------
getMaxColumnsInIndex()93 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex(  ) throw(SQLException, RuntimeException)
94 {
95 	sal_Int32 nValue = 0; // 0 means no limit
96 	return nValue;
97 }
98 // -------------------------------------------------------------------------
getMaxCursorNameLength()99 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength(  ) throw(SQLException, RuntimeException)
100 {
101 	sal_Int32 nValue = 0; // 0 means no limit
102 	return nValue;
103 }
104 // -------------------------------------------------------------------------
getMaxConnections()105 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections(  ) throw(SQLException, RuntimeException)
106 {
107 	sal_Int32 nValue = 0; // 0 means no limit
108 	return nValue;
109 }
110 // -------------------------------------------------------------------------
getMaxColumnsInTable()111 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable(  ) throw(SQLException, RuntimeException)
112 {
113 	sal_Int32 nValue = 0; // 0 means no limit
114 	return nValue;
115 }
116 // -------------------------------------------------------------------------
getMaxStatementLength()117 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength(  ) throw(SQLException, RuntimeException)
118 {
119 	sal_Int32 nValue = 0; // 0 means no limit
120 	return nValue;
121 }
122 // -------------------------------------------------------------------------
getMaxTableNameLength()123 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength(  ) throw(SQLException, RuntimeException)
124 {
125 	sal_Int32 nValue = 0; // 0 means no limit
126 	return nValue;
127 }
128 // -------------------------------------------------------------------------
getMaxTablesInSelect()129 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect(  ) throw(SQLException, RuntimeException)
130 {
131 	sal_Int32 nValue = 0; // 0 means no limit
132 	return nValue;
133 }
134 // -------------------------------------------------------------------------
135 // -------------------------------------------------------------------------
doesMaxRowSizeIncludeBlobs()136 sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs(  ) throw(SQLException, RuntimeException)
137 {
138 	return sal_False;
139 }
140 // -------------------------------------------------------------------------
storesLowerCaseQuotedIdentifiers()141 sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
142 {
143 	return sal_False;
144 }
145 // -------------------------------------------------------------------------
storesLowerCaseIdentifiers()146 sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers(  ) throw(SQLException, RuntimeException)
147 {
148 	return sal_False;
149 }
150 // -------------------------------------------------------------------------
storesMixedCaseQuotedIdentifiers()151 sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
152 {
153 	return sal_False;
154 }
155 // -------------------------------------------------------------------------
storesMixedCaseIdentifiers()156 sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException)
157 {
158 	return sal_False;
159 }
160 // -------------------------------------------------------------------------
storesUpperCaseQuotedIdentifiers()161 sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
162 {
163 	return sal_False;
164 }
165 // -------------------------------------------------------------------------
storesUpperCaseIdentifiers()166 sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers(  ) throw(SQLException, RuntimeException)
167 {
168 	return sal_False;
169 }
170 // -------------------------------------------------------------------------
supportsAlterTableWithAddColumn()171 sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn(  ) throw(SQLException, RuntimeException)
172 {
173 	return sal_False;
174 }
175 // -------------------------------------------------------------------------
supportsAlterTableWithDropColumn()176 sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithDropColumn(  ) throw(SQLException, RuntimeException)
177 {
178 	return sal_False;
179 }
180 // -------------------------------------------------------------------------
getMaxIndexLength()181 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength(  ) throw(SQLException, RuntimeException)
182 {
183 	sal_Int32 nValue = 0; // 0 means no limit
184 	return nValue;
185 }
186 // -------------------------------------------------------------------------
supportsNonNullableColumns()187 sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns(  ) throw(SQLException, RuntimeException)
188 {
189 	return sal_False;
190 }
191 // -------------------------------------------------------------------------
getCatalogTerm()192 ::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogTerm(  ) throw(SQLException, RuntimeException)
193 {
194 	::rtl::OUString aVal;
195 	if(m_bUseCatalog)
196 	{
197 	}
198 	return aVal;
199 }
200 // -------------------------------------------------------------------------
getIdentifierQuoteString()201 ::rtl::OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString(  ) throw(SQLException, RuntimeException)
202 {
203 	// normally this is "
204 	::rtl::OUString aVal = ::rtl::OUString::createFromAscii("\"");
205 	return aVal;
206 }
207 // -------------------------------------------------------------------------
getExtraNameCharacters()208 ::rtl::OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters(  ) throw(SQLException, RuntimeException)
209 {
210 	::rtl::OUString aVal;
211 	return aVal;
212 }
213 // -------------------------------------------------------------------------
supportsDifferentTableCorrelationNames()214 sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames(  ) throw(SQLException, RuntimeException)
215 {
216 	return sal_False;
217 }
218 // -------------------------------------------------------------------------
isCatalogAtStart()219 sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart(  ) throw(SQLException, RuntimeException)
220 {
221 	sal_Bool bValue = sal_False;
222 	if(m_bUseCatalog)
223 	{
224 	}
225 	return bValue;
226 }
227 // -------------------------------------------------------------------------
dataDefinitionIgnoredInTransactions()228 sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions(  ) throw(SQLException, RuntimeException)
229 {
230 	return sal_True;
231 }
232 // -------------------------------------------------------------------------
dataDefinitionCausesTransactionCommit()233 sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit(  ) throw(SQLException, RuntimeException)
234 {
235 	return sal_True;
236 }
237 // -------------------------------------------------------------------------
supportsDataManipulationTransactionsOnly()238 sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly(  ) throw(SQLException, RuntimeException)
239 {
240 	return sal_True;
241 }
242 // -------------------------------------------------------------------------
supportsDataDefinitionAndDataManipulationTransactions()243 sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions(  ) throw(SQLException, RuntimeException)
244 {
245 	return sal_True;
246 }
247 // -------------------------------------------------------------------------
supportsPositionedDelete()248 sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete(  ) throw(SQLException, RuntimeException)
249 {
250 	return sal_False;
251 }
252 // -------------------------------------------------------------------------
supportsPositionedUpdate()253 sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate(  ) throw(SQLException, RuntimeException)
254 {
255 	return sal_False;
256 }
257 // -------------------------------------------------------------------------
supportsOpenStatementsAcrossRollback()258 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback(  ) throw(SQLException, RuntimeException)
259 {
260 	return sal_False;
261 }
262 // -------------------------------------------------------------------------
supportsOpenStatementsAcrossCommit()263 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit(  ) throw(SQLException, RuntimeException)
264 {
265 	return sal_False;
266 }
267 // -------------------------------------------------------------------------
supportsOpenCursorsAcrossCommit()268 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit(  ) throw(SQLException, RuntimeException)
269 {
270 	return sal_False;
271 }
272 // -------------------------------------------------------------------------
supportsOpenCursorsAcrossRollback()273 sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback(  ) throw(SQLException, RuntimeException)
274 {
275 	return sal_False;
276 }
277 // -------------------------------------------------------------------------
supportsTransactionIsolationLevel(sal_Int32 level)278 sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException)
279 {
280 	return sal_False;
281 }
282 // -------------------------------------------------------------------------
supportsSchemasInDataManipulation()283 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInDataManipulation(  ) throw(SQLException, RuntimeException)
284 {
285 	return sal_False;
286 }
287 // -------------------------------------------------------------------------
supportsANSI92FullSQL()288 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL(  ) throw(SQLException, RuntimeException)
289 {
290 	return sal_False;
291 }
292 // -------------------------------------------------------------------------
supportsANSI92EntryLevelSQL()293 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL(  ) throw(SQLException, RuntimeException)
294 {
295 	return sal_True; // should be supported at least
296 }
297 // -------------------------------------------------------------------------
supportsIntegrityEnhancementFacility()298 sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility(  ) throw(SQLException, RuntimeException)
299 {
300 	return sal_False;
301 }
302 // -------------------------------------------------------------------------
supportsSchemasInIndexDefinitions()303 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions(  ) throw(SQLException, RuntimeException)
304 {
305 	return sal_False;
306 }
307 // -------------------------------------------------------------------------
supportsSchemasInTableDefinitions()308 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInTableDefinitions(  ) throw(SQLException, RuntimeException)
309 {
310 	return sal_False;
311 }
312 // -------------------------------------------------------------------------
supportsCatalogsInTableDefinitions()313 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInTableDefinitions(  ) throw(SQLException, RuntimeException)
314 {
315 	return sal_False;
316 }
317 // -------------------------------------------------------------------------
supportsCatalogsInIndexDefinitions()318 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions(  ) throw(SQLException, RuntimeException)
319 {
320 	return sal_False;
321 }
322 // -------------------------------------------------------------------------
supportsCatalogsInDataManipulation()323 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInDataManipulation(  ) throw(SQLException, RuntimeException)
324 {
325 	return sal_False;
326 }
327 // -------------------------------------------------------------------------
supportsOuterJoins()328 sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins(  ) throw(SQLException, RuntimeException)
329 {
330 	return sal_False;
331 }
332 // -------------------------------------------------------------------------
getMaxStatements()333 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements(  ) throw(SQLException, RuntimeException)
334 {
335 	sal_Int32 nValue = 0; // 0 means no limit
336 	return nValue;
337 }
338 // -------------------------------------------------------------------------
getMaxProcedureNameLength()339 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength(  ) throw(SQLException, RuntimeException)
340 {
341 	sal_Int32 nValue = 0; // 0 means no limit
342 	return nValue;
343 }
344 // -------------------------------------------------------------------------
getMaxSchemaNameLength()345 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength(  ) throw(SQLException, RuntimeException)
346 {
347 	sal_Int32 nValue = 0; // 0 means no limit
348 	return nValue;
349 }
350 // -------------------------------------------------------------------------
supportsTransactions()351 sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions(  ) throw(SQLException, RuntimeException)
352 {
353 	return sal_False;
354 }
355 // -------------------------------------------------------------------------
allProceduresAreCallable()356 sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable(  ) throw(SQLException, RuntimeException)
357 {
358 	return sal_False;
359 }
360 // -------------------------------------------------------------------------
supportsStoredProcedures()361 sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures(  ) throw(SQLException, RuntimeException)
362 {
363 	return sal_False;
364 }
365 // -------------------------------------------------------------------------
supportsSelectForUpdate()366 sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate(  ) throw(SQLException, RuntimeException)
367 {
368 	return sal_False;
369 }
370 // -------------------------------------------------------------------------
allTablesAreSelectable()371 sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable(  ) throw(SQLException, RuntimeException)
372 {
373 	return sal_False;
374 }
375 // -------------------------------------------------------------------------
isReadOnly()376 sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly(  ) throw(SQLException, RuntimeException)
377 {
378 	return sal_False;
379 }
380 // -------------------------------------------------------------------------
usesLocalFiles()381 sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles(  ) throw(SQLException, RuntimeException)
382 {
383 	return sal_False;
384 }
385 // -------------------------------------------------------------------------
usesLocalFilePerTable()386 sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable(  ) throw(SQLException, RuntimeException)
387 {
388 	return sal_False;
389 }
390 // -------------------------------------------------------------------------
supportsTypeConversion()391 sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion(  ) throw(SQLException, RuntimeException)
392 {
393 	return sal_False;
394 }
395 // -------------------------------------------------------------------------
nullPlusNonNullIsNull()396 sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull(  ) throw(SQLException, RuntimeException)
397 {
398 	return sal_False;
399 }
400 // -------------------------------------------------------------------------
supportsColumnAliasing()401 sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing(  ) throw(SQLException, RuntimeException)
402 {
403 	return sal_False;
404 }
405 // -------------------------------------------------------------------------
supportsTableCorrelationNames()406 sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames(  ) throw(SQLException, RuntimeException)
407 {
408 	return sal_False;
409 }
410 // -------------------------------------------------------------------------
supportsConvert(sal_Int32 fromType,sal_Int32 toType)411 sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException)
412 {
413 	return sal_False;
414 }
415 // -------------------------------------------------------------------------
supportsExpressionsInOrderBy()416 sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy(  ) throw(SQLException, RuntimeException)
417 {
418 	return sal_False;
419 }
420 // -------------------------------------------------------------------------
supportsGroupBy()421 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy(  ) throw(SQLException, RuntimeException)
422 {
423 	return sal_False;
424 }
425 // -------------------------------------------------------------------------
supportsGroupByBeyondSelect()426 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect(  ) throw(SQLException, RuntimeException)
427 {
428 	return sal_False;
429 }
430 // -------------------------------------------------------------------------
supportsGroupByUnrelated()431 sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated(  ) throw(SQLException, RuntimeException)
432 {
433 	return sal_False;
434 }
435 // -------------------------------------------------------------------------
supportsMultipleTransactions()436 sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions(  ) throw(SQLException, RuntimeException)
437 {
438 	return sal_False;
439 }
440 // -------------------------------------------------------------------------
supportsMultipleResultSets()441 sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets(  ) throw(SQLException, RuntimeException)
442 {
443 	return sal_False;
444 }
445 // -------------------------------------------------------------------------
supportsLikeEscapeClause()446 sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause(  ) throw(SQLException, RuntimeException)
447 {
448 	return sal_False;
449 }
450 // -------------------------------------------------------------------------
supportsOrderByUnrelated()451 sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated(  ) throw(SQLException, RuntimeException)
452 {
453 	return sal_False;
454 }
455 // -------------------------------------------------------------------------
supportsUnion()456 sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion(  ) throw(SQLException, RuntimeException)
457 {
458 	return sal_False;
459 }
460 // -------------------------------------------------------------------------
supportsUnionAll()461 sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll(  ) throw(SQLException, RuntimeException)
462 {
463 	return sal_False;
464 }
465 // -------------------------------------------------------------------------
supportsMixedCaseIdentifiers()466 sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers(  ) throw(SQLException, RuntimeException)
467 {
468 	return sal_False;
469 }
470 // -------------------------------------------------------------------------
supportsMixedCaseQuotedIdentifiers()471 sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers(  ) throw(SQLException, RuntimeException)
472 {
473 	return sal_False;
474 }
475 // -------------------------------------------------------------------------
nullsAreSortedAtEnd()476 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd(  ) throw(SQLException, RuntimeException)
477 {
478 	return sal_False;
479 }
480 // -------------------------------------------------------------------------
nullsAreSortedAtStart()481 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart(  ) throw(SQLException, RuntimeException)
482 {
483 	return sal_False;
484 }
485 // -------------------------------------------------------------------------
nullsAreSortedHigh()486 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh(  ) throw(SQLException, RuntimeException)
487 {
488 	return sal_False;
489 }
490 // -------------------------------------------------------------------------
nullsAreSortedLow()491 sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow(  ) throw(SQLException, RuntimeException)
492 {
493 	return sal_False;
494 }
495 // -------------------------------------------------------------------------
supportsSchemasInProcedureCalls()496 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls(  ) throw(SQLException, RuntimeException)
497 {
498 	return sal_False;
499 }
500 // -------------------------------------------------------------------------
supportsSchemasInPrivilegeDefinitions()501 sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException)
502 {
503 	return sal_False;
504 }
505 // -------------------------------------------------------------------------
supportsCatalogsInProcedureCalls()506 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls(  ) throw(SQLException, RuntimeException)
507 {
508 	return sal_False;
509 }
510 // -------------------------------------------------------------------------
supportsCatalogsInPrivilegeDefinitions()511 sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions(  ) throw(SQLException, RuntimeException)
512 {
513 	return sal_False;
514 }
515 // -------------------------------------------------------------------------
supportsCorrelatedSubqueries()516 sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries(  ) throw(SQLException, RuntimeException)
517 {
518 	return sal_False;
519 }
520 // -------------------------------------------------------------------------
supportsSubqueriesInComparisons()521 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons(  ) throw(SQLException, RuntimeException)
522 {
523 	return sal_False;
524 }
525 // -------------------------------------------------------------------------
supportsSubqueriesInExists()526 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists(  ) throw(SQLException, RuntimeException)
527 {
528 	return sal_False;
529 }
530 // -------------------------------------------------------------------------
supportsSubqueriesInIns()531 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns(  ) throw(SQLException, RuntimeException)
532 {
533 	return sal_False;
534 }
535 // -------------------------------------------------------------------------
supportsSubqueriesInQuantifieds()536 sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds(  ) throw(SQLException, RuntimeException)
537 {
538 	return sal_False;
539 }
540 // -------------------------------------------------------------------------
supportsANSI92IntermediateSQL()541 sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL(  ) throw(SQLException, RuntimeException)
542 {
543 	return sal_False;
544 }
545 // -------------------------------------------------------------------------
getURL()546 ::rtl::OUString SAL_CALL ODatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException)
547 {
548 	::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:skeleton:");
549 	return aValue;
550 }
551 // -------------------------------------------------------------------------
getUserName()552 ::rtl::OUString SAL_CALL ODatabaseMetaData::getUserName(  ) throw(SQLException, RuntimeException)
553 {
554 	::rtl::OUString aValue;
555 	return aValue;
556 }
557 // -------------------------------------------------------------------------
getDriverName()558 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverName(  ) throw(SQLException, RuntimeException)
559 {
560 	::rtl::OUString aValue;
561 	return aValue;
562 }
563 // -------------------------------------------------------------------------
getDriverVersion()564 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
565 {
566 	::rtl::OUString aValue;
567 	return aValue;
568 }
569 // -------------------------------------------------------------------------
getDatabaseProductVersion()570 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  ) throw(SQLException, RuntimeException)
571 {
572 	::rtl::OUString aValue;
573 	return aValue;
574 }
575 // -------------------------------------------------------------------------
getDatabaseProductName()576 ::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  ) throw(SQLException, RuntimeException)
577 {
578 	::rtl::OUString aValue;
579 	return aValue;
580 }
581 // -------------------------------------------------------------------------
getProcedureTerm()582 ::rtl::OUString SAL_CALL ODatabaseMetaData::getProcedureTerm(  ) throw(SQLException, RuntimeException)
583 {
584 	::rtl::OUString aValue;
585 	return aValue;
586 }
587 // -------------------------------------------------------------------------
getSchemaTerm()588 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSchemaTerm(  ) throw(SQLException, RuntimeException)
589 {
590 	::rtl::OUString aValue;
591 	return aValue;
592 }
593 // -------------------------------------------------------------------------
getDriverMajorVersion()594 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion(  ) throw(RuntimeException)
595 {
596 	return 1;
597 }
598 // -------------------------------------------------------------------------
getDefaultTransactionIsolation()599 sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation(  ) throw(SQLException, RuntimeException)
600 {
601 	return TransactionIsolation::NONE;
602 }
603 // -------------------------------------------------------------------------
getDriverMinorVersion()604 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion(  ) throw(RuntimeException)
605 {
606 	return 0;
607 }
608 // -------------------------------------------------------------------------
getSQLKeywords()609 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSQLKeywords(  ) throw(SQLException, RuntimeException)
610 {
611 	::rtl::OUString aValue;
612 	return aValue;
613 }
614 // -------------------------------------------------------------------------
getSearchStringEscape()615 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape(  ) throw(SQLException, RuntimeException)
616 {
617 	::rtl::OUString aValue;
618 	return aValue;
619 }
620 // -------------------------------------------------------------------------
getStringFunctions()621 ::rtl::OUString SAL_CALL ODatabaseMetaData::getStringFunctions(  ) throw(SQLException, RuntimeException)
622 {
623 	return ::rtl::OUString();
624 }
625 // -------------------------------------------------------------------------
getTimeDateFunctions()626 ::rtl::OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions(  ) throw(SQLException, RuntimeException)
627 {
628 	return ::rtl::OUString();
629 }
630 // -------------------------------------------------------------------------
getSystemFunctions()631 ::rtl::OUString SAL_CALL ODatabaseMetaData::getSystemFunctions(  ) throw(SQLException, RuntimeException)
632 {
633 	return ::rtl::OUString();
634 }
635 // -------------------------------------------------------------------------
getNumericFunctions()636 ::rtl::OUString SAL_CALL ODatabaseMetaData::getNumericFunctions(  ) throw(SQLException, RuntimeException)
637 {
638 	return ::rtl::OUString();
639 }
640 // -------------------------------------------------------------------------
supportsExtendedSQLGrammar()641 sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar(  ) throw(SQLException, RuntimeException)
642 {
643 	return sal_False;
644 }
645 // -------------------------------------------------------------------------
supportsCoreSQLGrammar()646 sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar(  ) throw(SQLException, RuntimeException)
647 {
648 	return sal_False;
649 }
650 // -------------------------------------------------------------------------
supportsMinimumSQLGrammar()651 sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar(  ) throw(SQLException, RuntimeException)
652 {
653 	return sal_True;
654 }
655 // -------------------------------------------------------------------------
supportsFullOuterJoins()656 sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins(  ) throw(SQLException, RuntimeException)
657 {
658 	return sal_False;
659 }
660 // -------------------------------------------------------------------------
supportsLimitedOuterJoins()661 sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins(  ) throw(SQLException, RuntimeException)
662 {
663 	return sal_False;
664 }
665 // -------------------------------------------------------------------------
getMaxColumnsInGroupBy()666 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy(  ) throw(SQLException, RuntimeException)
667 {
668 	sal_Int32 nValue = 0; // 0 means no limit
669 	return nValue;
670 }
671 // -------------------------------------------------------------------------
getMaxColumnsInOrderBy()672 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy(  ) throw(SQLException, RuntimeException)
673 {
674 	sal_Int32 nValue = 0; // 0 means no limit
675 	return nValue;
676 }
677 // -------------------------------------------------------------------------
getMaxColumnsInSelect()678 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect(  ) throw(SQLException, RuntimeException)
679 {
680 	sal_Int32 nValue = 0; // 0 means no limit
681 	return nValue;
682 }
683 // -------------------------------------------------------------------------
getMaxUserNameLength()684 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength(  ) throw(SQLException, RuntimeException)
685 {
686 	sal_Int32 nValue = 0; // 0 means no limit
687 	return nValue;
688 }
689 // -------------------------------------------------------------------------
supportsResultSetType(sal_Int32 setType)690 sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException)
691 {
692 	return sal_False;
693 }
694 // -------------------------------------------------------------------------
supportsResultSetConcurrency(sal_Int32 setType,sal_Int32 concurrency)695 sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException)
696 {
697 	return sal_False;
698 }
699 // -------------------------------------------------------------------------
ownUpdatesAreVisible(sal_Int32 setType)700 sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
701 {
702 	return sal_False;
703 }
704 // -------------------------------------------------------------------------
ownDeletesAreVisible(sal_Int32 setType)705 sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
706 {
707 	return sal_False;
708 }
709 // -------------------------------------------------------------------------
ownInsertsAreVisible(sal_Int32 setType)710 sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
711 {
712 	return sal_False;
713 }
714 // -------------------------------------------------------------------------
othersUpdatesAreVisible(sal_Int32 setType)715 sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
716 {
717 	return sal_False;
718 }
719 // -------------------------------------------------------------------------
othersDeletesAreVisible(sal_Int32 setType)720 sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
721 {
722 	return sal_False;
723 }
724 // -------------------------------------------------------------------------
othersInsertsAreVisible(sal_Int32 setType)725 sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
726 {
727 	return sal_False;
728 }
729 // -------------------------------------------------------------------------
updatesAreDetected(sal_Int32 setType)730 sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
731 {
732 	return sal_False;
733 }
734 // -------------------------------------------------------------------------
deletesAreDetected(sal_Int32 setType)735 sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
736 {
737 	return sal_False;
738 }
739 // -------------------------------------------------------------------------
insertsAreDetected(sal_Int32 setType)740 sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
741 {
742 	return sal_False;
743 }
744 // -------------------------------------------------------------------------
supportsBatchUpdates()745 sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates(  ) throw(SQLException, RuntimeException)
746 {
747 	return sal_False;
748 }
749 // -------------------------------------------------------------------------
getConnection()750 Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection(  ) throw(SQLException, RuntimeException)
751 {
752 	return (Reference< XConnection >)m_pConnection;//new OConnection(m_aConnectionHandle);
753 }
754 // -------------------------------------------------------------------------
755 // here follow all methods which return a resultset
756 // the first methods is an example implementation how to use this resultset
757 // of course you could implement it on your and you should do this because
758 // the general way is more memory expensive
759 // -------------------------------------------------------------------------
getTableTypes()760 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes(  ) throw(SQLException, RuntimeException)
761 {
762 	return NULL;
763 }
764 // -------------------------------------------------------------------------
getTypeInfo()765 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo(  ) throw(SQLException, RuntimeException)
766 {
767 	return NULL;
768 }
769 // -------------------------------------------------------------------------
getCatalogs()770 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs(  ) throw(SQLException, RuntimeException)
771 {
772 	return NULL;
773 }
774 // -----------------------------------------------------------------------------
getSchemas()775 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas(  ) throw(SQLException, RuntimeException)
776 {
777 	return NULL;
778 }
779 // -------------------------------------------------------------------------
getColumnPrivileges(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table,const::rtl::OUString & columnNamePattern)780 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
781 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
782 	const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
783 {
784 	return NULL;
785 }
786 // -------------------------------------------------------------------------
getColumns(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & tableNamePattern,const::rtl::OUString & columnNamePattern)787 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
788 	const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern,
789 	const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
790 {
791 	return NULL;
792 }
793 // -------------------------------------------------------------------------
getTables(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & tableNamePattern,const Sequence<::rtl::OUString> & types)794 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
795 	const Any& catalog, const ::rtl::OUString& schemaPattern,
796 	const ::rtl::OUString& tableNamePattern, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
797 {
798 	return NULL;
799 }
800 // -------------------------------------------------------------------------
getProcedureColumns(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & procedureNamePattern,const::rtl::OUString & columnNamePattern)801 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns(
802 	const Any& catalog, const ::rtl::OUString& schemaPattern,
803 	const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
804 {
805 	return NULL;
806 }
807 // -------------------------------------------------------------------------
getProcedures(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & procedureNamePattern)808 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
809 	const Any& catalog, const ::rtl::OUString& schemaPattern,
810 	const ::rtl::OUString& procedureNamePattern ) throw(SQLException, RuntimeException)
811 {
812 	return NULL;
813 }
814 // -------------------------------------------------------------------------
getVersionColumns(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table)815 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
816 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
817 {
818 	return NULL;
819 }
820 // -------------------------------------------------------------------------
getExportedKeys(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table)821 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys(
822 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
823 {
824 	return NULL;
825 }
826 // -------------------------------------------------------------------------
getImportedKeys(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table)827 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
828 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
829 {
830 	return NULL;
831 }
832 // -------------------------------------------------------------------------
getPrimaryKeys(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table)833 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys(
834 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
835 {
836 	return NULL;
837 }
838 // -------------------------------------------------------------------------
getIndexInfo(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table,sal_Bool unique,sal_Bool approximate)839 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
840 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
841 	sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException)
842 {
843 	return NULL;
844 }
845 // -------------------------------------------------------------------------
getBestRowIdentifier(const Any & catalog,const::rtl::OUString & schema,const::rtl::OUString & table,sal_Int32 scope,sal_Bool nullable)846 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
847 	const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope,
848 	sal_Bool nullable ) throw(SQLException, RuntimeException)
849 {
850 	return NULL;
851 }
852 // -------------------------------------------------------------------------
getTablePrivileges(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & tableNamePattern)853 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
854 	const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException)
855 {
856 	return NULL;
857 }
858 // -------------------------------------------------------------------------
getCrossReference(const Any & primaryCatalog,const::rtl::OUString & primarySchema,const::rtl::OUString & primaryTable,const Any & foreignCatalog,const::rtl::OUString & foreignSchema,const::rtl::OUString & foreignTable)859 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
860 	const Any& primaryCatalog, const ::rtl::OUString& primarySchema,
861 	const ::rtl::OUString& primaryTable, const Any& foreignCatalog,
862 	const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw(SQLException, RuntimeException)
863 {
864 	return NULL;
865 }
866 // -------------------------------------------------------------------------
getUDTs(const Any & catalog,const::rtl::OUString & schemaPattern,const::rtl::OUString & typeNamePattern,const Sequence<sal_Int32> & types)867 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException)
868 {
869 	OSL_ENSURE(0,"Not implemented yet!");
870 	throw SQLException();
871 	return NULL;
872 }
873 // -----------------------------------------------------------------------------
874 
875 
876 
877