31#include <com/sun/star/beans/PropertyValue.hpp>
32#include <com/sun/star/document/DocumentEvent.hpp>
33#include <com/sun/star/document/XDocumentEventListener.hpp>
34#include <com/sun/star/embed/XStorage.hpp>
35#include <com/sun/star/lang/XServiceInfo.hpp>
36#include <com/sun/star/lang/XUnoTunnel.hpp>
37#include <com/sun/star/sdbc/XBlob.hpp>
38#include <com/sun/star/sdbc/XClob.hpp>
39#include <com/sun/star/sdbc/XConnection.hpp>
40#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
41#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
42#include <com/sun/star/util/XModifiable.hpp>
47 typedef ::cppu::WeakComponentImplHelper< css::document::XDocumentEventListener,
48 css::lang::XServiceInfo,
49 css::lang::XUnoTunnel,
50 css::sdbc::XConnection,
51 css::sdbc::XWarningsSupplier
90 css::uno::Reference< css::util::XModifiable >
97 css::uno::Reference< css::embed::XStorage >
115 void loadDatabaseFile(
const OUString& pSrcLocation,
const OUString& pTmpLocation);
139 css::uno::WeakReference< css::sdbcx::XTablesSupplier>
141 css::uno::WeakReference< css::sdbc::XDatabaseMetaData >
166 const css::uno::Sequence< css::beans::PropertyValue >& info);
183 css::uno::Reference< css::sdbc::XBlob>
187 css::uno::Reference< css::sdbc::XClob>
194 css::uno::Reference< css::sdbcx::XTablesSupplier >
203 virtual void SAL_CALL
disposing()
override;
208 virtual sal_Int64 SAL_CALL
getSomething(
const css::uno::Sequence<sal_Int8>& rId)
override;
211 virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL
createStatement( )
override;
212 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL
prepareStatement(
const OUString&
sql )
override;
213 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL
prepareCall(
const OUString&
sql )
override;
214 virtual OUString SAL_CALL
nativeSQL(
const OUString&
sql )
override;
217 virtual void SAL_CALL
commit( )
override;
218 virtual void SAL_CALL
rollback( )
override;
220 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL
getMetaData( )
override;
223 virtual void SAL_CALL
setCatalog(
const OUString& catalog )
override;
224 virtual OUString SAL_CALL
getCatalog( )
override;
227 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
getTypeMap( )
override;
228 virtual void SAL_CALL
setTypeMap(
const css::uno::Reference< css::container::XNameAccess >& typeMap )
override;
230 virtual void SAL_CALL
close( )
override;
232 virtual css::uno::Any SAL_CALL
getWarnings( )
override;
235 virtual void SAL_CALL
documentEventOccured(
const css::document::DocumentEvent& Event )
override;
237 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
virtual void SAL_CALL setReadOnly(sal_Bool readOnly) override
void storeDatabase()
Backup and store embedded extracted database to the .odb file.
css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog()
Create and/or connect to the sdbcx Catalog.
virtual css::uno::Any SAL_CALL getWarnings() override
css::uno::WeakReference< css::sdbc::XDatabaseMetaData > m_xMetaData
virtual sal_Bool SAL_CALL getAutoCommit() override
virtual sal_Bool SAL_CALL isReadOnly() override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL setTypeMap(const css::uno::Reference< css::container::XNameAccess > &typeMap) override
void setupTransaction()
Creates a new transaction with the desired parameters, if necessary discarding an existing transactio...
css::uno::Reference< css::sdbc::XClob > createClob(ISC_QUAD const *pBlobID)
void loadDatabaseFile(const OUString &pSrcLocation, const OUString &pTmpLocation)
const OUString & getConnectionURL() const
css::uno::WeakReference< css::sdbcx::XTablesSupplier > m_xCatalog
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString &sql) override
virtual sal_Int32 SAL_CALL getTransactionIsolation() override
TTypeInfoVector m_aTypeInfo
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap() override
bool m_bIsFile
We are using an external (local) file.
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rId) override
virtual void SAL_CALL setTransactionIsolation(sal_Int32 level) override
virtual void SAL_CALL documentEventOccured(const css::document::DocumentEvent &Event) override
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
virtual void SAL_CALL clearWarnings() override
isc_db_handle & getDBHandle()
OWeakRefArray m_aStatements
Statements owned by this connection.
virtual void SAL_CALL setCatalog(const OUString &catalog) override
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
virtual sal_Bool SAL_CALL isClosed() override
virtual ~Connection() override
void runBackupService(const short nAction)
Run the backup service, use nAction = isc_action_svc_backup to backup, nAction = isc_action_svc_resto...
virtual OUString SAL_CALL getCatalog() override
bool m_bIsEmbedded
Denotes that we have a database stored within a .odb file.
void detachServiceManager(isc_svc_handle pServiceHandle)
OUString m_sFBKPath
Path for our extracted .fbk file.
isc_svc_handle attachServiceManager()
virtual void SAL_CALL setAutoCommit(sal_Bool autoCommit) override
void construct(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info)
isc_tr_handle & getTransaction()
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString &sql) override
virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement() override
css::uno::Reference< css::sdbc::XBlob > createBlob(ISC_QUAD const *pBlobID)
Create a new Blob tied to this connection.
std::unique_ptr< ::utl::TempFileNamed > m_pDatabaseFileDir
The temporary folder where we extract the .fbk from a .odb, and also store the temporary ....
isc_tr_handle m_aTransactionHandle
virtual void SAL_CALL close() override
virtual void SAL_CALL rollback() override
css::uno::Reference< css::embed::XStorage > m_xEmbeddedStorage
Handle for the folder within the .odb where we store our .fbk (Only used if m_bIsEmbedded is true).
OUString m_sConnectionURL
The URL passed to us when opening, i.e.
sal_Int32 m_aTransactionIsolation
virtual OUString SAL_CALL nativeSQL(const OUString &sql) override
virtual void SAL_CALL commit() override
OUString m_sFirebirdURL
The URL passed to firebird, i.e.
css::uno::Reference< css::util::XModifiable > m_xParentDocument
Handle for the parent DatabaseDocument.
isc_db_handle m_aDBHandle
std::vector< ::connectivity::OTypeInfo > TTypeInfoVector
::cppu::WeakComponentImplHelper< css::document::XDocumentEventListener, css::lang::XServiceInfo, css::lang::XUnoTunnel, css::sdbc::XConnection, css::sdbc::XWarningsSupplier > Connection_BASE
std::vector< css::uno::WeakReferenceHelper > OWeakRefArray