summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-12 09:45:39 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-12 16:34:29 +0100
commitaf76bc78ef6abe5afa74d4edbcc0973923db734d (patch)
tree7bdd6d205adf8cf8a343b9878f3589b235bb9766
parent6f93afa5835af33ede29cf376512ae83253ade87 (diff)
Remove unnecessary catalog state (unsupported in firebird).
Change-Id: I34a7a245eb87a5b0d626be4008e2584774e82cf3
-rw-r--r--connectivity/source/drivers/firebird/FConnection.cxx46
-rw-r--r--connectivity/source/drivers/firebird/FConnection.hxx3
-rw-r--r--connectivity/source/drivers/firebird/FDatabaseMetaData.cxx18
-rw-r--r--connectivity/source/drivers/firebird/FDatabaseMetaData.hxx1
4 files changed, 23 insertions, 45 deletions
diff --git a/connectivity/source/drivers/firebird/FConnection.cxx b/connectivity/source/drivers/firebird/FConnection.cxx
index 89d1967aa6fe..0735d24f770d 100644
--- a/connectivity/source/drivers/firebird/FConnection.cxx
+++ b/connectivity/source/drivers/firebird/FConnection.cxx
@@ -71,15 +71,16 @@
using namespace connectivity::firebird;
using namespace connectivity;
-using namespace com::sun::star;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::document;
-using namespace com::sun::star::embed;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::io;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::sdbc;
-using namespace com::sun::star::uno;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::uno;
const OUString OConnection::sDBLocation( "firebird.fdb" );
@@ -92,7 +93,6 @@ OConnection::OConnection(FirebirdDriver* _pDriver)
m_sUser(),
m_pDriver(_pDriver),
m_bClosed(sal_False),
- m_bUseCatalog(sal_False),
m_bUseOldDateFormat(sal_False),
m_bAutoCommit(sal_True),
m_bReadOnly(sal_False),
@@ -493,7 +493,7 @@ sal_Bool SAL_CALL OConnection::isReadOnly() throw(SQLException, RuntimeException
void SAL_CALL OConnection::setCatalog(const OUString& catalog)
throw(SQLException, RuntimeException)
{
- // Unsupported
+ ::dbtools::throwFeatureNotImplementedException( "XConnection::setCatalog", *this );
(void) catalog;
}
@@ -519,23 +519,21 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
return m_aTransactionIsolation;
}
-// --------------------------------------------------------------------------------
-Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // if your driver has special database types you can return it here
- return NULL;
+Reference< XNameAccess > SAL_CALL OConnection::getTypeMap() throw(SQLException, RuntimeException)
+{
+ ::dbtools::throwFeatureNotImplementedException( "XConnection::getTypeMap", *this );
+ return 0;
}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
+
+void SAL_CALL OConnection::setTypeMap(const Reference< XNameAccess >& typeMap)
+ throw(SQLException, RuntimeException)
{
- // the other way around
+ ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this );
+ (void) typeMap;
}
-// --------------------------------------------------------------------------------
-// XCloseable
+
+//----- XCloseable -----------------------------------------------------------
void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException)
{
SAL_INFO("connectivity.firebird", "=> OConnection::close().");
diff --git a/connectivity/source/drivers/firebird/FConnection.hxx b/connectivity/source/drivers/firebird/FConnection.hxx
index 0ca035cc28fc..e91aef66d4f9 100644
--- a/connectivity/source/drivers/firebird/FConnection.hxx
+++ b/connectivity/source/drivers/firebird/FConnection.hxx
@@ -106,7 +106,6 @@ namespace connectivity
// driver object
sal_Bool m_bClosed;
- sal_Bool m_bUseCatalog; // should we use the catalog on filebased databases
sal_Bool m_bUseOldDateFormat;
sal_Bool m_bAutoCommit;
sal_Bool m_bReadOnly;
@@ -167,8 +166,6 @@ namespace connectivity
// css.lang.XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
- // should we use the catalog on filebased databases
- inline sal_Bool isCatalogUsed() const { return m_bUseCatalog; }
inline ::rtl::OUString getUserName() const { return m_sUser; }
inline isc_db_handle getDBHandler() const { return m_DBHandler; }
inline FirebirdDriver* getDriver() const { return m_pDriver;}
diff --git a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
index 80c4470bfe10..0bdcc17c835f 100644
--- a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx
@@ -61,17 +61,10 @@ namespace connectivity
ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon)
: m_pConnection(_pCon)
-, m_bUseCatalog(sal_True)
{
OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
- if(!m_pConnection->isCatalogUsed())
- {
- osl_atomic_increment( &m_refCount );
- m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_atomic_decrement( &m_refCount );
- }
}
-// -------------------------------------------------------------------------
+
ODatabaseMetaData::~ODatabaseMetaData()
{
}
@@ -79,9 +72,6 @@ ODatabaseMetaData::~ODatabaseMetaData()
::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException)
{
::rtl::OUString aVal;
- if(m_bUseCatalog)
- { // do some special here for you database
- }
return aVal;
}
@@ -218,9 +208,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLExc
::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException)
{
::rtl::OUString aVal;
- if(m_bUseCatalog)
- {
- }
return aVal;
}
// -------------------------------------------------------------------------
@@ -245,9 +232,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( )
sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException)
{
sal_Bool bValue = sal_False;
- if(m_bUseCatalog)
- {
- }
return bValue;
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/firebird/FDatabaseMetaData.hxx b/connectivity/source/drivers/firebird/FDatabaseMetaData.hxx
index a2852e0d6bd4..414dcacdba73 100644
--- a/connectivity/source/drivers/firebird/FDatabaseMetaData.hxx
+++ b/connectivity/source/drivers/firebird/FDatabaseMetaData.hxx
@@ -53,7 +53,6 @@ namespace connectivity
class ODatabaseMetaData : public ODatabaseMetaData_BASE
{
OConnection* m_pConnection;
- sal_Bool m_bUseCatalog;
public:
inline OConnection* getOwnConnection() const { return m_pConnection; }