1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
7 * Copyright 2000, 2010 Oracle and/or its affiliates.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
29 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
31 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *************************************************************************/
36 #include "SDatabaseMetaData.hxx"
37 #include <com/sun/star/sdbc/DataType.hpp>
38 #include <com/sun/star/sdbc/ResultSetType.hpp>
39 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
40 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
42 using namespace connectivity::skeleton
;
43 using namespace com::sun::star::uno
;
44 using namespace com::sun::star::lang
;
45 using namespace com::sun::star::beans
;
46 using namespace com::sun::star::sdbc
;
48 ODatabaseMetaData::ODatabaseMetaData(OConnection
* _pCon
)
49 : m_pConnection(_pCon
)
50 , m_bUseCatalog(sal_True
)
52 OSL_ENSURE(m_pConnection
,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
53 if(!m_pConnection
->isCatalogUsed())
55 osl_atomic_increment( &m_refCount
);
56 m_bUseCatalog
= !(usesLocalFiles() || usesLocalFilePerTable());
57 osl_atomic_decrement( &m_refCount
);
61 ODatabaseMetaData::~ODatabaseMetaData()
65 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException
, RuntimeException
)
69 { // do some special here for you database
75 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException
, RuntimeException
)
77 sal_Int32 nValue
= 0; // 0 means no limit
81 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxRowSize( ) throw(SQLException
, RuntimeException
)
83 sal_Int32 nValue
= 0; // 0 means no limit
87 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException
, RuntimeException
)
89 sal_Int32 nValue
= 0; // 0 means no limit
93 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException
, RuntimeException
)
95 sal_Int32 nValue
= 0; // 0 means no limit
99 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException
, RuntimeException
)
101 sal_Int32 nValue
= 0; // 0 means no limit
105 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException
, RuntimeException
)
107 sal_Int32 nValue
= 0; // 0 means no limit
111 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException
, RuntimeException
)
113 sal_Int32 nValue
= 0; // 0 means no limit
117 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxConnections( ) throw(SQLException
, RuntimeException
)
119 sal_Int32 nValue
= 0; // 0 means no limit
123 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException
, RuntimeException
)
125 sal_Int32 nValue
= 0; // 0 means no limit
129 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException
, RuntimeException
)
131 sal_Int32 nValue
= 0; // 0 means no limit
135 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException
, RuntimeException
)
137 sal_Int32 nValue
= 0; // 0 means no limit
141 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException
, RuntimeException
)
143 sal_Int32 nValue
= 0; // 0 means no limit
148 sal_Bool SAL_CALL
ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException
, RuntimeException
)
153 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
158 sal_Bool SAL_CALL
ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
163 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
168 sal_Bool SAL_CALL
ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
173 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
178 sal_Bool SAL_CALL
ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
183 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException
, RuntimeException
)
188 sal_Bool SAL_CALL
ODatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException
, RuntimeException
)
193 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException
, RuntimeException
)
195 sal_Int32 nValue
= 0; // 0 means no limit
199 sal_Bool SAL_CALL
ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException
, RuntimeException
)
204 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getCatalogTerm( ) throw(SQLException
, RuntimeException
)
206 ::rtl::OUString aVal
;
213 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException
, RuntimeException
)
215 // normally this is "
216 ::rtl::OUString
aVal("\"");
220 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException
, RuntimeException
)
222 ::rtl::OUString aVal
;
226 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException
, RuntimeException
)
231 sal_Bool SAL_CALL
ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException
, RuntimeException
)
233 sal_Bool bValue
= sal_False
;
240 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException
, RuntimeException
)
245 sal_Bool SAL_CALL
ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException
, RuntimeException
)
250 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException
, RuntimeException
)
255 sal_Bool SAL_CALL
ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException
, RuntimeException
)
260 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException
, RuntimeException
)
265 sal_Bool SAL_CALL
ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException
, RuntimeException
)
270 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException
, RuntimeException
)
275 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException
, RuntimeException
)
280 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException
, RuntimeException
)
285 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException
, RuntimeException
)
290 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level
) throw(SQLException
, RuntimeException
)
295 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException
, RuntimeException
)
300 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException
, RuntimeException
)
305 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException
, RuntimeException
)
307 return sal_True
; // should be supported at least
310 sal_Bool SAL_CALL
ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException
, RuntimeException
)
315 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException
, RuntimeException
)
320 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException
, RuntimeException
)
325 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException
, RuntimeException
)
330 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException
, RuntimeException
)
335 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException
, RuntimeException
)
340 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException
, RuntimeException
)
345 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxStatements( ) throw(SQLException
, RuntimeException
)
347 sal_Int32 nValue
= 0; // 0 means no limit
351 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException
, RuntimeException
)
353 sal_Int32 nValue
= 0; // 0 means no limit
357 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException
, RuntimeException
)
359 sal_Int32 nValue
= 0; // 0 means no limit
363 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTransactions( ) throw(SQLException
, RuntimeException
)
368 sal_Bool SAL_CALL
ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException
, RuntimeException
)
373 sal_Bool SAL_CALL
ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException
, RuntimeException
)
378 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException
, RuntimeException
)
383 sal_Bool SAL_CALL
ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException
, RuntimeException
)
388 sal_Bool SAL_CALL
ODatabaseMetaData::isReadOnly( ) throw(SQLException
, RuntimeException
)
393 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFiles( ) throw(SQLException
, RuntimeException
)
398 sal_Bool SAL_CALL
ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException
, RuntimeException
)
403 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException
, RuntimeException
)
408 sal_Bool SAL_CALL
ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException
, RuntimeException
)
413 sal_Bool SAL_CALL
ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException
, RuntimeException
)
418 sal_Bool SAL_CALL
ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException
, RuntimeException
)
423 sal_Bool SAL_CALL
ODatabaseMetaData::supportsConvert( sal_Int32 fromType
, sal_Int32 toType
) throw(SQLException
, RuntimeException
)
428 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException
, RuntimeException
)
433 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupBy( ) throw(SQLException
, RuntimeException
)
438 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException
, RuntimeException
)
443 sal_Bool SAL_CALL
ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException
, RuntimeException
)
448 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException
, RuntimeException
)
453 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException
, RuntimeException
)
458 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException
, RuntimeException
)
463 sal_Bool SAL_CALL
ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException
, RuntimeException
)
468 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnion( ) throw(SQLException
, RuntimeException
)
473 sal_Bool SAL_CALL
ODatabaseMetaData::supportsUnionAll( ) throw(SQLException
, RuntimeException
)
478 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException
, RuntimeException
)
483 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException
, RuntimeException
)
488 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException
, RuntimeException
)
493 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException
, RuntimeException
)
498 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException
, RuntimeException
)
503 sal_Bool SAL_CALL
ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException
, RuntimeException
)
508 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException
, RuntimeException
)
513 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
)
518 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException
, RuntimeException
)
523 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException
, RuntimeException
)
528 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException
, RuntimeException
)
533 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException
, RuntimeException
)
538 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException
, RuntimeException
)
543 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException
, RuntimeException
)
548 sal_Bool SAL_CALL
ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException
, RuntimeException
)
553 sal_Bool SAL_CALL
ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException
, RuntimeException
)
558 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getURL( ) throw(SQLException
, RuntimeException
)
560 ::rtl::OUString
aValue("sdbc:skeleton:");
564 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getUserName( ) throw(SQLException
, RuntimeException
)
566 ::rtl::OUString aValue
;
570 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDriverName( ) throw(SQLException
, RuntimeException
)
572 ::rtl::OUString aValue
;
576 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDriverVersion() throw(SQLException
, RuntimeException
)
578 ::rtl::OUString aValue
;
582 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException
, RuntimeException
)
584 ::rtl::OUString aValue
;
588 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException
, RuntimeException
)
590 ::rtl::OUString aValue
;
594 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getProcedureTerm( ) throw(SQLException
, RuntimeException
)
596 ::rtl::OUString aValue
;
600 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSchemaTerm( ) throw(SQLException
, RuntimeException
)
602 ::rtl::OUString aValue
;
606 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException
)
611 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException
, RuntimeException
)
613 return TransactionIsolation::NONE
;
616 sal_Int32 SAL_CALL
ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException
)
621 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSQLKeywords( ) throw(SQLException
, RuntimeException
)
623 ::rtl::OUString aValue
;
627 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException
, RuntimeException
)
629 ::rtl::OUString aValue
;
633 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getStringFunctions( ) throw(SQLException
, RuntimeException
)
635 return ::rtl::OUString();
638 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException
, RuntimeException
)
640 return ::rtl::OUString();
643 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getSystemFunctions( ) throw(SQLException
, RuntimeException
)
645 return ::rtl::OUString();
648 ::rtl::OUString SAL_CALL
ODatabaseMetaData::getNumericFunctions( ) throw(SQLException
, RuntimeException
)
650 return ::rtl::OUString();
653 sal_Bool SAL_CALL
ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException
, RuntimeException
)
658 sal_Bool SAL_CALL
ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException
, RuntimeException
)
663 sal_Bool SAL_CALL
ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException
, RuntimeException
)
668 sal_Bool SAL_CALL
ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException
, RuntimeException
)
673 sal_Bool SAL_CALL
ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException
, RuntimeException
)
678 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException
, RuntimeException
)
680 sal_Int32 nValue
= 0; // 0 means no limit
684 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException
, RuntimeException
)
686 sal_Int32 nValue
= 0; // 0 means no limit
690 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException
, RuntimeException
)
692 sal_Int32 nValue
= 0; // 0 means no limit
696 sal_Int32 SAL_CALL
ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException
, RuntimeException
)
698 sal_Int32 nValue
= 0; // 0 means no limit
702 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetType( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
707 sal_Bool SAL_CALL
ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType
, sal_Int32 concurrency
) throw(SQLException
, RuntimeException
)
712 sal_Bool SAL_CALL
ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
717 sal_Bool SAL_CALL
ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
722 sal_Bool SAL_CALL
ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
727 sal_Bool SAL_CALL
ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
732 sal_Bool SAL_CALL
ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
737 sal_Bool SAL_CALL
ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
742 sal_Bool SAL_CALL
ODatabaseMetaData::updatesAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
747 sal_Bool SAL_CALL
ODatabaseMetaData::deletesAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
752 sal_Bool SAL_CALL
ODatabaseMetaData::insertsAreDetected( sal_Int32 setType
) throw(SQLException
, RuntimeException
)
757 sal_Bool SAL_CALL
ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
, RuntimeException
)
762 Reference
< XConnection
> SAL_CALL
ODatabaseMetaData::getConnection( ) throw(SQLException
, RuntimeException
)
764 return (Reference
< XConnection
>)m_pConnection
;//new OConnection(m_aConnectionHandle);
767 // here follow all methods which return a resultset
768 // the first methods is an example implementation how to use this resultset
769 // of course you could implement it on your and you should do this because
770 // the general way is more memory expensive
772 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTableTypes( ) throw(SQLException
, RuntimeException
)
777 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTypeInfo( ) throw(SQLException
, RuntimeException
)
782 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCatalogs( ) throw(SQLException
, RuntimeException
)
787 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getSchemas( ) throw(SQLException
, RuntimeException
)
792 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumnPrivileges(
793 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
,
794 const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
799 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getColumns(
800 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
,
801 const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
806 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTables(
807 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
808 const ::rtl::OUString
& tableNamePattern
, const Sequence
< ::rtl::OUString
>& types
) throw(SQLException
, RuntimeException
)
813 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedureColumns(
814 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
815 const ::rtl::OUString
& procedureNamePattern
, const ::rtl::OUString
& columnNamePattern
) throw(SQLException
, RuntimeException
)
820 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getProcedures(
821 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
,
822 const ::rtl::OUString
& procedureNamePattern
) throw(SQLException
, RuntimeException
)
827 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getVersionColumns(
828 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
833 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getExportedKeys(
834 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
839 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getImportedKeys(
840 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
845 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getPrimaryKeys(
846 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
) throw(SQLException
, RuntimeException
)
851 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getIndexInfo(
852 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
,
853 sal_Bool unique
, sal_Bool approximate
) throw(SQLException
, RuntimeException
)
858 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getBestRowIdentifier(
859 const Any
& catalog
, const ::rtl::OUString
& schema
, const ::rtl::OUString
& table
, sal_Int32 scope
,
860 sal_Bool nullable
) throw(SQLException
, RuntimeException
)
865 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getTablePrivileges(
866 const Any
& catalog
, const ::rtl::OUString
& schemaPattern
, const ::rtl::OUString
& tableNamePattern
) throw(SQLException
, RuntimeException
)
871 Reference
< XResultSet
> SAL_CALL
ODatabaseMetaData::getCrossReference(
872 const Any
& primaryCatalog
, const ::rtl::OUString
& primarySchema
,
873 const ::rtl::OUString
& primaryTable
, const Any
& foreignCatalog
,
874 const ::rtl::OUString
& foreignSchema
, const ::rtl::OUString
& foreignTable
) throw(SQLException
, RuntimeException
)
879 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
)
881 OSL_FAIL("Not implemented yet!");
882 throw SQLException();
887 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */