1 /*************************************************************************
3 * $RCSfile: SDatabaseMetaData.cxx,v $
7 * last change: $Author: rt $ $Date: 2008-04-10 16:32:09 $
9 * The Contents of this file are made available subject to the terms of
12 * Copyright (c) 2003 by Sun Microsystems, Inc.
13 * All rights reserved.
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
24 * contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
34 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
35 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
36 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
37 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *************************************************************************/
41 #include "SDatabaseMetaData.hxx"
42 #include <com/sun/star/sdbc/DataType.hpp>
43 #include <com/sun/star/sdbc/ResultSetType.hpp>
44 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
45 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
47 using namespace connectivity::skeleton
;
48 using namespace com::sun::star::uno
;
49 using namespace com::sun::star::lang
;
50 using namespace com::sun::star::beans
;
51 using namespace com::sun::star::sdbc
;
53 ODatabaseMetaData::ODatabaseMetaData(OConnection
* _pCon
)
54 : m_pConnection(_pCon
)
55 , m_bUseCatalog(sal_True
)
57 OSL_ENSURE(m_pConnection
,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
58 if(!m_pConnection
->isCatalogUsed())
60 osl_incrementInterlockedCount( &m_refCount
);
61 m_bUseCatalog
= !(usesLocalFiles() || usesLocalFilePerTable());
62 osl_decrementInterlockedCount( &m_refCount
);
65 // -------------------------------------------------------------------------
66 ODatabaseMetaData::~ODatabaseMetaData()
69 // -------------------------------------------------------------------------
70 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException
, RuntimeException
)
74 { // do some special here for you database
79 // -------------------------------------------------------------------------
80 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException
, RuntimeException
)
82 sal_Int32 nValue
= 0; // 0 means no limit
85 // -------------------------------------------------------------------------
86 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( ) throw(SQLException
, RuntimeException
)
88 sal_Int32 nValue
= 0; // 0 means no limit
91 // -------------------------------------------------------------------------
92 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException
, RuntimeException
)
94 sal_Int32 nValue
= 0; // 0 means no limit
97 // -------------------------------------------------------------------------
98 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException
, RuntimeException
)
100 sal_Int32 nValue
= 0; // 0 means no limit
103 // -------------------------------------------------------------------------
104 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException
, RuntimeException
)
106 sal_Int32 nValue
= 0; // 0 means no limit
109 // -------------------------------------------------------------------------
110 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException
, RuntimeException
)
112 sal_Int32 nValue
= 0; // 0 means no limit
115 // -------------------------------------------------------------------------
116 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException
, RuntimeException
)
118 sal_Int32 nValue
= 0; // 0 means no limit
121 // -------------------------------------------------------------------------
122 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( ) throw(SQLException
, RuntimeException
)
124 sal_Int32 nValue
= 0; // 0 means no limit
127 // -------------------------------------------------------------------------
128 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException
, RuntimeException
)
130 sal_Int32 nValue
= 0; // 0 means no limit
133 // -------------------------------------------------------------------------
134 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException
, RuntimeException
)
136 sal_Int32 nValue
= 0; // 0 means no limit
139 // -------------------------------------------------------------------------
140 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException
, RuntimeException
)
142 sal_Int32 nValue
= 0; // 0 means no limit
145 // -------------------------------------------------------------------------
146 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException
, RuntimeException
)
148 sal_Int32 nValue
= 0; // 0 means no limit
151 // -------------------------------------------------------------------------
152 // -------------------------------------------------------------------------
153 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException
, RuntimeException
)
157 // -------------------------------------------------------------------------
158 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
162 // -------------------------------------------------------------------------
163 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
167 // -------------------------------------------------------------------------
168 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
172 // -------------------------------------------------------------------------
173 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
177 // -------------------------------------------------------------------------
178 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
182 // -------------------------------------------------------------------------
183 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
187 // -------------------------------------------------------------------------
188 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException
, RuntimeException
)
192 // -------------------------------------------------------------------------
193 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException
, RuntimeException
)
197 // -------------------------------------------------------------------------
198 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException
, RuntimeException
)
200 sal_Int32 nValue
= 0; // 0 means no limit
203 // -------------------------------------------------------------------------
204 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException
, RuntimeException
)
208 // -------------------------------------------------------------------------
209 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( ) throw(SQLException
, RuntimeException
)
211 ::rtl::OUString aVal
;
217 // -------------------------------------------------------------------------
218 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException
, RuntimeException
)
220 // normally this is "
221 ::rtl::OUString aVal
= ::rtl::OUString::createFromAscii("\"");
224 // -------------------------------------------------------------------------
225 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException
, RuntimeException
)
227 ::rtl::OUString aVal
;
230 // -------------------------------------------------------------------------
231 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException
, RuntimeException
)
235 // -------------------------------------------------------------------------
236 sal_Bool SAL_CALL
ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException
, RuntimeException
)
238 sal_Bool bValue
= sal_False
;
244 // -------------------------------------------------------------------------
245 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException
, RuntimeException
)
249 // -------------------------------------------------------------------------
250 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException
, RuntimeException
)
254 // -------------------------------------------------------------------------
255 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException
, RuntimeException
)
259 // -------------------------------------------------------------------------
260 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException
, RuntimeException
)
264 // -------------------------------------------------------------------------
265 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException
, RuntimeException
)
269 // -------------------------------------------------------------------------
270 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException
, RuntimeException
)
274 // -------------------------------------------------------------------------
275 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException
, RuntimeException
)
279 // -------------------------------------------------------------------------
280 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException
, RuntimeException
)
284 // -------------------------------------------------------------------------
285 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException
, RuntimeException
)
289 // -------------------------------------------------------------------------
290 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException
, RuntimeException
)
294 // -------------------------------------------------------------------------
295 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level
) throw(SQLException
, RuntimeException
)
299 // -------------------------------------------------------------------------
300 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException
, RuntimeException
)
304 // -------------------------------------------------------------------------
305 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException
, RuntimeException
)
309 // -------------------------------------------------------------------------
310 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException
, RuntimeException
)
312 return sal_True
; // should be supported at least
314 // -------------------------------------------------------------------------
315 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException
, RuntimeException
)
319 // -------------------------------------------------------------------------
320 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException
, RuntimeException
)
324 // -------------------------------------------------------------------------
325 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException
, RuntimeException
)
329 // -------------------------------------------------------------------------
330 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException
, RuntimeException
)
334 // -------------------------------------------------------------------------
335 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException
, RuntimeException
)
339 // -------------------------------------------------------------------------
340 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException
, RuntimeException
)
344 // -------------------------------------------------------------------------
345 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException
, RuntimeException
)
349 // -------------------------------------------------------------------------
350 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatements( ) throw(SQLException
, RuntimeException
)
352 sal_Int32 nValue
= 0; // 0 means no limit
355 // -------------------------------------------------------------------------
356 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException
, RuntimeException
)
358 sal_Int32 nValue
= 0; // 0 means no limit
361 // -------------------------------------------------------------------------
362 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException
, RuntimeException
)
364 sal_Int32 nValue
= 0; // 0 means no limit
367 // -------------------------------------------------------------------------
368 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( ) throw(SQLException
, RuntimeException
)
372 // -------------------------------------------------------------------------
373 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException
, RuntimeException
)
377 // -------------------------------------------------------------------------
378 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException
, RuntimeException
)
382 // -------------------------------------------------------------------------
383 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException
, RuntimeException
)
387 // -------------------------------------------------------------------------
388 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException
, RuntimeException
)
392 // -------------------------------------------------------------------------
393 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( ) throw(SQLException
, RuntimeException
)
397 // -------------------------------------------------------------------------
398 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( ) throw(SQLException
, RuntimeException
)
402 // -------------------------------------------------------------------------
403 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException
, RuntimeException
)
407 // -------------------------------------------------------------------------
408 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException
, RuntimeException
)
412 // -------------------------------------------------------------------------
413 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException
, RuntimeException
)
417 // -------------------------------------------------------------------------
418 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException
, RuntimeException
)
422 // -------------------------------------------------------------------------
423 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException
, RuntimeException
)
427 // -------------------------------------------------------------------------
428 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32 fromType
, sal_Int32 toType
) throw(SQLException
, RuntimeException
)
432 // -------------------------------------------------------------------------
433 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException
, RuntimeException
)
437 // -------------------------------------------------------------------------
438 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( ) throw(SQLException
, RuntimeException
)
442 // -------------------------------------------------------------------------
443 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException
, RuntimeException
)
447 // -------------------------------------------------------------------------
448 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException
, RuntimeException
)
452 // -------------------------------------------------------------------------
453 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException
, RuntimeException
)
457 // -------------------------------------------------------------------------
458 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException
, RuntimeException
)
462 // -------------------------------------------------------------------------
463 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException
, RuntimeException
)
467 // -------------------------------------------------------------------------
468 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException
, RuntimeException
)
472 // -------------------------------------------------------------------------
473 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( ) throw(SQLException
, RuntimeException
)
477 // -------------------------------------------------------------------------
478 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( ) throw(SQLException
, RuntimeException
)
482 // -------------------------------------------------------------------------
483 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
487 // -------------------------------------------------------------------------
488 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
492 // -------------------------------------------------------------------------
493 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException
, RuntimeException
)
497 // -------------------------------------------------------------------------
498 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException
, RuntimeException
)
502 // -------------------------------------------------------------------------
503 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException
, RuntimeException
)
507 // -------------------------------------------------------------------------
508 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException
, RuntimeException
)
512 // -------------------------------------------------------------------------
513 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException
, RuntimeException
)
517 // -------------------------------------------------------------------------
518 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
)
522 // -------------------------------------------------------------------------
523 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException
, RuntimeException
)
527 // -------------------------------------------------------------------------
528 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
)
532 // -------------------------------------------------------------------------
533 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException
, RuntimeException
)
537 // -------------------------------------------------------------------------
538 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException
, RuntimeException
)
542 // -------------------------------------------------------------------------
543 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException
, RuntimeException
)
547 // -------------------------------------------------------------------------
548 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException
, RuntimeException
)
552 // -------------------------------------------------------------------------
553 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException
, RuntimeException
)
557 // -------------------------------------------------------------------------
558 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException
, RuntimeException
)
562 // -------------------------------------------------------------------------
563 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getURL( ) throw(SQLException
, RuntimeException
)
565 ::rtl::OUString aValue
= ::rtl::OUString::createFromAscii("sdbc:skeleton:");
568 // -------------------------------------------------------------------------
569 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getUserName( ) throw(SQLException
, RuntimeException
)
571 ::rtl::OUString aValue
;
574 // -------------------------------------------------------------------------
575 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDriverName( ) throw(SQLException
, RuntimeException
)
577 ::rtl::OUString aValue
;
580 // -------------------------------------------------------------------------
581 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDriverVersion() throw(SQLException
, RuntimeException
)
583 ::rtl::OUString aValue
;
586 // -------------------------------------------------------------------------
587 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException
, RuntimeException
)
589 ::rtl::OUString aValue
;
592 // -------------------------------------------------------------------------
593 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException
, RuntimeException
)
595 ::rtl::OUString aValue
;
598 // -------------------------------------------------------------------------
599 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( ) throw(SQLException
, RuntimeException
)
601 ::rtl::OUString aValue
;
604 // -------------------------------------------------------------------------
605 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( ) throw(SQLException
, RuntimeException
)
607 ::rtl::OUString aValue
;
610 // -------------------------------------------------------------------------
611 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException
)
615 // -------------------------------------------------------------------------
616 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException
, RuntimeException
)
618 return TransactionIsolation::NONE
;
620 // -------------------------------------------------------------------------
621 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException
)
625 // -------------------------------------------------------------------------
626 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( ) throw(SQLException
, RuntimeException
)
628 ::rtl::OUString aValue
;
631 // -------------------------------------------------------------------------
632 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException
, RuntimeException
)
634 ::rtl::OUString aValue
;
637 // -------------------------------------------------------------------------
638 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( ) throw(SQLException
, RuntimeException
)
640 return ::rtl::OUString();
642 // -------------------------------------------------------------------------
643 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException
, RuntimeException
)
645 return ::rtl::OUString();
647 // -------------------------------------------------------------------------
648 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( ) throw(SQLException
, RuntimeException
)
650 return ::rtl::OUString();
652 // -------------------------------------------------------------------------
653 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( ) throw(SQLException
, RuntimeException
)
655 return ::rtl::OUString();
657 // -------------------------------------------------------------------------
658 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException
, RuntimeException
)
662 // -------------------------------------------------------------------------
663 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException
, RuntimeException
)
667 // -------------------------------------------------------------------------
668 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException
, RuntimeException
)
672 // -------------------------------------------------------------------------
673 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException
, RuntimeException
)
677 // -------------------------------------------------------------------------
678 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException
, RuntimeException
)
682 // -------------------------------------------------------------------------
683 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException
, RuntimeException
)
685 sal_Int32 nValue
= 0; // 0 means no limit
688 // -------------------------------------------------------------------------
689 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException
, RuntimeException
)
691 sal_Int32 nValue
= 0; // 0 means no limit
694 // -------------------------------------------------------------------------
695 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException
, RuntimeException
)
697 sal_Int32 nValue
= 0; // 0 means no limit
700 // -------------------------------------------------------------------------
701 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException
, RuntimeException
)
703 sal_Int32 nValue
= 0; // 0 means no limit
706 // -------------------------------------------------------------------------
707 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
711 // -------------------------------------------------------------------------
712 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
) throw(SQLException
, RuntimeException
)
716 // -------------------------------------------------------------------------
717 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
721 // -------------------------------------------------------------------------
722 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
726 // -------------------------------------------------------------------------
727 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
731 // -------------------------------------------------------------------------
732 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
736 // -------------------------------------------------------------------------
737 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
741 // -------------------------------------------------------------------------
742 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
746 // -------------------------------------------------------------------------
747 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
751 // -------------------------------------------------------------------------
752 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
756 // -------------------------------------------------------------------------
757 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
761 // -------------------------------------------------------------------------
762 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
, RuntimeException
)
766 // -------------------------------------------------------------------------
767 Reference
< XConnection
> SAL_CALL
ODatabaseMetaData::getConnection( ) throw(SQLException
, RuntimeException
)
769 return (Reference
< XConnection
>)m_pConnection
;//new OConnection(m_aConnectionHandle);
771 // -------------------------------------------------------------------------
772 // here follow all methods which return a resultset
773 // the first methods is an example implementation how to use this resultset
774 // of course you could implement it on your and you should do this because
775 // the general way is more memory expensive
776 // -------------------------------------------------------------------------
777 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( ) throw(SQLException
, RuntimeException
)
781 // -------------------------------------------------------------------------
782 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTypeInfo( ) throw(SQLException
, RuntimeException
)
786 // -------------------------------------------------------------------------
787 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs( ) throw(SQLException
, RuntimeException
)
791 // -----------------------------------------------------------------------------
792 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas( ) throw(SQLException
, RuntimeException
)
796 // -------------------------------------------------------------------------
797 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumnPrivileges(
798 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
,
799 const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
803 // -------------------------------------------------------------------------
804 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
805 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
,
806 const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
810 // -------------------------------------------------------------------------
811 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
812 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
813 const ::rtl::OUString
& tableNamePattern
, const Sequence
< ::rtl::OUString
>& types
) throw(SQLException
, RuntimeException
)
817 // -------------------------------------------------------------------------
818 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
819 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
820 const ::rtl::OUString
& procedureNamePattern
, const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
824 // -------------------------------------------------------------------------
825 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedures(
826 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
827 const ::rtl::OUString
& procedureNamePattern
) throw(SQLException
, RuntimeException
)
831 // -------------------------------------------------------------------------
832 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(
833 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
837 // -------------------------------------------------------------------------
838 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(
839 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
843 // -------------------------------------------------------------------------
844 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(
845 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
849 // -------------------------------------------------------------------------
850 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(
851 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
855 // -------------------------------------------------------------------------
856 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(
857 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
,
858 sal_Bool unique
, sal_Bool approximate
) throw(SQLException
, RuntimeException
)
862 // -------------------------------------------------------------------------
863 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(
864 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
, sal_Int32 scope
,
865 sal_Bool nullable
) throw(SQLException
, RuntimeException
)
869 // -------------------------------------------------------------------------
870 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
871 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
) throw(SQLException
, RuntimeException
)
875 // -------------------------------------------------------------------------
876 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
877 const Any
& primaryCatalog
, const ::rtl::OUString
& primarySchema
,
878 const ::rtl::OUString
& primaryTable
, const Any
& foreignCatalog
,
879 const ::rtl::OUString
& foreignSchema
, const ::rtl::OUString
& foreignTable
) throw(SQLException
, RuntimeException
)
883 // -------------------------------------------------------------------------
884 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
)
886 OSL_ENSURE(0,"Not implemented yet!");
887 throw SQLException();
890 // -----------------------------------------------------------------------------