LibreOffice Module connectivity (master) 1
Static Public Member Functions | List of all members
connectivity::odbc::OTools Class Reference

#include <OTools.hxx>

Static Public Member Functions

static void ThrowException (const OConnection *_pConnection, SQLRETURN _rRetCode, SQLHANDLE _pContext, SQLSMALLINT _nHandleType, const css::uno::Reference< css::uno::XInterface > &_xInterface, bool _bNoFound=true)
 
static void GetInfo (OConnection const *_pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, OUString &_rValue, const css::uno::Reference< css::uno::XInterface > &_xInterface, rtl_TextEncoding _nTextEncoding)
 
static void GetInfo (OConnection const *_pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, sal_Int32 &_rValue, const css::uno::Reference< css::uno::XInterface > &_xInterface)
 
static void GetInfo (OConnection const *_pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, SQLUSMALLINT &_rValue, const css::uno::Reference< css::uno::XInterface > &_xInterface)
 
static void GetInfo (OConnection const *_pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, SQLUINTEGER &_rValue, const css::uno::Reference< css::uno::XInterface > &_xInterface)
 
static sal_Int32 MapOdbcType2Jdbc (SQLSMALLINT _nType)
 
static SQLSMALLINT jdbcTypeToOdbc (sal_Int32 jdbcType)
 
static DATE_STRUCT DateToOdbcDate (const css::util::Date &x)
 
static TIME_STRUCT TimeToOdbcTime (const css::util::Time &x)
 
static TIMESTAMP_STRUCT DateTimeToTimestamp (const css::util::DateTime &x)
 
static void getBindTypes (bool _bUseWChar, bool _bUseOldTimeDate, SQLSMALLINT _nOdbcType, SQLSMALLINT &fCType, SQLSMALLINT &fSqlType)
 getBindTypes set the ODBC type for C More...
 
static OUString getStringValue (OConnection const *_pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _fSqlType, bool &_bWasNull, const css::uno::Reference< css::uno::XInterface > &_xInterface, rtl_TextEncoding _nTextEncoding)
 
static css::uno::Sequence< sal_Int8getBytesValue (const OConnection *_pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _fSqlType, bool &_bWasNull, const css::uno::Reference< css::uno::XInterface > &_xInterface)
 
static void getValue (OConnection const *_pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, bool &_bWasNull, const css::uno::Reference< css::uno::XInterface > &_xInterface, void *_pValue, SQLLEN _nSize)
 
static void bindValue (OConnection const *_pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, SQLSMALLINT _nMaxLen, const void *_pValue, void *_pData, SQLLEN *pLen, const css::uno::Reference< css::uno::XInterface > &_xInterface, rtl_TextEncoding _nTextEncoding, bool _bUseOldTimeDate)
 

Detailed Description

Definition at line 96 of file OTools.hxx.

Member Function Documentation

◆ bindValue()

void OTools::bindValue ( OConnection const *  _pConnection,
SQLHANDLE  _aStatementHandle,
sal_Int32  columnIndex,
SQLSMALLINT  _nType,
SQLSMALLINT  _nMaxLen,
const void *  _pValue,
void *  _pData,
SQLLEN *  pLen,
const css::uno::Reference< css::uno::XInterface > &  _xInterface,
rtl_TextEncoding  _nTextEncoding,
bool  _bUseOldTimeDate 
)
static

◆ DateTimeToTimestamp()

static TIMESTAMP_STRUCT connectivity::odbc::OTools::DateTimeToTimestamp ( const css::util::DateTime &  x)
inlinestatic

Definition at line 159 of file OTools.hxx.

References x.

◆ DateToOdbcDate()

static DATE_STRUCT connectivity::odbc::OTools::DateToOdbcDate ( const css::util::Date &  x)
inlinestatic

Definition at line 143 of file OTools.hxx.

References x.

◆ getBindTypes()

void OTools::getBindTypes ( bool  _bUseWChar,
bool  _bUseOldTimeDate,
SQLSMALLINT  _nOdbcType,
SQLSMALLINT &  fCType,
SQLSMALLINT &  fSqlType 
)
static

getBindTypes set the ODBC type for C

Parameters
_bUseWChartrue when Unicode should be used
_bUseOldTimeDatetrue when the old datetime format should be used
_nOdbcTypethe ODBC sql type
fCTypethe C type for the ODBC type
fSqlTypethe SQL type for the ODBC type

Definition at line 686 of file OTools.cxx.

References SQL_C_WCHAR, SQL_WCHAR, SQL_WLONGVARCHAR, and SQL_WVARCHAR.

Referenced by bindValue(), connectivity::odbc::OPreparedStatement::setNull(), connectivity::odbc::OPreparedStatement::setParameter(), and connectivity::odbc::OPreparedStatement::setStream().

◆ getBytesValue()

Sequence< sal_Int8 > OTools::getBytesValue ( const OConnection _pConnection,
SQLHANDLE  _aStatementHandle,
sal_Int32  columnIndex,
SQLSMALLINT  _fSqlType,
bool &  _bWasNull,
const css::uno::Reference< css::uno::XInterface > &  _xInterface 
)
static

◆ GetInfo() [1/4]

static void connectivity::odbc::OTools::GetInfo ( OConnection const *  _pConnection,
SQLHANDLE  _aConnectionHandle,
SQLUSMALLINT  _nInfo,
OUString &  _rValue,
const css::uno::Reference< css::uno::XInterface > &  _xInterface,
rtl_TextEncoding  _nTextEncoding 
)
static
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Referenced by connectivity::odbc::ODatabaseMetaData::allProceduresAreCallable(), connectivity::odbc::ODatabaseMetaData::allTablesAreSelectable(), connectivity::odbc::ODatabaseMetaData::dataDefinitionCausesTransactionCommit(), connectivity::odbc::ODatabaseMetaData::dataDefinitionIgnoredInTransactions(), connectivity::odbc::ODatabaseMetaData::doesMaxRowSizeIncludeBlobs(), connectivity::odbc::ODatabaseMetaData::getCatalogTerm(), connectivity::odbc::OStatement_Base::getCursorProperties(), connectivity::odbc::ODatabaseMetaData::getDatabaseProductName(), connectivity::odbc::ODatabaseMetaData::getDatabaseProductVersion(), connectivity::odbc::ODatabaseMetaData::getDefaultTransactionIsolation(), connectivity::odbc::ODatabaseMetaData::getDriverMajorVersion(), connectivity::odbc::ODatabaseMetaData::getDriverMinorVersion(), connectivity::odbc::ODatabaseMetaData::getDriverName(), connectivity::odbc::ODatabaseMetaData::getDriverVersion(), connectivity::odbc::ODatabaseMetaData::getExtraNameCharacters(), connectivity::odbc::ODatabaseMetaData::getMaxBinaryLiteralLength(), connectivity::odbc::ODatabaseMetaData::getMaxCatalogNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxCharLiteralLength(), connectivity::odbc::ODatabaseMetaData::getMaxColumnNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxColumnsInGroupBy(), connectivity::odbc::ODatabaseMetaData::getMaxColumnsInIndex(), connectivity::odbc::ODatabaseMetaData::getMaxColumnsInOrderBy(), connectivity::odbc::ODatabaseMetaData::getMaxColumnsInSelect(), connectivity::odbc::ODatabaseMetaData::getMaxColumnsInTable(), connectivity::odbc::ODatabaseMetaData::getMaxConnections(), connectivity::odbc::ODatabaseMetaData::getMaxCursorNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxIndexLength(), connectivity::odbc::ODatabaseMetaData::getMaxProcedureNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxRowSize(), connectivity::odbc::ODatabaseMetaData::getMaxSchemaNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxStatementLength(), connectivity::odbc::ODatabaseMetaData::getMaxTableNameLength(), connectivity::odbc::ODatabaseMetaData::getMaxUserNameLength(), connectivity::odbc::ODatabaseMetaData::getNumericFunctions(), connectivity::odbc::ODatabaseMetaData::getProcedureTerm(), connectivity::odbc::ODatabaseMetaData::getSchemaTerm(), connectivity::odbc::ODatabaseMetaData::getSearchStringEscape(), connectivity::odbc::ODatabaseMetaData::getSQLKeywords(), connectivity::odbc::ODatabaseMetaData::getStringFunctions(), connectivity::odbc::ODatabaseMetaData::getSystemFunctions(), connectivity::odbc::ODatabaseMetaData::getTimeDateFunctions(), connectivity::odbc::ODatabaseMetaData::getURLImpl(), connectivity::odbc::ODatabaseMetaData::getUserName(), connectivity::odbc::ODatabaseMetaData::impl_getCatalogSeparator_throw(), connectivity::odbc::ODatabaseMetaData::impl_getIdentifierQuoteString_throw(), connectivity::odbc::ODatabaseMetaData::impl_getMaxStatements_throw(), connectivity::odbc::ODatabaseMetaData::impl_getMaxTablesInSelect_throw(), connectivity::odbc::ODatabaseMetaData::impl_isCatalogAtStart_throw(), connectivity::odbc::ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw(), connectivity::odbc::ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw(), connectivity::odbc::OResultSet::isBookmarkable(), connectivity::odbc::ODatabaseMetaData::nullPlusNonNullIsNull(), connectivity::odbc::ODatabaseMetaData::nullsAreSortedAtEnd(), connectivity::odbc::ODatabaseMetaData::nullsAreSortedAtStart(), connectivity::odbc::ODatabaseMetaData::nullsAreSortedHigh(), connectivity::odbc::ODatabaseMetaData::nullsAreSortedLow(), connectivity::odbc::OConnection::OpenConnection(), connectivity::odbc::OResultSet::OResultSet(), connectivity::odbc::ODatabaseMetaData::ownDeletesAreVisible(), connectivity::odbc::ODatabaseMetaData::ownInsertsAreVisible(), connectivity::odbc::ODatabaseMetaData::ownUpdatesAreVisible(), connectivity::odbc::ODatabaseMetaData::storesLowerCaseIdentifiers(), connectivity::odbc::ODatabaseMetaData::storesLowerCaseQuotedIdentifiers(), connectivity::odbc::ODatabaseMetaData::storesMixedCaseIdentifiers(), connectivity::odbc::ODatabaseMetaData::storesUpperCaseIdentifiers(), connectivity::odbc::ODatabaseMetaData::storesUpperCaseQuotedIdentifiers(), connectivity::odbc::ODatabaseMetaData::supportsANSI92EntryLevelSQL(), connectivity::odbc::ODatabaseMetaData::supportsANSI92FullSQL(), connectivity::odbc::ODatabaseMetaData::supportsANSI92IntermediateSQL(), connectivity::odbc::ODatabaseMetaData::supportsCatalogsInIndexDefinitions(), connectivity::odbc::ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions(), connectivity::odbc::ODatabaseMetaData::supportsCatalogsInProcedureCalls(), connectivity::odbc::ODatabaseMetaData::supportsColumnAliasing(), connectivity::odbc::ODatabaseMetaData::supportsConvert(), connectivity::odbc::ODatabaseMetaData::supportsCoreSQLGrammar(), connectivity::odbc::ODatabaseMetaData::supportsCorrelatedSubqueries(), connectivity::odbc::ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions(), connectivity::odbc::ODatabaseMetaData::supportsDataManipulationTransactionsOnly(), connectivity::odbc::ODatabaseMetaData::supportsDifferentTableCorrelationNames(), connectivity::odbc::ODatabaseMetaData::supportsExpressionsInOrderBy(), connectivity::odbc::ODatabaseMetaData::supportsExtendedSQLGrammar(), connectivity::odbc::ODatabaseMetaData::supportsFullOuterJoins(), connectivity::odbc::ODatabaseMetaData::supportsGroupBy(), connectivity::odbc::ODatabaseMetaData::supportsGroupByBeyondSelect(), connectivity::odbc::ODatabaseMetaData::supportsGroupByUnrelated(), connectivity::odbc::ODatabaseMetaData::supportsIntegrityEnhancementFacility(), connectivity::odbc::ODatabaseMetaData::supportsLikeEscapeClause(), connectivity::odbc::ODatabaseMetaData::supportsMinimumSQLGrammar(), connectivity::odbc::ODatabaseMetaData::supportsMixedCaseIdentifiers(), connectivity::odbc::ODatabaseMetaData::supportsMultipleResultSets(), connectivity::odbc::ODatabaseMetaData::supportsMultipleTransactions(), connectivity::odbc::ODatabaseMetaData::supportsNonNullableColumns(), connectivity::odbc::ODatabaseMetaData::supportsOpenCursorsAcrossCommit(), connectivity::odbc::ODatabaseMetaData::supportsOpenCursorsAcrossRollback(), connectivity::odbc::ODatabaseMetaData::supportsOpenStatementsAcrossCommit(), connectivity::odbc::ODatabaseMetaData::supportsOpenStatementsAcrossRollback(), connectivity::odbc::ODatabaseMetaData::supportsOrderByUnrelated(), connectivity::odbc::ODatabaseMetaData::supportsOuterJoins(), connectivity::odbc::ODatabaseMetaData::supportsPositionedDelete(), connectivity::odbc::ODatabaseMetaData::supportsPositionedUpdate(), connectivity::odbc::ODatabaseMetaData::supportsResultSetConcurrency(), connectivity::odbc::ODatabaseMetaData::supportsResultSetType(), connectivity::odbc::ODatabaseMetaData::supportsSchemasInIndexDefinitions(), connectivity::odbc::ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions(), connectivity::odbc::ODatabaseMetaData::supportsSchemasInProcedureCalls(), connectivity::odbc::ODatabaseMetaData::supportsSelectForUpdate(), connectivity::odbc::ODatabaseMetaData::supportsStoredProcedures(), connectivity::odbc::ODatabaseMetaData::supportsSubqueriesInComparisons(), connectivity::odbc::ODatabaseMetaData::supportsSubqueriesInExists(), connectivity::odbc::ODatabaseMetaData::supportsSubqueriesInIns(), connectivity::odbc::ODatabaseMetaData::supportsSubqueriesInQuantifieds(), connectivity::odbc::ODatabaseMetaData::supportsTableCorrelationNames(), connectivity::odbc::ODatabaseMetaData::supportsTransactionIsolationLevel(), connectivity::odbc::ODatabaseMetaData::supportsTransactions(), connectivity::odbc::ODatabaseMetaData::supportsTypeConversion(), connectivity::odbc::ODatabaseMetaData::supportsUnion(), connectivity::odbc::ODatabaseMetaData::supportsUnionAll(), connectivity::odbc::ODatabaseMetaData::usesLocalFilePerTable(), and connectivity::odbc::ODatabaseMetaData::usesLocalFiles().

◆ GetInfo() [2/4]

static void connectivity::odbc::OTools::GetInfo ( OConnection const *  _pConnection,
SQLHANDLE  _aConnectionHandle,
SQLUSMALLINT  _nInfo,
sal_Int32 &  _rValue,
const css::uno::Reference< css::uno::XInterface > &  _xInterface 
)
static
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

◆ GetInfo() [3/4]

static void connectivity::odbc::OTools::GetInfo ( OConnection const *  _pConnection,
SQLHANDLE  _aConnectionHandle,
SQLUSMALLINT  _nInfo,
SQLUINTEGER &  _rValue,
const css::uno::Reference< css::uno::XInterface > &  _xInterface 
)
static
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

◆ GetInfo() [4/4]

static void connectivity::odbc::OTools::GetInfo ( OConnection const *  _pConnection,
SQLHANDLE  _aConnectionHandle,
SQLUSMALLINT  _nInfo,
SQLUSMALLINT &  _rValue,
const css::uno::Reference< css::uno::XInterface > &  _xInterface 
)
static
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

◆ getStringValue()

OUString OTools::getStringValue ( OConnection const *  _pConnection,
SQLHANDLE  _aStatementHandle,
sal_Int32  columnIndex,
SQLSMALLINT  _fSqlType,
bool &  _bWasNull,
const css::uno::Reference< css::uno::XInterface > &  _xInterface,
rtl_TextEncoding  _nTextEncoding 
)
static

◆ getValue()

void OTools::getValue ( OConnection const *  _pConnection,
SQLHANDLE  _aStatementHandle,
sal_Int32  columnIndex,
SQLSMALLINT  _nType,
bool &  _bWasNull,
const css::uno::Reference< css::uno::XInterface > &  _xInterface,
void *  _pValue,
SQLLEN  _nSize 
)
static

◆ jdbcTypeToOdbc()

SQLSMALLINT OTools::jdbcTypeToOdbc ( sal_Int32  jdbcType)
static

◆ MapOdbcType2Jdbc()

sal_Int32 OTools::MapOdbcType2Jdbc ( SQLSMALLINT  _nType)
static

◆ ThrowException()

void OTools::ThrowException ( const OConnection _pConnection,
SQLRETURN  _rRetCode,
SQLHANDLE  _pContext,
SQLSMALLINT  _nHandleType,
const css::uno::Reference< css::uno::XInterface > &  _xInterface,
bool  _bNoFound = true 
)
static
Exceptions
css::sdbc::SQLException

Definition at line 302 of file OTools.cxx.

References Any, GetDiagRec, connectivity::odbc::OConnection::getOdbcFunction(), n, SAL_WARN, and SDB_ODBC_CHAR.

Referenced by connectivity::odbc::ODatabaseMetaDataResultSet::absolute(), bindValue(), connectivity::odbc::ODatabaseMetaDataResultSet::checkColumnCount(), connectivity::odbc::OConnection::commit(), connectivity::odbc::OConnection::Construct(), connectivity::odbc::OResultSet::deleteRow(), connectivity::odbc::OPreparedStatement::execute(), connectivity::odbc::ODatabaseMetaDataResultSet::first(), connectivity::odbc::OConnection::getAutoCommit(), getBytesValue(), connectivity::odbc::OConnection::getCatalog(), connectivity::odbc::OResultSetMetaData::getCharColAttrib(), connectivity::odbc::OResultSetMetaData::getColumnCount(), connectivity::odbc::OResultSetMetaData::getNumColAttrib(), getStringValue(), connectivity::odbc::OConnection::getTransactionIsolation(), getValue(), connectivity::odbc::OResultSet::insertRow(), connectivity::odbc::ODatabaseMetaDataResultSet::last(), connectivity::odbc::OResultSet::move(), connectivity::odbc::OConnection::nativeSQL(), connectivity::odbc::ODatabaseMetaDataResultSet::next(), connectivity::odbc::ODatabaseMetaDataResultSet::openCatalogs(), connectivity::odbc::ODatabaseMetaDataResultSet::openColumnPrivileges(), connectivity::odbc::ODatabaseMetaDataResultSet::openColumns(), connectivity::odbc::ODatabaseMetaDataResultSet::openForeignKeys(), connectivity::odbc::ODatabaseMetaDataResultSet::openIndexInfo(), connectivity::odbc::ODatabaseMetaDataResultSet::openPrimaryKeys(), connectivity::odbc::ODatabaseMetaDataResultSet::openProcedureColumns(), connectivity::odbc::ODatabaseMetaDataResultSet::openProcedures(), connectivity::odbc::ODatabaseMetaDataResultSet::openSchemas(), connectivity::odbc::ODatabaseMetaDataResultSet::openSpecialColumns(), connectivity::odbc::ODatabaseMetaDataResultSet::openTablePrivileges(), connectivity::odbc::ODatabaseMetaDataResultSet::openTables(), connectivity::odbc::ODatabaseMetaDataResultSet::openTablesTypes(), connectivity::odbc::ODatabaseMetaDataResultSet::openTypeInfo(), connectivity::odbc::OPreparedStatement::prepareStatement(), connectivity::odbc::ODatabaseMetaDataResultSet::previous(), connectivity::odbc::OResultSet::refreshRow(), connectivity::odbc::ODatabaseMetaDataResultSet::relative(), connectivity::odbc::OConnection::rollback(), connectivity::odbc::OConnection::setAutoCommit(), connectivity::odbc::OConnection::setCatalog(), connectivity::odbc::OPreparedStatement::setNull(), connectivity::odbc::OPreparedStatement::setParameter(), connectivity::odbc::OConnection::setReadOnly(), connectivity::odbc::OConnection::setTransactionIsolation(), and connectivity::odbc::OResultSet::updateRow().

◆ TimeToOdbcTime()

static TIME_STRUCT connectivity::odbc::OTools::TimeToOdbcTime ( const css::util::Time &  x)
inlinestatic

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