LibreOffice Module connectivity (master) 1
|
#include <OConnection.hxx>
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 |
ODBCDriver * | getDriver () 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 SharedResources & | getResources () 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< ODBCDriver > | m_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::OPropertyMap & | getPropMap () |
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 |
Definition at line 44 of file OConnection.hxx.
OConnection::OConnection | ( | const SQLHANDLE | _pDriverHandle, |
ODBCDriver * | _pDriver | ||
) |
Definition at line 44 of file OConnection.cxx.
References m_bReadOnly.
Referenced by createStatementHandle().
|
overridevirtual |
Definition at line 58 of file OConnection.cxx.
References close(), isClosed(), m_aConnectionHandle, m_bClosed, N3SQLDisconnect, and N3SQLFreeHandle.
|
overridevirtual |
Definition at line 475 of file OConnection.cxx.
|
overridevirtual |
Definition at line 459 of file OConnection.cxx.
References connectivity::checkDisposed(), dispose(), and connectivity::OMetaConnection::m_aMutex.
Referenced by ~OConnection().
|
overridevirtual |
Definition at line 334 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLEndTran, and connectivity::odbc::OTools::ThrowException().
SQLRETURN OConnection::Construct | ( | const OUString & | url, |
const css::uno::Sequence< css::beans::PropertyValue > & | info | ||
) |
css::sdbc::SQLException |
Definition at line 165 of file OConnection.cxx.
References connectivity::OAutoRetrievingBase::enableAutoRetrievingEnabled(), dbtools::OCharsetMap::end(), dbtools::OCharsetMap::findIanaName(), m_aConnectionHandle, m_bIgnoreDriverPrivileges, m_bPreventGetVersionColumns, m_bUseCatalog, connectivity::OMetaConnection::m_nTextEncoding, m_pDriverHandleCopy, connectivity::OMetaConnection::m_sURL, m_sUser, N3SQLAllocHandle, OpenConnection(), SAL_WARN, connectivity::OAutoRetrievingBase::setAutoRetrievingStatement(), connectivity::OMetaConnection::setConnectionInfo(), and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 273 of file OConnection.cxx.
References connectivity::checkDisposed(), and m_aMutex.
SQLHANDLE OConnection::createStatementHandle | ( | ) |
Definition at line 495 of file OConnection.cxx.
References connectivity::OMetaConnection::getConnectionInfo(), getMetaData(), m_aConnections, m_nStatementCount, m_pDriverHandleCopy, connectivity::OMetaConnection::m_sURL, m_xDriver, N3SQLAllocHandle, and OConnection().
connectivity::odbc::OConnection::DECLARE_SERVICE_INFO | ( | ) |
|
overridevirtual |
Reimplemented from connectivity::OMetaConnection.
Definition at line 479 of file OConnection.cxx.
References connectivity::OMetaConnection::disposing(), m_aConnectionHandle, m_aConnections, connectivity::OMetaConnection::m_aMutex, m_bClosed, and N3SQLDisconnect.
void OConnection::freeStatementHandle | ( | SQLHANDLE & | _pHandle | ) |
Definition at line 524 of file OConnection.cxx.
References m_aConnections, m_nStatementCount, N3SQLFreeHandle, and N3SQLFreeStmt.
|
overridevirtual |
Definition at line 322 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLGetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 403 of file OConnection.cxx.
References connectivity::checkDisposed(), connectivity::OMetaConnection::getTextEncoding(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLGetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
inline |
Definition at line 110 of file OConnection.hxx.
|
inline |
Definition at line 117 of file OConnection.hxx.
|
overridevirtual |
Definition at line 359 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, and connectivity::OMetaConnection::m_xMetaData.
Referenced by createStatementHandle().
oslGenericFunction OConnection::getOdbcFunction | ( | ODBC3SQLFunctionId | _nIndex | ) | const |
Definition at line 80 of file OConnection.cxx.
References m_xDriver.
Referenced by connectivity::odbc::OTools::bindValue(), connectivity::odbc::OTools::getBytesValue(), connectivity::odbc::OResultSetMetaData::getNumColAttrib(), connectivity::odbc::OResultSetMetaData::getOdbcFunction(), connectivity::odbc::OTools::getStringValue(), connectivity::odbc::OTools::getValue(), and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 430 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLGetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 444 of file OConnection.cxx.
References connectivity::checkDisposed(), and connectivity::OMetaConnection::m_aMutex.
|
overridevirtual |
Definition at line 470 of file OConnection.cxx.
References Any.
|
inline |
Definition at line 113 of file OConnection.hxx.
Referenced by connectivity::odbc::ODatabaseMetaData::ODatabaseMetaData().
|
overridevirtual |
Definition at line 352 of file OConnection.cxx.
References connectivity::OMetaConnection::m_aMutex.
Referenced by ~OConnection().
|
inline |
Definition at line 114 of file OConnection.hxx.
|
overridevirtual |
Definition at line 385 of file OConnection.cxx.
References m_bReadOnly.
Referenced by connectivity::odbc::ODatabaseMetaData::isReadOnly().
|
overridevirtual |
Definition at line 299 of file OConnection.cxx.
References connectivity::OMetaConnection::getTextEncoding(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLNativeSql, pq_sdbc_driver::OUStringToOString(), pOut, SDB_ODBC_CHAR, and connectivity::odbc::OTools::ThrowException().
|
private |
Definition at line 86 of file OConnection.cxx.
References Exception, connectivity::odbc::OTools::GetInfo(), connectivity::OMetaConnection::getTextEncoding(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, m_bClosed, m_bReadOnly, m_bUseOldDateFormat, N3SQLDriverConnect, N3SQLSetConnectAttr, pq_sdbc_driver::OUStringToOString(), and SDB_ODBC_CHAR.
Referenced by Construct().
|
overridevirtual |
Definition at line 293 of file OConnection.cxx.
References dbtools::throwFeatureNotImplementedSQLException().
|
overridevirtual |
Definition at line 283 of file OConnection.cxx.
References connectivity::checkDisposed(), connectivity::OMetaConnection::m_aMutex, and connectivity::OMetaConnection::m_aStatements.
|
inline |
Definition at line 115 of file OConnection.hxx.
|
overridevirtual |
Definition at line 343 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLEndTran, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 310 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLSetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 391 of file OConnection.cxx.
References connectivity::checkDisposed(), connectivity::OMetaConnection::getTextEncoding(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLSetConnectAttr, pq_sdbc_driver::OUStringToOString(), and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 374 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLSetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
Definition at line 418 of file OConnection.cxx.
References connectivity::checkDisposed(), m_aConnectionHandle, connectivity::OMetaConnection::m_aMutex, N3SQLSetConnectAttr, and connectivity::odbc::OTools::ThrowException().
|
overridevirtual |
References close.
|
inline |
Definition at line 116 of file OConnection.hxx.
Referenced by connectivity::odbc::OResultSet::impl_getDate(), connectivity::odbc::OResultSet::impl_getTime(), connectivity::odbc::OResultSet::impl_getTimestamp(), connectivity::odbc::OResultSet::updateNull(), and connectivity::odbc::OResultSet::updateValue().
|
private |
Definition at line 58 of file OConnection.hxx.
Referenced by commit(), Construct(), disposing(), getAutoCommit(), getCatalog(), getMetaData(), getTransactionIsolation(), nativeSQL(), OpenConnection(), rollback(), setAutoCommit(), setCatalog(), setReadOnly(), setTransactionIsolation(), and ~OConnection().
|
private |
Definition at line 50 of file OConnection.hxx.
Referenced by createStatementHandle(), disposing(), and freeStatementHandle().
|
private |
Definition at line 61 of file OConnection.hxx.
Referenced by disposing(), OpenConnection(), and ~OConnection().
|
private |
Definition at line 64 of file OConnection.hxx.
Referenced by Construct().
|
private |
Definition at line 65 of file OConnection.hxx.
Referenced by Construct().
|
private |
Definition at line 66 of file OConnection.hxx.
Referenced by isReadOnly(), and OpenConnection().
|
private |
Definition at line 62 of file OConnection.hxx.
Referenced by Construct().
|
private |
Definition at line 63 of file OConnection.hxx.
Referenced by OpenConnection().
|
private |
Definition at line 60 of file OConnection.hxx.
Referenced by createStatementHandle(), and freeStatementHandle().
|
private |
Definition at line 59 of file OConnection.hxx.
Referenced by Construct(), and createStatementHandle().
|
private |
Definition at line 53 of file OConnection.hxx.
Referenced by Construct().
|
private |
Definition at line 55 of file OConnection.hxx.
Referenced by createStatementHandle(), and getOdbcFunction().