LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::odbc::OConnection Class Referencefinal

#include <OConnection.hxx>

Inheritance diagram for connectivity::odbc::OConnection:
[legend]
Collaboration diagram for connectivity::odbc::OConnection:
[legend]

Public Member Functions

oslGenericFunction getOdbcFunction (ODBC3SQLFunctionId _nIndex) const
 
SQLRETURN Construct (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info)
 
 OConnection (const SQLHANDLE _pDriverHandle, ODBCDriver *_pDriver)
 
virtual ~OConnection () override
 
virtual void SAL_CALL disposing () override
 
 DECLARE_SERVICE_INFO ()
 
virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement () override
 
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement (const OUString &sql) override
 
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall (const OUString &sql) override
 
virtual OUString SAL_CALL nativeSQL (const OUString &sql) override
 
virtual void SAL_CALL setAutoCommit (sal_Bool autoCommit) override
 
virtual sal_Bool SAL_CALL getAutoCommit () override
 
virtual void SAL_CALL commit () override
 
virtual void SAL_CALL rollback () override
 
virtual sal_Bool SAL_CALL isClosed () override
 
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData () override
 
virtual void SAL_CALL setReadOnly (sal_Bool readOnly) override
 
virtual sal_Bool SAL_CALL isReadOnly () override
 
virtual void SAL_CALL setCatalog (const OUString &catalog) override
 
virtual OUString SAL_CALL getCatalog () override
 
virtual void SAL_CALL setTransactionIsolation (sal_Int32 level) override
 
virtual sal_Int32 SAL_CALL getTransactionIsolation () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap () override
 
virtual void SAL_CALL setTypeMap (const css::uno::Reference< css::container::XNameAccess > &typeMap) override
 
virtual void SAL_CALL close () override
 
virtual css::uno::Any SAL_CALL getWarnings () override
 
virtual void SAL_CALL clearWarnings () override
 
SQLHANDLE getConnection ()
 
bool isCatalogUsed () const
 
bool isIgnoreDriverPrivilegesEnabled () const
 
bool preventGetVersionColumns () const
 
bool useOldDateFormat () const
 
ODBCDrivergetDriver () const
 
SQLHANDLE createStatementHandle ()
 
void freeStatementHandle (SQLHANDLE &_pHandle)
 
- Public Member Functions inherited from connectivity::OMetaConnection
 OMetaConnection ()
 
rtl_TextEncoding getTextEncoding () const
 
const OUString & getURL () const
 
void setURL (const OUString &_rsUrl)
 
void throwGenericSQLException (TranslateId pErrorResourceId, const css::uno::Reference< css::uno::XInterface > &_xContext)
 
const SharedResourcesgetResources () const
 
void setConnectionInfo (const css::uno::Sequence< css::beans::PropertyValue > &_aInfo)
 
const css::uno::Sequence< css::beans::PropertyValue > & getConnectionInfo () const
 
virtual void SAL_CALL disposing () override
 
virtual sal_Int64 SAL_CALL getSomething (const css::uno::Sequence< sal_Int8 > &aIdentifier) override
 
- Public Member Functions inherited from connectivity::OAutoRetrievingBase
bool isAutoRetrievingEnabled () const
 
OUString getTransformedGeneratedStatement (const OUString &_sInsertStatement) const
 transform the statement to query for auto generated values More...
 

Private Member Functions

SQLRETURN OpenConnection (const OUString &aConnectStr, sal_Int32 nTimeOut, bool bSilent)
 

Private Attributes

std::map< SQLHANDLE, rtl::Reference< OConnection > > m_aConnections
 
OUString m_sUser
 
rtl::Reference< ODBCDriverm_xDriver
 
SQLHANDLE m_aConnectionHandle
 
SQLHANDLE m_pDriverHandleCopy
 
sal_Int32 m_nStatementCount
 
bool m_bClosed
 
bool m_bUseCatalog
 
bool m_bUseOldDateFormat
 
bool m_bIgnoreDriverPrivileges
 
bool m_bPreventGetVersionColumns
 
bool m_bReadOnly
 

Additional Inherited Members

- Static Public Member Functions inherited from connectivity::OMetaConnection
::dbtools::OPropertyMapgetPropMap ()
 
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId ()
 
- Protected Member Functions inherited from connectivity::OAutoRetrievingBase
 OAutoRetrievingBase ()
 
virtual ~OAutoRetrievingBase ()
 
void enableAutoRetrievingEnabled (bool _bAutoEnable)
 
void setAutoRetrievingStatement (const OUString &_sStmt)
 
- Protected Attributes inherited from connectivity::OMetaConnection
::osl::Mutex m_aMutex
 
css::uno::Sequence< css::beans::PropertyValue > m_aConnectionInfo
 
connectivity::OWeakRefArray m_aStatements
 
OUString m_sURL
 
rtl_TextEncoding m_nTextEncoding
 
css::uno::WeakReference< css::sdbc::XDatabaseMetaData > m_xMetaData
 
SharedResources m_aResources
 

Detailed Description

Definition at line 44 of file OConnection.hxx.

Constructor & Destructor Documentation

◆ OConnection()

OConnection::OConnection ( const SQLHANDLE  _pDriverHandle,
ODBCDriver _pDriver 
)

Definition at line 44 of file OConnection.cxx.

References m_bReadOnly.

Referenced by createStatementHandle().

◆ ~OConnection()

OConnection::~OConnection ( )
overridevirtual

Member Function Documentation

◆ clearWarnings()

void SAL_CALL OConnection::clearWarnings ( )
overridevirtual

Definition at line 475 of file OConnection.cxx.

◆ close()

void SAL_CALL OConnection::close ( )
overridevirtual

◆ commit()

void SAL_CALL OConnection::commit ( )
overridevirtual

◆ Construct()

SQLRETURN OConnection::Construct ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)

◆ createStatement()

Reference< XStatement > SAL_CALL OConnection::createStatement ( )
overridevirtual

Definition at line 273 of file OConnection.cxx.

References connectivity::checkDisposed(), and m_aMutex.

◆ createStatementHandle()

SQLHANDLE OConnection::createStatementHandle ( )

◆ DECLARE_SERVICE_INFO()

connectivity::odbc::OConnection::DECLARE_SERVICE_INFO ( )

◆ disposing()

void OConnection::disposing ( )
overridevirtual

◆ freeStatementHandle()

void OConnection::freeStatementHandle ( SQLHANDLE &  _pHandle)

Definition at line 524 of file OConnection.cxx.

References m_aConnections, m_nStatementCount, N3SQLFreeHandle, and N3SQLFreeStmt.

◆ getAutoCommit()

sal_Bool SAL_CALL OConnection::getAutoCommit ( )
overridevirtual

◆ getCatalog()

OUString SAL_CALL OConnection::getCatalog ( )
overridevirtual

◆ getConnection()

SQLHANDLE connectivity::odbc::OConnection::getConnection ( )
inline

Definition at line 110 of file OConnection.hxx.

◆ getDriver()

ODBCDriver * connectivity::odbc::OConnection::getDriver ( ) const
inline

Definition at line 117 of file OConnection.hxx.

◆ getMetaData()

Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData ( )
overridevirtual

◆ getOdbcFunction()

oslGenericFunction OConnection::getOdbcFunction ( ODBC3SQLFunctionId  _nIndex) const

◆ getTransactionIsolation()

sal_Int32 SAL_CALL OConnection::getTransactionIsolation ( )
overridevirtual

◆ getTypeMap()

Reference< css::container::XNameAccess > SAL_CALL OConnection::getTypeMap ( )
overridevirtual

◆ getWarnings()

Any SAL_CALL OConnection::getWarnings ( )
overridevirtual

Definition at line 470 of file OConnection.cxx.

References Any.

◆ isCatalogUsed()

bool connectivity::odbc::OConnection::isCatalogUsed ( ) const
inline

◆ isClosed()

sal_Bool SAL_CALL OConnection::isClosed ( )
overridevirtual

Definition at line 352 of file OConnection.cxx.

References connectivity::OMetaConnection::m_aMutex.

Referenced by ~OConnection().

◆ isIgnoreDriverPrivilegesEnabled()

bool connectivity::odbc::OConnection::isIgnoreDriverPrivilegesEnabled ( ) const
inline

Definition at line 114 of file OConnection.hxx.

◆ isReadOnly()

sal_Bool SAL_CALL OConnection::isReadOnly ( )
overridevirtual

Definition at line 385 of file OConnection.cxx.

References m_bReadOnly.

Referenced by connectivity::odbc::ODatabaseMetaData::isReadOnly().

◆ nativeSQL()

OUString SAL_CALL OConnection::nativeSQL ( const OUString &  sql)
overridevirtual

◆ OpenConnection()

SQLRETURN OConnection::OpenConnection ( const OUString &  aConnectStr,
sal_Int32  nTimeOut,
bool  bSilent 
)
private

◆ prepareCall()

Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall ( const OUString &  sql)
overridevirtual

◆ prepareStatement()

Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement ( const OUString &  sql)
overridevirtual

◆ preventGetVersionColumns()

bool connectivity::odbc::OConnection::preventGetVersionColumns ( ) const
inline

Definition at line 115 of file OConnection.hxx.

◆ rollback()

void SAL_CALL OConnection::rollback ( )
overridevirtual

◆ setAutoCommit()

void SAL_CALL OConnection::setAutoCommit ( sal_Bool  autoCommit)
overridevirtual

◆ setCatalog()

void SAL_CALL OConnection::setCatalog ( const OUString &  catalog)
overridevirtual

◆ setReadOnly()

void SAL_CALL OConnection::setReadOnly ( sal_Bool  readOnly)
overridevirtual

◆ setTransactionIsolation()

void SAL_CALL OConnection::setTransactionIsolation ( sal_Int32  level)
overridevirtual

◆ setTypeMap()

virtual void SAL_CALL connectivity::odbc::OConnection::setTypeMap ( const css::uno::Reference< css::container::XNameAccess > &  typeMap)
overridevirtual

References close.

◆ useOldDateFormat()

bool connectivity::odbc::OConnection::useOldDateFormat ( ) const
inline

Member Data Documentation

◆ m_aConnectionHandle

SQLHANDLE connectivity::odbc::OConnection::m_aConnectionHandle
private

◆ m_aConnections

std::map< SQLHANDLE, rtl::Reference<OConnection> > connectivity::odbc::OConnection::m_aConnections
private

Definition at line 50 of file OConnection.hxx.

Referenced by createStatementHandle(), disposing(), and freeStatementHandle().

◆ m_bClosed

bool connectivity::odbc::OConnection::m_bClosed
private

Definition at line 61 of file OConnection.hxx.

Referenced by disposing(), OpenConnection(), and ~OConnection().

◆ m_bIgnoreDriverPrivileges

bool connectivity::odbc::OConnection::m_bIgnoreDriverPrivileges
private

Definition at line 64 of file OConnection.hxx.

Referenced by Construct().

◆ m_bPreventGetVersionColumns

bool connectivity::odbc::OConnection::m_bPreventGetVersionColumns
private

Definition at line 65 of file OConnection.hxx.

Referenced by Construct().

◆ m_bReadOnly

bool connectivity::odbc::OConnection::m_bReadOnly
private

Definition at line 66 of file OConnection.hxx.

Referenced by isReadOnly(), and OpenConnection().

◆ m_bUseCatalog

bool connectivity::odbc::OConnection::m_bUseCatalog
private

Definition at line 62 of file OConnection.hxx.

Referenced by Construct().

◆ m_bUseOldDateFormat

bool connectivity::odbc::OConnection::m_bUseOldDateFormat
private

Definition at line 63 of file OConnection.hxx.

Referenced by OpenConnection().

◆ m_nStatementCount

sal_Int32 connectivity::odbc::OConnection::m_nStatementCount
private

Definition at line 60 of file OConnection.hxx.

Referenced by createStatementHandle(), and freeStatementHandle().

◆ m_pDriverHandleCopy

SQLHANDLE connectivity::odbc::OConnection::m_pDriverHandleCopy
private

Definition at line 59 of file OConnection.hxx.

Referenced by Construct(), and createStatementHandle().

◆ m_sUser

OUString connectivity::odbc::OConnection::m_sUser
private

Definition at line 53 of file OConnection.hxx.

Referenced by Construct().

◆ m_xDriver

rtl::Reference<ODBCDriver> connectivity::odbc::OConnection::m_xDriver
private

Definition at line 55 of file OConnection.hxx.

Referenced by createStatementHandle(), and getOdbcFunction().


The documentation for this class was generated from the following files: