summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/dbmetadata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/commontools/dbmetadata.cxx')
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index c5b65a9d113b..d30161da497c 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -257,6 +257,27 @@ namespace dbtools
}
//--------------------------------------------------------------------
+ bool DatabaseMetaData::supportsPrimaryKeys() const
+ {
+ lcl_checkConnected( *m_pImpl );
+
+ bool doesSupportPrimaryKeys = false;
+ try
+ {
+ Any setting;
+ if ( !( lcl_getConnectionSetting( "PrimaryKeySupport", *m_pImpl, setting ) )
+ || !( setting >>= doesSupportPrimaryKeys )
+ )
+ doesSupportPrimaryKeys = m_pImpl->xConnectionMetaData->supportsCoreSQLGrammar();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return doesSupportPrimaryKeys;
+ }
+
+ //--------------------------------------------------------------------
const ::rtl::OUString& DatabaseMetaData::getIdentifierQuoteString() const
{
return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedIdentifierQuoteString, &XDatabaseMetaData::getIdentifierQuoteString );