LibreOffice Module connectivity (master) 1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
dbtools Namespace Reference

Namespaces

namespace  DBTypeConversion
 
namespace  param
 

Classes

class  CharsetIteratorDerefHelper
 
class  DatabaseMetaData
 encapsulates meta data about a database/connection which cannot be obtained from the usual XDatabaseMetaData result set. More...
 
struct  DatabaseMetaData_Impl
 
class  FilterManager
 manages the filter of a database component with filter properties More...
 
class  FormattedColumnValue
 a class which helps retrieving and setting the value of a database column as formatted string. More...
 
struct  FormattedColumnValue_Data
 
class  ISQLStatementHelper
 
class  OAutoConnectionDisposer
 
class  OCharsetMap
 is a class which translates between different charset representations. More...
 
class  OParameterContinuation
 
class  OPredicateInputController
 A class which allows input of an SQL predicate for a row set column into an edit field. More...
 
class  OPropertyMap
 
class  ParameterManager
 
class  SQLExceptionInfo
 
class  SQLExceptionIteratorHelper
 
class  StatementComposer
 a class which is able to compose queries (SELECT statements) from a command and a command type More...
 
struct  StatementComposer_Data
 
class  WarningsContainer
 helper class for implementing XWarningsSupplier, which mixes own warnings with warnings obtained from an external instance More...
 

Typedefs

typedef ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener, css::sdbc::XRowSetListener > OAutoConnectionDisposer_Base
 
typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection
 
typedef ::std::pair< bool, bool > TBoolPair
 
typedef ::std::pair< TBoolPair, sal_Int32 > ColumnInformation
 
typedef ::std::multimap< OUString, ColumnInformation, ::comphelper::UStringMixLessColumnInformationMap
 
typedef ::utl::SharedUNOComponent< css::sdb::XSingleSelectQueryComposer, ::utl::DisposableComponentSharedQueryComposer
 

Enumerations

enum  OOoBaseErrorCode { ParameterInteractionCancelled = 1 }
 
enum class  EComposeRule {
  InTableDefinitions ,
  InIndexDefinitions ,
  InDataManipulation ,
  InProcedureCalls ,
  InPrivilegeDefinitions ,
  Complete
}
 
enum class  StandardSQLState {
  INVALID_DESCRIPTOR_INDEX ,
  INVALID_CURSOR_STATE ,
  COLUMN_NOT_FOUND ,
  GENERAL_ERROR ,
  INVALID_SQL_DATA_TYPE ,
  FUNCTION_SEQUENCE_ERROR ,
  INVALID_CURSOR_POSITION ,
  FEATURE_NOT_IMPLEMENTED ,
  FUNCTION_NOT_SUPPORTED ,
  CONNECTION_DOES_NOT_EXIST ,
  ERROR_UNSPECIFIED = SAL_MAX_ENUM
}
 standard SQLStates to be used with an SQLException More...
 

Functions

static bool isCharOk (sal_Unicode c, std::u16string_view _rSpecials)
 
bool isValidSQLName (const OUString &_rName, std::u16string_view _rSpecials)
 checks whether the given name is a valid SQL name More...
 
OUString convertName2SQLName (const OUString &_rName, std::u16string_view _rSpecials)
 create a name which is a valid SQL 92 identifier name More...
 
OUString quoteName (std::u16string_view _rQuote, const OUString &_rName)
 quote the given name with the given quote string. More...
 
bool operator== (const OCharsetMap::CharsetIterator &lhs, const OCharsetMap::CharsetIterator &rhs)
 
static sal_Int32 implRelativeToAbsoluteNull (const css::util::Date &_rDate)
 
static void addDays (const sal_Int32 nDays, css::util::Date &_rDate)
 
static void subDays (const sal_Int32 nDays, css::util::Date &_rDate)
 
void throwFunctionSequenceException (const Reference< XInterface > &Context, const Any &Next)
 
void throwInvalidIndexException (const css::uno::Reference< css::uno::XInterface > &Context, const css::uno::Any &Next=css::uno::Any())
 throw an invalid index sqlexception More...
 
void throwFunctionNotSupportedSQLException (const OUString &_rFunctionName, const css::uno::Reference< css::uno::XInterface > &_rxContext)
 throws an exception with SQL state IM001, saying that a certain function is not supported More...
 
void throwFunctionNotSupportedRuntimeException (const OUString &_rFunctionName, const css::uno::Reference< css::uno::XInterface > &_rxContext)
 
void throwGenericSQLException (const OUString &_rMsg, const css::uno::Reference< css::uno::XInterface > &_rxSource)
 throw a generic SQLException, i.e. More...
 
void throwGenericSQLException (const OUString &_rMsg, const Reference< XInterface > &_rxSource, const Any &_rNextException)
 
void throwFeatureNotImplementedSQLException (const OUString &_rFeatureName, const Reference< XInterface > &_rxContext, const Any &_rNextException)
 
void throwFeatureNotImplementedRuntimeException (const OUString &_rFeatureName, const Reference< XInterface > &_rxContext)
 
void throwInvalidColumnException (const OUString &_rColumnName, const Reference< XInterface > &_rxContext)
 
void throwSQLException (const OUString &_rMessage, const OUString &_rSQLState, const Reference< XInterface > &_rxContext, const sal_Int32 _nErrorCode)
 
void throwSQLException (const OUString &_rMessage, StandardSQLState _eSQLState, const Reference< XInterface > &_rxContext, const sal_Int32 _nErrorCode)
 
OUString getStandardSQLState (StandardSQLState _eState)
 returns a standard error string for a given SQLState More...
 
sal_Int32 getDefaultNumberFormat (const Reference< XPropertySet > &_xColumn, const Reference< XNumberFormatTypes > &_xTypes, const Locale &_rLocale)
 
sal_Int32 getDefaultNumberFormat (sal_Int32 _nDataType, sal_Int32 _nScale, bool _bIsCurrency, const Reference< XNumberFormatTypes > &_xTypes, const Locale &_rLocale)
 
static Reference< XConnection > findConnection (const Reference< XInterface > &xParent)
 
static Reference< XDataSource > getDataSource_allowException (const OUString &_rsTitleOrPath, const Reference< XComponentContext > &_rxContext)
 
Reference< XDataSource > getDataSource (const OUString &_rsTitleOrPath, const Reference< XComponentContext > &_rxContext)
 
static Reference< XConnection > getConnection_allowException (const OUString &_rsTitleOrPath, const OUString &_rsUser, const OUString &_rsPwd, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > getConnection_withFeedback (const OUString &_rDataSourceName, const OUString &_rUser, const OUString &_rPwd, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > getConnection (const Reference< XRowSet > &_rxRowSet)
 
static SharedConnection lcl_connectRowSet (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, bool _bAttachAutoDisposer, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > connectRowset (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
SharedConnection ensureRowSetConnection (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XNameAccess > getTableFields (const Reference< XConnection > &_rxConn, const OUString &_rName)
 
Reference< XNameAccess > getPrimaryKeyColumns_throw (const Any &i_aTable)
 
Reference< XNameAccess > getPrimaryKeyColumns_throw (const Reference< XPropertySet > &i_xTable)
 
Reference< XNameAccess > getFieldsByCommandDescriptor (const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, Reference< XComponent > &_rxKeepFieldsAlive, SQLExceptionInfo *_pErrorInfo)
 
Sequence< OUString > getFieldNamesByCommandDescriptor (const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, SQLExceptionInfo *_pErrorInfo)
 
SQLException prependErrorInfo (const SQLException &_rChainedException, const Reference< XInterface > &_rxContext, const OUString &_rAdditionalError, const StandardSQLState _eSQLState)
 
static OUString impl_doComposeTableName (const Reference< XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
 
OUString quoteTableName (const Reference< XDatabaseMetaData > &_rxMeta, const OUString &_rName, EComposeRule _eComposeRule)
 
void qualifiedNameComponents (const Reference< XDatabaseMetaData > &_rxConnMetaData, const OUString &_rQualifiedName, OUString &_rCatalog, OUString &_rSchema, OUString &_rName, EComposeRule _eComposeRule)
 
Reference< XNumberFormatsSupplier > getNumberFormats (const Reference< XConnection > &_rxConn, bool _bAlloweDefault, const Reference< XComponentContext > &_rxContext)
 
void TransferFormComponentProperties (const Reference< XPropertySet > &xOldProps, const Reference< XPropertySet > &xNewProps, const Locale &_rLocale)
 
bool canInsert (const Reference< XPropertySet > &_rxCursorSet)
 
bool canUpdate (const Reference< XPropertySet > &_rxCursorSet)
 
bool canDelete (const Reference< XPropertySet > &_rxCursorSet)
 
Reference< XDataSource > findDataSource (const Reference< XInterface > &_xParent)
 
static Reference< XSingleSelectQueryComposer > getComposedRowSetStatement (const Reference< XPropertySet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer (const Reference< XPropertySet > &_rxRowSetProps, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
OUString composeTableName (const Reference< XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
 
OUString composeTableNameForSelect (const Reference< XConnection > &_rxConnection, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName)
 
OUString composeTableNameForSelect (const Reference< XConnection > &_rxConnection, const Reference< XPropertySet > &_xTable)
 
OUString composeTableName (const Reference< XDatabaseMetaData > &_xMetaData, const Reference< XPropertySet > &_xTable, EComposeRule _eComposeRule, bool _bQuote)
 
sal_Int32 getSearchColumnFlag (const Reference< XConnection > &_rxConn, sal_Int32 _nDataType)
 
OUString createUniqueName (const Sequence< OUString > &_rNames, const OUString &_rBaseName, bool _bStartWithNumber)
 
OUString createUniqueName (const Reference< XNameAccess > &_rxContainer, const OUString &_rBaseName, bool _bStartWithNumber)
 
void showError (const SQLExceptionInfo &_rInfo, const Reference< XWindow > &_xParent, const Reference< XComponentContext > &_rxContext)
 
bool implUpdateObject (const Reference< XRowUpdate > &_rxUpdatedObject, const sal_Int32 _nColumnIndex, const Any &_rValue)
 
bool implSetObject (const Reference< XParameters > &_rxParameters, const sal_Int32 _nColumnIndex, const Any &_rValue)
 
void askForParameters (const Reference< XSingleSelectQueryComposer > &_xComposer, const Reference< XParameters > &_xParameters, const Reference< XConnection > &_xConnection, const Reference< XInteractionHandler > &_rxHandler, const std::vector< bool, std::allocator< bool > > &_aParametersSet)
 
void setObjectWithInfo (const Reference< XParameters > &_xParams, sal_Int32 parameterIndex, const Any &x, sal_Int32 sqlType, sal_Int32 scale)
 
void setObjectWithInfo (const Reference< XParameters > &_xParams, sal_Int32 parameterIndex, const ::connectivity::ORowSetValue &_rValue, sal_Int32 sqlType, sal_Int32 scale)
 
void getBooleanComparisonPredicate (std::u16string_view _rExpression, const bool _bValue, const sal_Int32 _nBooleanComparisonMode, OUStringBuffer &_out_rSQLPredicate)
 adds a boolean comparison clause to the given SQL predicate More...
 
OUString createStandardTypePart (const Reference< XPropertySet > &xColProp, const Reference< XConnection > &_xConnection, std::u16string_view _sCreatePattern)
 
OUString createStandardColumnPart (const Reference< XPropertySet > &xColProp, const Reference< XConnection > &_xConnection, ISQLStatementHelper *_pHelper, std::u16string_view _sCreatePattern)
 
OUString createStandardCreateStatement (const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection, ISQLStatementHelper *_pHelper, std::u16string_view _sCreatePattern)
 
OUString createStandardKeyStatement (const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection)
 
OUString createSqlCreateTableStatement (const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection)
 
Reference< XPropertySetcreateSDBCXColumn (const Reference< XPropertySet > &_xTable, const Reference< XConnection > &_xConnection, const OUString &_rName, bool _bCase, bool _bQueryForInfo, bool _bIsAutoIncrement, bool _bIsCurrency, sal_Int32 _nDataType)
 
bool getBooleanDataSourceSetting (const Reference< XConnection > &_rxConnection, const char *_pAsciiSettingName)
 
bool getBooleanDataSourceSetting (const Reference< XConnection > &_rxConnection, const OUString &rSettingName)
 
bool getDataSourceSetting (const Reference< XInterface > &_xChild, const OUString &_sAsciiSettingsName, Any &_rSettingsValue)
 
bool getDataSourceSetting (const Reference< XInterface > &_rxDataSource, const char *_pAsciiSettingsName, Any &_rSettingsValue)
 
bool isDataSourcePropertyEnabled (const Reference< XInterface > &_xProp, const OUString &_sProperty, bool _bDefault)
 
Reference< XTablesSupplier > getDataDefinitionByURLAndConnection (const OUString &_rsUrl, const Reference< XConnection > &_xConnection, const Reference< XComponentContext > &_rxContext)
 
sal_Int32 getTablePrivileges (const Reference< XDatabaseMetaData > &_xMetaData, const OUString &_sCatalog, const OUString &_sSchema, const OUString &_sTable)
 
void collectColumnInformation (const Reference< XConnection > &_xConnection, std::u16string_view _sComposedName, std::u16string_view _rName, ColumnInformationMap &_rInfo)
 
bool isEmbeddedInDatabase (const Reference< XInterface > &_rxComponent, Reference< XConnection > &_rxActualConnection)
 
OUString getDefaultReportEngineServiceName (const Reference< XComponentContext > &_rxORB)
 
bool isAggregateColumn (const Reference< XSingleSelectQueryComposer > &_xParser, const Reference< XPropertySet > &_xField)
 
bool isAggregateColumn (const Reference< XNameAccess > &_xColumns, const OUString &_sName)
 
bool isAggregateColumn (const Reference< XPropertySet > &_xColumn)
 
static sal_Unicode lcl_getSeparatorChar (std::u16string_view _rSeparator, sal_Unicode _nFallback)
 
static void lcl_concatWarnings (Any &_rChainLeft, const Any &_rChainRight)
 
OOO_DLLPUBLIC_DBTOOLS void throwFunctionSequenceException (const css::uno::Reference< css::uno::XInterface > &Context, const css::uno::Any &Next=css::uno::Any())
 throws a function sequence (HY010) exception More...
 
OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException (const OUString &_rMsg, const css::uno::Reference< css::uno::XInterface > &_rxSource, const css::uno::Any &_rNextException)
 throw a generic SQLException, i.e. More...
 
OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedSQLException (const OUString &_rFeatureName, const css::uno::Reference< css::uno::XInterface > &_rxContext, const css::uno::Any &_rNextException=css::uno::Any())
 throw a SQLException with SQLState HYC00 (Optional feature not implemented) More...
 
OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedRuntimeException (const OUString &_rFeatureName, const css::uno::Reference< css::uno::XInterface > &_rxContext)
 throw a RuntimeException (Optional feature not implemented) More...
 
OOO_DLLPUBLIC_DBTOOLS void throwInvalidColumnException (const OUString &_rColumnName, const css::uno::Reference< css::uno::XInterface > &_rxContext)
 throw a SQLException with SQLState 42S22 (Column Not Found) More...
 
OOO_DLLPUBLIC_DBTOOLS void throwSQLException (const OUString &_rMessage, const OUString &_rSQLState, const css::uno::Reference< css::uno::XInterface > &_rxContext, const sal_Int32 _nErrorCode)
 
OOO_DLLPUBLIC_DBTOOLS void throwSQLException (const OUString &_rMessage, StandardSQLState _eSQLState, const css::uno::Reference< css::uno::XInterface > &_rxContext, const sal_Int32 _nErrorCode=0)
 
OOO_DLLPUBLIC_DBTOOLS sal_Int32 getDefaultNumberFormat (const css::uno::Reference< css::beans::XPropertySet > &_xColumn, const css::uno::Reference< css::util::XNumberFormatTypes > &_xTypes, const css::lang::Locale &_rLocale)
 
OOO_DLLPUBLIC_DBTOOLS sal_Int32 getDefaultNumberFormat (sal_Int32 _nDataType, sal_Int32 _nScale, bool _bIsCurrency, const css::uno::Reference< css::util::XNumberFormatTypes > &_xTypes, const css::lang::Locale &_rLocale)
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > connectRowset (const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::awt::XWindow > &_rxParent)
 creates a connection which can be used for the rowset given More...
 
OOO_DLLPUBLIC_DBTOOLS SharedConnection ensureRowSetConnection (const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::awt::XWindow > &_rxParent)
 ensures that a row set has a valid ActiveConnection, if possible More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > getConnection (const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet)
 returns the connection the RowSet is currently working with (which is the ActiveConnection property) More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > getConnection_withFeedback (const OUString &_rDataSourceName, const OUString &_rUser, const OUString &_rPwd, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::awt::XWindow > &_rxParent)
 
OOO_DLLPUBLIC_DBTOOLS bool isEmbeddedInDatabase (const css::uno::Reference< css::uno::XInterface > &_rxComponent, css::uno::Reference< css::sdbc::XConnection > &_rxActualConnection)
 determines whether the given component is part of a document which is an embedded database document (such as a form) More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > getTableFields (const css::uno::Reference< css::sdbc::XConnection > &_rxConn, const OUString &_rName)
 returns the columns of the named table of the given connection More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > getPrimaryKeyColumns_throw (const css::uno::Any &i_aTable)
 returns the primary key columns of the table More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > getPrimaryKeyColumns_throw (const css::uno::Reference< css::beans::XPropertySet > &i_xTable)
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > getFieldsByCommandDescriptor (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, css::uno::Reference< css::lang::XComponent > &_rxKeepFieldsAlive, SQLExceptionInfo *_pErrorInfo=nullptr)
 get fields for a result set given by a "command descriptor" More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Sequence< OUString > getFieldNamesByCommandDescriptor (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, SQLExceptionInfo *_pErrorInfo=nullptr)
 get fields for a result set given by a "command descriptor" More...
 
OOO_DLLPUBLIC_DBTOOLS css::sdbc::SQLException prependErrorInfo (const css::sdbc::SQLException &_rChainedException, const css::uno::Reference< css::uno::XInterface > &_rxContext, const OUString &_rAdditionalError, const StandardSQLState _eSQLState=StandardSQLState::ERROR_UNSPECIFIED)
 create a new css::sdbc::SQLContext, fill it with the given descriptions and the given source, and append _rException (i.e. More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource > findDataSource (const css::uno::Reference< css::uno::XInterface > &_xParent)
 search the parent hierarchy for a data source. More...
 
OOO_DLLPUBLIC_DBTOOLS bool getBooleanDataSourceSetting (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const char *_pAsciiSettingName)
 determines the value of a boolean data source setting, given by ASCII name More...
 
OOO_DLLPUBLIC_DBTOOLS bool getBooleanDataSourceSetting (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const OUString &rSettingName)
 
OOO_DLLPUBLIC_DBTOOLS bool isDataSourcePropertyEnabled (const css::uno::Reference< css::uno::XInterface > &_xProp, const OUString &_sProperty, bool _bDefault)
 check if a specific property is enabled in the info sequence More...
 
OOO_DLLPUBLIC_DBTOOLS bool getDataSourceSetting (const css::uno::Reference< css::uno::XInterface > &_rxDataSource, const char *_pAsciiSettingsName, css::uno::Any &_rSettingsValue)
 retrieves a particular indirect data source setting More...
 
OOO_DLLPUBLIC_DBTOOLS bool getDataSourceSetting (const css::uno::Reference< css::uno::XInterface > &_rxDataSource, const OUString &_sSettingsName, css::uno::Any &_rSettingsValue)
 
OOO_DLLPUBLIC_DBTOOLS OUString getDefaultReportEngineServiceName (const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
 
OOO_DLLPUBLIC_DBTOOLS OUString quoteTableName (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxMeta, const OUString &_rName, EComposeRule _eComposeRule)
 quote the given table name (which may contain a catalog and a schema) according to the rules provided by the meta data More...
 
OOO_DLLPUBLIC_DBTOOLS void qualifiedNameComponents (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxConnMetaData, const OUString &_rQualifiedName, OUString &_rCatalog, OUString &_rSchema, OUString &_rName, EComposeRule _eComposeRule)
 split a fully qualified table name (including catalog and schema, if applicable) into its component parts. More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::util::XNumberFormatsSupplier > getNumberFormats (const css::uno::Reference< css::sdbc::XConnection > &_rxConn, bool _bAllowDefault=false, const css::uno::Reference< css::uno::XComponentContext > &_rxContext=css::uno::Reference< css::uno::XComponentContext >())
 calculate a NumberFormatsSupplier for use with a given connection More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdb::XSingleSelectQueryComposer > getCurrentSettingsComposer (const css::uno::Reference< css::beans::XPropertySet > &_rxRowSetProps, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::awt::XWindow > &_rxParent)
 create a css::sdb::XSingleSelectQueryComposer which represents the current settings (Command/CommandType/Filter/Order) of the given rowset. More...
 
OOO_DLLPUBLIC_DBTOOLS void TransferFormComponentProperties (const css::uno::Reference< css::beans::XPropertySet > &_rxOld, const css::uno::Reference< css::beans::XPropertySet > &_rxNew, const css::lang::Locale &_rLocale)
 transfer and translate properties between two FormComponents More...
 
OOO_DLLPUBLIC_DBTOOLS bool canInsert (const css::uno::Reference< css::beans::XPropertySet > &_rxCursorSet)
 check if the property "Privileges" supports css::sdbcx::Privilege::INSERT More...
 
OOO_DLLPUBLIC_DBTOOLS bool canUpdate (const css::uno::Reference< css::beans::XPropertySet > &_rxCursorSet)
 check if the property "Privileges" supports css::sdbcx::Privilege::UPDATE More...
 
OOO_DLLPUBLIC_DBTOOLS bool canDelete (const css::uno::Reference< css::beans::XPropertySet > &_rxCursorSet)
 check if the property "Privileges" supports css::sdbcx::Privilege::DELETE More...
 
OOO_DLLPUBLIC_DBTOOLS OUString composeTableName (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
 compose a complete table name from its up to three parts, regarding to the database meta data composing rules More...
 
OOO_DLLPUBLIC_DBTOOLS OUString composeTableNameForSelect (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName)
 composes a table name for usage in a SELECT statement More...
 
OOO_DLLPUBLIC_DBTOOLS OUString composeTableNameForSelect (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::beans::XPropertySet > &_xTable)
 composes a table name for usage in a SELECT statement More...
 
OOO_DLLPUBLIC_DBTOOLS OUString composeTableName (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_xMetaData, const css::uno::Reference< css::beans::XPropertySet > &_xTable, EComposeRule _eComposeRule, bool _bQuote)
 compose the table name out of the property set which must support the properties from the service <member scope= "css::sdbcx">table</member> More...
 
OOO_DLLPUBLIC_DBTOOLS sal_Int32 getSearchColumnFlag (const css::uno::Reference< css::sdbc::XConnection > &_rxConn, sal_Int32 _nDataType)
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource > getDataSource (const OUString &_rsDataSourceName, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName (const css::uno::Reference< css::container::XNameAccess > &_rxContainer, const OUString &_rBaseName, bool _bStartWithNumber=true)
 search for a name that is NOT in the NameAcces More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName (const css::uno::Sequence< OUString > &_rNames, const OUString &_rBaseName, bool _bStartWithNumber)
 creates a unique name which is not already used in the given name array More...
 
OOO_DLLPUBLIC_DBTOOLS void showError (const SQLExceptionInfo &_rInfo, const css::uno::Reference< css::awt::XWindow > &_pParent, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
OOO_DLLPUBLIC_DBTOOLS bool implUpdateObject (const css::uno::Reference< css::sdbc::XRowUpdate > &_rxUpdatedObject, const sal_Int32 _nColumnIndex, const css::uno::Any &_rValue)
 implements <method scope="com.sun.star.sdb">XRowUpdate::updateObject</method> More...
 
OOO_DLLPUBLIC_DBTOOLS void askForParameters (const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xComposer, const css::uno::Reference< css::sdbc::XParameters > &_xParameters, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::task::XInteractionHandler > &_rxHandler, const ::std::vector< bool, std::allocator< bool > > &_aParametersSet=::std::vector< bool, std::allocator< bool > >())
 ask the user for parameters if the prepared statement needs some and sets them in the prepared statement More...
 
OOO_DLLPUBLIC_DBTOOLS void setObjectWithInfo (const css::uno::Reference< css::sdbc::XParameters > &_xParameters, sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 sqlType, sal_Int32 scale=0)
 call the appropriate set method for the specific sql type More...
 
OOO_DLLPUBLIC_DBTOOLS void setObjectWithInfo (const css::uno::Reference< css::sdbc::XParameters > &_xParameters, sal_Int32 parameterIndex, const ::connectivity::ORowSetValue &x, sal_Int32 sqlType, sal_Int32 scale)
 call the appropriate set method for the specific sql type More...
 
OOO_DLLPUBLIC_DBTOOLS bool implSetObject (const css::uno::Reference< css::sdbc::XParameters > &_rxParameters, const sal_Int32 _nColumnIndex, const css::uno::Any &_rValue)
 implements <method scope="com.sun.star.sdb">XParameters::setObject</method> More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createStandardCreateStatement (const css::uno::Reference< css::beans::XPropertySet > &descriptor, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, ISQLStatementHelper *_pHelper, std::u16string_view _sCreatePattern)
 creates the standard sql create table statement without the key part. More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createStandardKeyStatement (const css::uno::Reference< css::beans::XPropertySet > &descriptor, const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
 creates the standard sql statement for the key part of a create table statement. More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createStandardTypePart (const css::uno::Reference< css::beans::XPropertySet > &descriptor, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, std::u16string_view _sCreatePattern={})
 creates the standard sql statement for the type part of a create or alter table statement. More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createStandardColumnPart (const css::uno::Reference< css::beans::XPropertySet > &descriptor, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, ISQLStatementHelper *_pHelper=nullptr, std::u16string_view _sCreatePattern={})
 creates the standard sql statement for the column part of a create table statement. More...
 
OOO_DLLPUBLIC_DBTOOLS OUString createSqlCreateTableStatement (const css::uno::Reference< css::beans::XPropertySet > &descriptor, const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
 creates a SQL CREATE TABLE statement More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::beans::XPropertySetcreateSDBCXColumn (const css::uno::Reference< css::beans::XPropertySet > &_xTable, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const OUString &_rName, bool _bCase, bool _bQueryForInfo, bool _bIsAutoIncrement, bool _bIsCurrency, sal_Int32 _nDataType)
 creates a SDBC column with the help of getColumns. More...
 
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbcx::XTablesSupplier > getDataDefinitionByURLAndConnection (const OUString &_rsUrl, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 tries to locate the corresponding DataDefinitionSupplier for the given url and connection More...
 
OOO_DLLPUBLIC_DBTOOLS sal_Int32 getTablePrivileges (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_xMetaData, const OUString &_sCatalog, const OUString &_sSchema, const OUString &_sTable)
 returns the table privileges to the given parameters More...
 
OOO_DLLPUBLIC_DBTOOLS void collectColumnInformation (const css::uno::Reference< css::sdbc::XConnection > &_xConnection, std::u16string_view _sComposedTableName, std::u16string_view _rName, ColumnInformationMap &_rInfo)
 collects the information about auto increment, currency and data type for the given column name. More...
 
OOO_DLLPUBLIC_DBTOOLS bool isAggregateColumn (const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xComposer, const css::uno::Reference< css::beans::XPropertySet > &_xField)
 is this field an aggregate? More...
 
OOO_DLLPUBLIC_DBTOOLS bool isAggregateColumn (const css::uno::Reference< css::container::XNameAccess > &_xColumns, const OUString &_sName)
 is this column an aggregate? More...
 
OOO_DLLPUBLIC_DBTOOLS bool isAggregateColumn (const css::uno::Reference< css::beans::XPropertySet > &_xColumn)
 is this column an aggregate? More...
 

Variables

constexpr OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection"
 

Typedef Documentation

◆ ColumnInformation

typedef ::std::pair< TBoolPair,sal_Int32 > dbtools::ColumnInformation

Definition at line 744 of file dbtools.hxx.

◆ ColumnInformationMap

Definition at line 745 of file dbtools.hxx.

◆ OAutoConnectionDisposer_Base

typedef ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener, css::sdbc::XRowSetListener > dbtools::OAutoConnectionDisposer_Base

Definition at line 41 of file conncleanup.hxx.

◆ SharedConnection

typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > dbtools::SharedConnection

Definition at line 80 of file dbtools.hxx.

◆ SharedQueryComposer

typedef ::utl::SharedUNOComponent< css::sdb::XSingleSelectQueryComposer, ::utl::DisposableComponent > dbtools::SharedQueryComposer

Definition at line 53 of file parameters.hxx.

◆ TBoolPair

typedef ::std::pair<bool,bool> dbtools::TBoolPair

Definition at line 743 of file dbtools.hxx.

Enumeration Type Documentation

◆ EComposeRule

enum class dbtools::EComposeRule
strong
Enumerator
InTableDefinitions 
InIndexDefinitions 
InDataManipulation 
InProcedureCalls 
InPrivilegeDefinitions 
Complete 

Definition at line 82 of file dbtools.hxx.

◆ OOoBaseErrorCode

Enumerator
ParameterInteractionCancelled 

Definition at line 47 of file dbexception.hxx.

◆ StandardSQLState

enum class dbtools::StandardSQLState
strong

standard SQLStates to be used with an SQLException

Extend this list whenever you need a new state ...

See also
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_error_codes.asp
Enumerator
INVALID_DESCRIPTOR_INDEX 
INVALID_CURSOR_STATE 
COLUMN_NOT_FOUND 
GENERAL_ERROR 
INVALID_SQL_DATA_TYPE 
FUNCTION_SEQUENCE_ERROR 
INVALID_CURSOR_POSITION 
FEATURE_NOT_IMPLEMENTED 
FUNCTION_NOT_SUPPORTED 
CONNECTION_DOES_NOT_EXIST 
ERROR_UNSPECIFIED 

Definition at line 35 of file standardsqlstate.hxx.

Function Documentation

◆ addDays()

static void dbtools::addDays ( const sal_Int32  nDays,
css::util::Date &  _rDate 
)
static

◆ askForParameters() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::askForParameters ( const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &  _xComposer,
const css::uno::Reference< css::sdbc::XParameters > &  _xParameters,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const css::uno::Reference< css::task::XInteractionHandler > &  _rxHandler,
const ::std::vector< bool, std::allocator< bool > > &  _aParametersSet = ::std::vector< bool, std::allocator< bool > >() 
)

ask the user for parameters if the prepared statement needs some and sets them in the prepared statement

Parameters
_xConnectionthe connection must be able to create css::sdb::SingleSelectQueryComposers
_xPreparedStmtthe prepared statement where the parameters could be set when needed
_aParametersSetcontains which parameters have to asked for and which already have set.

◆ askForParameters() [2/2]

void dbtools::askForParameters ( const Reference< XSingleSelectQueryComposer > &  _xComposer,
const Reference< XParameters > &  _xParameters,
const Reference< XConnection > &  _xConnection,
const Reference< XInteractionHandler > &  _rxHandler,
const std::vector< bool, std::allocator< bool > > &  _aParametersSet 
)

◆ canDelete() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::canDelete ( const css::uno::Reference< css::beans::XPropertySet > &  _rxCursorSet)

check if the property "Privileges" supports css::sdbcx::Privilege::DELETE

Parameters
_rxCursorSetthe property set

◆ canDelete() [2/2]

bool dbtools::canDelete ( const Reference< XPropertySet > &  _rxCursorSet)

Definition at line 1192 of file dbtools.cxx.

References getINT32().

◆ canInsert() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::canInsert ( const css::uno::Reference< css::beans::XPropertySet > &  _rxCursorSet)

check if the property "Privileges" supports css::sdbcx::Privilege::INSERT

Parameters
_rxCursorSetthe property set

◆ canInsert() [2/2]

bool dbtools::canInsert ( const Reference< XPropertySet > &  _rxCursorSet)

Definition at line 1182 of file dbtools.cxx.

References getINT32().

◆ canUpdate() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::canUpdate ( const css::uno::Reference< css::beans::XPropertySet > &  _rxCursorSet)

check if the property "Privileges" supports css::sdbcx::Privilege::UPDATE

Parameters
_rxCursorSetthe property set

◆ canUpdate() [2/2]

bool dbtools::canUpdate ( const Reference< XPropertySet > &  _rxCursorSet)

Definition at line 1187 of file dbtools.cxx.

References getINT32().

◆ collectColumnInformation() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::collectColumnInformation ( const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
std::u16string_view  _sComposedTableName,
std::u16string_view  _rName,
ColumnInformationMap _rInfo 
)

collects the information about auto increment, currency and data type for the given column name.

The column must be quoted, * is also valid.

Parameters
_xConnectionThe connection.
_sComposedTableNameThe quoted table name. ccc.sss.ttt
_sNameThe name of the column, or *
_rInfoThe information about the column(s).

◆ collectColumnInformation() [2/2]

void dbtools::collectColumnInformation ( const Reference< XConnection > &  _xConnection,
std::u16string_view  _sComposedName,
std::u16string_view  _rName,
ColumnInformationMap _rInfo 
)

◆ composeTableName() [1/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::composeTableName ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _rxMetaData,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName,
bool  _bQuote,
EComposeRule  _eComposeRule 
)

compose a complete table name from its up to three parts, regarding to the database meta data composing rules

◆ composeTableName() [2/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::composeTableName ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _xMetaData,
const css::uno::Reference< css::beans::XPropertySet > &  _xTable,
EComposeRule  _eComposeRule,
bool  _bQuote 
)

compose the table name out of the property set which must support the properties from the service <member scope= "css::sdbcx">table</member>

Parameters
_xMetaDataThe metadata from the connection.
_xTableThe table.

◆ composeTableName() [3/4]

OUString dbtools::composeTableName ( const Reference< XDatabaseMetaData > &  _rxMetaData,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName,
bool  _bQuote,
EComposeRule  _eComposeRule 
)

◆ composeTableName() [4/4]

OUString dbtools::composeTableName ( const Reference< XDatabaseMetaData > &  _xMetaData,
const Reference< XPropertySet > &  _xTable,
EComposeRule  _eComposeRule,
bool  _bQuote 
)

Definition at line 1345 of file dbtools.cxx.

References impl_doComposeTableName(), sCatalog, sName, and sSchema.

◆ composeTableNameForSelect() [1/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::composeTableNameForSelect ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const css::uno::Reference< css::beans::XPropertySet > &  _xTable 
)

composes a table name for usage in a SELECT statement

This includes quoting of the table as indicated by the connection's meta data, plus respecting the settings "UseCatalogInSelect" and "UseSchemaInSelect", which might be present in the data source which the connection belongs to.

◆ composeTableNameForSelect() [2/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::composeTableNameForSelect ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName 
)

composes a table name for usage in a SELECT statement

This includes quoting of the table as indicated by the connection's meta data, plus respecting the settings "UseCatalogInSelect" and "UseSchemaInSelect", which might be present in the data source which the connection belongs to.

◆ composeTableNameForSelect() [3/4]

OUString dbtools::composeTableNameForSelect ( const Reference< XConnection > &  _rxConnection,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName 
)

◆ composeTableNameForSelect() [4/4]

OUString dbtools::composeTableNameForSelect ( const Reference< XConnection > &  _rxConnection,
const Reference< XPropertySet > &  _xTable 
)

Definition at line 1337 of file dbtools.cxx.

References composeTableNameForSelect(), sCatalog, sName, and sSchema.

◆ connectRowset() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > dbtools::connectRowset ( const css::uno::Reference< css::sdbc::XRowSet > &  _rxRowSet,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const css::uno::Reference< css::awt::XWindow > &  _rxParent 
)

creates a connection which can be used for the rowset given

The function tries to obtain a connection for the row set with the following steps (in this order): <nl> If the rowset already has an ActiveConnection (means a non-<NULL> value for this property), this one is used. If row set is part of a database form document (see ->isEmbeddedInDatabase), a connection for the respective database is used. If in the parent hierarchy of the row set, there is an object supporting the XConnection interface, this one is returned. If the DataSourceName property of the row set is not empty, a connection for this data source is retrieved. If the URL property of the row set is not empty, a connection for this URL is retrieved from the driver manager. </nl>

The calculated connection is set as ActiveConnection property on the rowset.

If the connection was newly created by the method, then the ownership of the connection is delivered to a temporary object, which observes the row set: As soon as a connection-relevant property of the row set changes, or as soon as somebody else sets another ActiveConnection at the row set, the original connection (the one which this function calculated) is disposed and discarded. At this very moment, also the temporary observer object dies. This way, it is ensured that there's no resource leak from an un-owned connection object.

Parameters
_rxRowSetthe row set
_rxFactorya service factory, which can be used to create data sources, interaction handler etc (the usual stuff)

◆ connectRowset() [2/2]

Reference< XConnection > dbtools::connectRowset ( const Reference< XRowSet > &  _rxRowSet,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)

◆ convertName2SQLName()

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::convertName2SQLName ( const OUString &  _rName,
std::u16string_view  _rSpecials 
)

create a name which is a valid SQL 92 identifier name

Parameters
_rNamethe string which should be converted
_rSpecials
See also
com.sun.star.sdbc.XDatabaseMetaData.getExtraNameCharacters
isValidSQLName

Definition at line 205 of file CommonTools.cxx.

References i, isCharOk(), isValidSQLName(), and nLength.

Referenced by dbtools::ParameterManager::createFilterConditionFromColumnLink().

◆ createSDBCXColumn() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::beans::XPropertySet > dbtools::createSDBCXColumn ( const css::uno::Reference< css::beans::XPropertySet > &  _xTable,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const OUString &  _rName,
bool  _bCase,
bool  _bQueryForInfo,
bool  _bIsAutoIncrement,
bool  _bIsCurrency,
sal_Int32  _nDataType 
)

creates a SDBC column with the help of getColumns.

Parameters
_xTableThe table.
_rNameThe name of the column.
_bCaseIs the column case sensitive.
_bQueryForInfoIf <TRUE> the autoincrement and currency field will be read from the meta data, otherwise the following parameters will be used instead
_bIsAutoIncrement<TRUE> if the column is an autoincrement.
_bIsCurrency<TRUE> if the column is a currency field.
_nDataTypeThe data type of the column.

◆ createSDBCXColumn() [2/2]

Reference< XPropertySet > dbtools::createSDBCXColumn ( const Reference< XPropertySet > &  _xTable,
const Reference< XConnection > &  _xConnection,
const OUString &  _rName,
bool  _bCase,
bool  _bQueryForInfo,
bool  _bIsAutoIncrement,
bool  _bIsCurrency,
sal_Int32  _nDataType 
)

◆ createSqlCreateTableStatement() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createSqlCreateTableStatement ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection 
)

creates a SQL CREATE TABLE statement

Parameters
descriptorThe descriptor of the new table.
_xConnectionThe connection.
Returns
The CREATE TABLE statement.

◆ createSqlCreateTableStatement() [2/2]

OUString dbtools::createSqlCreateTableStatement ( const Reference< XPropertySet > &  descriptor,
const Reference< XConnection > &  _xConnection 
)

◆ createStandardColumnPart() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createStandardColumnPart ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
ISQLStatementHelper _pHelper = nullptr,
std::u16string_view  _sCreatePattern = {} 
)

creates the standard sql statement for the column part of a create table statement.

Parameters
_pHelperAllow to add special SQL constructs.
descriptorThe descriptor of the column.
_xConnectionThe connection.
_pHelperAllow to add special SQL constructs.

◆ createStandardColumnPart() [2/2]

OUString dbtools::createStandardColumnPart ( const Reference< XPropertySet > &  xColProp,
const Reference< XConnection > &  _xConnection,
ISQLStatementHelper _pHelper,
std::u16string_view  _sCreatePattern 
)

◆ createStandardCreateStatement() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createStandardCreateStatement ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
ISQLStatementHelper _pHelper,
std::u16string_view  _sCreatePattern 
)

creates the standard sql create table statement without the key part.

Parameters
descriptorThe descriptor of the new table.
_xConnectionThe connection.
_bAddScaleThe scale will also be added when the value is 0.

◆ createStandardCreateStatement() [2/2]

OUString dbtools::createStandardCreateStatement ( const Reference< XPropertySet > &  descriptor,
const Reference< XConnection > &  _xConnection,
ISQLStatementHelper _pHelper,
std::u16string_view  _sCreatePattern 
)

◆ createStandardKeyStatement() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createStandardKeyStatement ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection 
)

creates the standard sql statement for the key part of a create table statement.

Parameters
descriptorThe descriptor of the new table.
_xConnectionThe connection.

◆ createStandardKeyStatement() [2/2]

OUString dbtools::createStandardKeyStatement ( const Reference< XPropertySet > &  descriptor,
const Reference< XConnection > &  _xConnection 
)

◆ createStandardTypePart() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createStandardTypePart ( const css::uno::Reference< css::beans::XPropertySet > &  descriptor,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
std::u16string_view  _sCreatePattern = {} 
)

creates the standard sql statement for the type part of a create or alter table statement.

Parameters
_pHelperAllow to add special SQL constructs.
descriptorThe descriptor of the column.
_xConnectionThe connection.

◆ createStandardTypePart() [2/2]

OUString dbtools::createStandardTypePart ( const Reference< XPropertySet > &  xColProp,
const Reference< XConnection > &  _xConnection,
std::u16string_view  _sCreatePattern 
)

◆ createUniqueName() [1/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createUniqueName ( const css::uno::Reference< css::container::XNameAccess > &  _rxContainer,
const OUString &  _rBaseName,
bool  _bStartWithNumber = true 
)

search for a name that is NOT in the NameAcces

Parameters
_rxContainerthe NameAccess container to search in
_rBaseNamethe base name that should be used to create the new name
_bStartWithNumberWhen <TRUE> the name ends with number even when the name itself doesn't occur in the collection.
Returns
A name which doesn't exist in the collection.

◆ createUniqueName() [2/4]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::createUniqueName ( const css::uno::Sequence< OUString > &  _rNames,
const OUString &  _rBaseName,
bool  _bStartWithNumber 
)

creates a unique name which is not already used in the given name array

◆ createUniqueName() [3/4]

OUString dbtools::createUniqueName ( const Reference< XNameAccess > &  _rxContainer,
const OUString &  _rBaseName,
bool  _bStartWithNumber 
)

Definition at line 1398 of file dbtools.cxx.

References createUniqueName().

◆ createUniqueName() [4/4]

OUString dbtools::createUniqueName ( const Sequence< OUString > &  _rNames,
const OUString &  _rBaseName,
bool  _bStartWithNumber 
)

Definition at line 1382 of file dbtools.cxx.

References nPos, and sName.

Referenced by createUniqueName().

◆ ensureRowSetConnection() [1/2]

OOO_DLLPUBLIC_DBTOOLS SharedConnection dbtools::ensureRowSetConnection ( const css::uno::Reference< css::sdbc::XRowSet > &  _rxRowSet,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const css::uno::Reference< css::awt::XWindow > &  _rxParent 
)

ensures that a row set has a valid ActiveConnection, if possible

This function does nearly the same as ->connectRowset. In fact, it is to be preferred over ->connectRowset, if possible.

There are a few differences:

  • If a connection could be determined for the given RowSet, it is always set as ActiveConnection.
  • Definition of the ownership of the created connection allows for more scenarios:
    • If the connection was not newly created, the returned ->SharedConnection instance will not have the ownership, since in this case it's assumed that there already is an instance which has the ownership.
    • If the connection was newly created, then the returned SharedConnection instance will have the ownership of the XConnection.

◆ ensureRowSetConnection() [2/2]

SharedConnection dbtools::ensureRowSetConnection ( const Reference< XRowSet > &  _rxRowSet,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)

Definition at line 476 of file dbtools.cxx.

References lcl_connectRowSet().

◆ findConnection()

static Reference< XConnection > dbtools::findConnection ( const Reference< XInterface > &  xParent)
static

Definition at line 224 of file dbtools.cxx.

References findConnection().

Referenced by findConnection(), and lcl_connectRowSet().

◆ findDataSource() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource > dbtools::findDataSource ( const css::uno::Reference< css::uno::XInterface > &  _xParent)

search the parent hierarchy for a data source.

◆ findDataSource() [2/2]

Reference< XDataSource > dbtools::findDataSource ( const Reference< XInterface > &  _xParent)

◆ getBooleanComparisonPredicate()

OOO_DLLPUBLIC_DBTOOLS void dbtools::getBooleanComparisonPredicate ( std::u16string_view  _rExpression,
const bool  _bValue,
const sal_Int32  _nBooleanComparisonMode,
OUStringBuffer &  _out_rSQLPredicate 
)

adds a boolean comparison clause to the given SQL predicate

Parameters
_rExpressionthe expression which is to be compared with a boolean value
_bValuethe boolean value which the expression is to be compared with
_nBooleanComparisonModethe boolean comparison mode to be used. Usually obtained from a css.sdb.DataSource's Settings member.
_out_rSQLPredicatethe buffer to which the comparison predicate will be appended

Definition at line 1904 of file dbtools.cxx.

◆ getBooleanDataSourceSetting() [1/4]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::getBooleanDataSourceSetting ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const char *  _pAsciiSettingName 
)

determines the value of a boolean data source setting, given by ASCII name

Parameters
_rxConnectionthe connection belonging to the data source whose setting is to be retrieved
_pAsciiSettingNamethe ASCII name of the setting

◆ getBooleanDataSourceSetting() [2/4]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::getBooleanDataSourceSetting ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const OUString &  rSettingName 
)

◆ getBooleanDataSourceSetting() [3/4]

bool dbtools::getBooleanDataSourceSetting ( const Reference< XConnection > &  _rxConnection,
const char *  _pAsciiSettingName 
)

◆ getBooleanDataSourceSetting() [4/4]

bool dbtools::getBooleanDataSourceSetting ( const Reference< XConnection > &  _rxConnection,
const OUString &  rSettingName 
)

Definition at line 571 of file dbtools2.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and findDataSource().

◆ getComposedRowSetStatement()

static Reference< XSingleSelectQueryComposer > dbtools::getComposedRowSetStatement ( const Reference< XPropertySet > &  _rxRowSet,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)
static

◆ getConnection() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > dbtools::getConnection ( const css::uno::Reference< css::sdbc::XRowSet > &  _rxRowSet)

returns the connection the RowSet is currently working with (which is the ActiveConnection property)

Exceptions
css::uno::RuntimeException

◆ getConnection() [2/2]

Reference< XConnection > dbtools::getConnection ( const Reference< XRowSet > &  _rxRowSet)

◆ getConnection_allowException()

static Reference< XConnection > dbtools::getConnection_allowException ( const OUString &  _rsTitleOrPath,
const OUString &  _rsUser,
const OUString &  _rsPwd,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)
static

◆ getConnection_withFeedback() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection > dbtools::getConnection_withFeedback ( const OUString &  _rDataSourceName,
const OUString &  _rUser,
const OUString &  _rPwd,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const css::uno::Reference< css::awt::XWindow > &  _rxParent 
)

◆ getConnection_withFeedback() [2/2]

Reference< XConnection > dbtools::getConnection_withFeedback ( const OUString &  _rDataSourceName,
const OUString &  _rUser,
const OUString &  _rPwd,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)

Definition at line 327 of file dbtools.cxx.

References Exception, getConnection_allowException(), and TOOLS_WARN_EXCEPTION.

◆ getCurrentSettingsComposer() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdb::XSingleSelectQueryComposer > dbtools::getCurrentSettingsComposer ( const css::uno::Reference< css::beans::XPropertySet > &  _rxRowSetProps,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const css::uno::Reference< css::awt::XWindow > &  _rxParent 
)

create a css::sdb::XSingleSelectQueryComposer which represents the current settings (Command/CommandType/Filter/Order) of the given rowset.

As such an instance can be obtained from a css::sdb::Connection only the function searches for the connection the RowSet is using via connectRowset. This implies that a connection will be set on the RowSet if needed. (need to changes this sometimes ...)

◆ getCurrentSettingsComposer() [2/2]

Reference< XSingleSelectQueryComposer > dbtools::getCurrentSettingsComposer ( const Reference< XPropertySet > &  _rxRowSetProps,
const Reference< XComponentContext > &  _rxContext,
const Reference< XWindow > &  _rxParent 
)

◆ getDataDefinitionByURLAndConnection() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbcx::XTablesSupplier > dbtools::getDataDefinitionByURLAndConnection ( const OUString &  _rsUrl,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext 
)

tries to locate the corresponding DataDefinitionSupplier for the given url and connection

Parameters
_rsUrlThe URL used to connect to the database.
_xConnectionThe connection used to find the correct driver.
_rxContextUsed to create the drivermanager.
Returns
The datadefinition object.

◆ getDataDefinitionByURLAndConnection() [2/2]

Reference< XTablesSupplier > dbtools::getDataDefinitionByURLAndConnection ( const OUString &  _rsUrl,
const Reference< XConnection > &  _xConnection,
const Reference< XComponentContext > &  _rxContext 
)

Definition at line 651 of file dbtools2.cxx.

References DBG_UNHANDLED_EXCEPTION, and Exception.

◆ getDataSource() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource > dbtools::getDataSource ( const OUString &  _rsDataSourceName,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext 
)

◆ getDataSource() [2/2]

Reference< XDataSource > dbtools::getDataSource ( const OUString &  _rsTitleOrPath,
const Reference< XComponentContext > &  _rxContext 
)

Definition at line 247 of file dbtools.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and getDataSource_allowException().

◆ getDataSource_allowException()

static Reference< XDataSource > dbtools::getDataSource_allowException ( const OUString &  _rsTitleOrPath,
const Reference< XComponentContext > &  _rxContext 
)
static

Definition at line 236 of file dbtools.cxx.

References ENSURE_OR_RETURN.

Referenced by getConnection_allowException(), and getDataSource().

◆ getDataSourceSetting() [1/4]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::getDataSourceSetting ( const css::uno::Reference< css::uno::XInterface > &  _rxDataSource,
const char *  _pAsciiSettingsName,
css::uno::Any &  _rSettingsValue 
)

retrieves a particular indirect data source setting

Parameters
_rxDataSourcea data source component
_pAsciiSettingsNamethe ASCII name of the setting to obtain
_rSettingsValuethe value of the setting, upon successful return
Returns
<FALSE> if the setting is not present in the <member scope="css::sdb">DataSource::Info</member> member of the data source <TRUE> otherwise

◆ getDataSourceSetting() [2/4]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::getDataSourceSetting ( const css::uno::Reference< css::uno::XInterface > &  _rxDataSource,
const OUString &  _sSettingsName,
css::uno::Any &  _rSettingsValue 
)

◆ getDataSourceSetting() [3/4]

bool dbtools::getDataSourceSetting ( const Reference< XInterface > &  _rxDataSource,
const char *  _pAsciiSettingsName,
Any &  _rSettingsValue 
)

Definition at line 619 of file dbtools2.cxx.

References getDataSourceSetting().

◆ getDataSourceSetting() [4/4]

bool dbtools::getDataSourceSetting ( const Reference< XInterface > &  _xChild,
const OUString &  _sAsciiSettingsName,
Any &  _rSettingsValue 
)

Definition at line 594 of file dbtools2.cxx.

References Exception, and findDataSource().

Referenced by getDataSourceSetting(), and connectivity::lcl_getServiceNameForSetting().

◆ getDefaultNumberFormat() [1/4]

OOO_DLLPUBLIC_DBTOOLS sal_Int32 dbtools::getDefaultNumberFormat ( const css::uno::Reference< css::beans::XPropertySet > &  _xColumn,
const css::uno::Reference< css::util::XNumberFormatTypes > &  _xTypes,
const css::lang::Locale &  _rLocale 
)

◆ getDefaultNumberFormat() [2/4]

sal_Int32 dbtools::getDefaultNumberFormat ( const Reference< XPropertySet > &  _xColumn,
const Reference< XNumberFormatTypes > &  _xTypes,
const Locale &  _rLocale 
)

◆ getDefaultNumberFormat() [3/4]

OOO_DLLPUBLIC_DBTOOLS sal_Int32 dbtools::getDefaultNumberFormat ( sal_Int32  _nDataType,
sal_Int32  _nScale,
bool  _bIsCurrency,
const css::uno::Reference< css::util::XNumberFormatTypes > &  _xTypes,
const css::lang::Locale &  _rLocale 
)

◆ getDefaultNumberFormat() [4/4]

sal_Int32 dbtools::getDefaultNumberFormat ( sal_Int32  _nDataType,
sal_Int32  _nScale,
bool  _bIsCurrency,
const Reference< XNumberFormatTypes > &  _xTypes,
const Locale &  _rLocale 
)

Definition at line 144 of file dbtools.cxx.

References Exception.

◆ getDefaultReportEngineServiceName() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::getDefaultReportEngineServiceName ( const css::uno::Reference< css::uno::XComponentContext > &  _rxFactory)

◆ getDefaultReportEngineServiceName() [2/2]

OUString dbtools::getDefaultReportEngineServiceName ( const Reference< XComponentContext > &  _rxORB)

◆ getFieldNamesByCommandDescriptor() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Sequence< OUString > dbtools::getFieldNamesByCommandDescriptor ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const sal_Int32  _nCommandType,
const OUString &  _rCommand,
SQLExceptionInfo _pErrorInfo = nullptr 
)

get fields for a result set given by a "command descriptor"

A command descriptor here means:

  • a SDB-level connection (com.sun.star.sdb::Connection
  • a string specifying the name of an object relative to the connection
  • a com.sun.star.sdb::CommandType value specifying the type of the object</type>
Parameters
_rxConnectionthe connection relative to which the to-be-examined object exists
_nCommandTypethe type of the object
_rCommandthe object. This may be a table name, a query name, or an SQL statement, depending on the value of <arg>_nCommandType</arg>
_pErrorInfoIf not <NULL>, then upon return from the function the instance pointed to by this argument will contain any available error information in case something went wrong.
Returns
an array of strings containing the names of the columns (aka fields) of the object

◆ getFieldNamesByCommandDescriptor() [2/2]

Sequence< OUString > dbtools::getFieldNamesByCommandDescriptor ( const Reference< XConnection > &  _rxConnection,
const sal_Int32  _nCommandType,
const OUString &  _rCommand,
SQLExceptionInfo _pErrorInfo 
)

Definition at line 721 of file dbtools.cxx.

References disposeComponent(), and getFieldsByCommandDescriptor().

◆ getFieldsByCommandDescriptor() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > dbtools::getFieldsByCommandDescriptor ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const sal_Int32  _nCommandType,
const OUString &  _rCommand,
css::uno::Reference< css::lang::XComponent > &  _rxKeepFieldsAlive,
SQLExceptionInfo _pErrorInfo = nullptr 
)

get fields for a result set given by a "command descriptor"

A command descriptor here means:

  • a SDB-level connection (com.sun.star.sdb::Connection
  • a string specifying the name of an object relative to the connection
  • a com.sun.star.sdb::CommandType value specifying the type of the object</type>
Parameters
_rxConnectionthe connection relative to which the to-be-examined object exists
_nCommandTypethe type of the object
_rCommandthe object. This may be a table name, a query name, or an SQL statement, depending on the value of <arg>_nCommandType</arg>
_rxCollectionOnerIf (and only if) <arg>CommandType</arg> is CommandType.COMMAND, the fields collection which is returned by this function here is a temporary object. It is kept alive by another object, which is to be created temporarily, too. To ensure that the fields you get are valid as long as you need them, the owner which controls their life time is transferred to this parameter upon return.

Your fields live as long as this component lives.

Additionally, you are encouraged to dispose this component as soon as you don't need the fields anymore. It depends on the connection's implementation if this is necessary, but the is no guarantee, so to be on the safe side with respect to resource leaks, you should dispose the component.

Parameters
_pErrorInfoIf not <NULL>, then upon return from the function the instance pointed to by this argument will contain any available error information in case something went wrong.
Returns
the container of the columns (aka fields) of the object

◆ getFieldsByCommandDescriptor() [2/2]

Reference< XNameAccess > dbtools::getFieldsByCommandDescriptor ( const Reference< XConnection > &  _rxConnection,
const sal_Int32  _nCommandType,
const OUString &  _rCommand,
Reference< XComponent > &  _rxKeepFieldsAlive,
SQLExceptionInfo _pErrorInfo 
)

Definition at line 532 of file dbtools.cxx.

References Any, DONE, Exception, and TOOLS_WARN_EXCEPTION.

Referenced by getFieldNamesByCommandDescriptor(), and getTableFields().

◆ getNumberFormats() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::util::XNumberFormatsSupplier > dbtools::getNumberFormats ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConn,
bool  _bAllowDefault = false,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)

calculate a NumberFormatsSupplier for use with a given connection

Parameters
_rxConnthe connection for which the formatter is requested
_bAllowDefaultif the connection (and related components, such as its parent) cannot supply a formatter, we can ask the DatabaseEnvironment for a default one. This parameter states if this is allowed.
_rxFactoryrequired (only of _bAllowDefault is sal_True) for creating the DatabaseEnvironment.
Returns
the formatter all object related to the given connection should work with.

◆ getNumberFormats() [2/2]

Reference< XNumberFormatsSupplier > dbtools::getNumberFormats ( const Reference< XConnection > &  _rxConn,
bool  _bAlloweDefault,
const Reference< XComponentContext > &  _rxContext 
)

Definition at line 908 of file dbtools.cxx.

References hasProperty(), and u.

Referenced by dbtools::OPredicateInputController::OPredicateInputController().

◆ getPrimaryKeyColumns_throw() [1/4]

Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw ( const Any &  i_aTable)

◆ getPrimaryKeyColumns_throw() [2/4]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > dbtools::getPrimaryKeyColumns_throw ( const css::uno::Any &  i_aTable)

returns the primary key columns of the table

◆ getPrimaryKeyColumns_throw() [3/4]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > dbtools::getPrimaryKeyColumns_throw ( const css::uno::Reference< css::beans::XPropertySet > &  i_xTable)

◆ getPrimaryKeyColumns_throw() [4/4]

Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw ( const Reference< XPropertySet > &  i_xTable)

◆ getSearchColumnFlag() [1/2]

OOO_DLLPUBLIC_DBTOOLS sal_Int32 dbtools::getSearchColumnFlag ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConn,
sal_Int32  _nDataType 
)

◆ getSearchColumnFlag() [2/2]

sal_Int32 dbtools::getSearchColumnFlag ( const Reference< XConnection > &  _rxConn,
sal_Int32  _nDataType 
)

Definition at line 1363 of file dbtools.cxx.

◆ getStandardSQLState()

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::getStandardSQLState ( StandardSQLState  _eState)

returns a standard error string for a given SQLState

Parameters
_eStatedescribes the state whose description is to retrieve. Must not be SQL_ERROR_UNSPECIFIED.
Exceptions
RuntimeExceptionin case of an internal error

Definition at line 473 of file dbexception.cxx.

References COLUMN_NOT_FOUND, CONNECTION_DOES_NOT_EXIST, FEATURE_NOT_IMPLEMENTED, FUNCTION_NOT_SUPPORTED, FUNCTION_SEQUENCE_ERROR, GENERAL_ERROR, INVALID_CURSOR_POSITION, INVALID_CURSOR_STATE, INVALID_DESCRIPTOR_INDEX, and INVALID_SQL_DATA_TYPE.

Referenced by prependErrorInfo(), throwFeatureNotImplementedSQLException(), throwFunctionNotSupportedSQLException(), throwFunctionSequenceException(), throwGenericSQLException(), throwInvalidIndexException(), and throwSQLException().

◆ getTableFields() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > dbtools::getTableFields ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConn,
const OUString &  _rName 
)

returns the columns of the named table of the given connection

◆ getTableFields() [2/2]

Reference< XNameAccess > dbtools::getTableFields ( const Reference< XConnection > &  _rxConn,
const OUString &  _rName 
)

Definition at line 481 of file dbtools.cxx.

References getFieldsByCommandDescriptor().

◆ getTablePrivileges() [1/2]

OOO_DLLPUBLIC_DBTOOLS sal_Int32 dbtools::getTablePrivileges ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _xMetaData,
const OUString &  _sCatalog,
const OUString &  _sSchema,
const OUString &  _sTable 
)

returns the table privileges to the given parameters

Parameters
_xMetaDataThe meta data.
_sCatalogcontains the catalog name
_sSchemacontains the schema name
_sTablecontains the table name

◆ getTablePrivileges() [2/2]

sal_Int32 dbtools::getTablePrivileges ( const Reference< XDatabaseMetaData > &  _xMetaData,
const OUString &  _sCatalog,
const OUString &  _sSchema,
const OUString &  _sTable 
)

Definition at line 676 of file dbtools2.cxx.

References Any, and disposeComponent().

Referenced by connectivity::hsqldb::OTables::createObject().

◆ impl_doComposeTableName()

static OUString dbtools::impl_doComposeTableName ( const Reference< XDatabaseMetaData > &  _rxMetaData,
const OUString &  _rCatalog,
const OUString &  _rSchema,
const OUString &  _rName,
bool  _bQuote,
EComposeRule  _eComposeRule 
)
static

Definition at line 803 of file dbtools.cxx.

References quoteName().

Referenced by composeTableName(), composeTableNameForSelect(), and quoteTableName().

◆ implRelativeToAbsoluteNull()

static sal_Int32 dbtools::implRelativeToAbsoluteNull ( const css::util::Date &  _rDate)
static

◆ implSetObject() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::implSetObject ( const css::uno::Reference< css::sdbc::XParameters > &  _rxParameters,
const sal_Int32  _nColumnIndex,
const css::uno::Any &  _rValue 
)

implements <method scope="com.sun.star.sdb">XParameters::setObject</method>

The object which is to be set is analyzed, and in case it is a simlpe scalar type for which there is another setXXX method, this other method is used.

Parameters
_rxParametersthe interface to forward all setXXX calls to (except setObject)
_nColumnIndexthe column index to update
_rValuethe value to update
Returns
<TRUE> if the update request was successfully re-routed to one of the other updateXXX methods

◆ implSetObject() [2/2]

bool dbtools::implSetObject ( const Reference< XParameters > &  _rxParameters,
const sal_Int32  _nColumnIndex,
const Any &  _rValue 
)

◆ implUpdateObject() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::implUpdateObject ( const css::uno::Reference< css::sdbc::XRowUpdate > &  _rxUpdatedObject,
const sal_Int32  _nColumnIndex,
const css::uno::Any &  _rValue 
)

implements <method scope="com.sun.star.sdb">XRowUpdate::updateObject</method>

The object which is to be set is analyzed, and in case it is a simlpe scalar type for which there is another updateXXX method, this other method is used.

Parameters
_rxUpdatedObjectthe interface to forward all updateXXX calls to (except updateObject)
_nColumnIndexthe column index to update
_rValuethe value to update
Returns
<TRUE> if the update request was successfully re-routed to one of the other updateXXX methods

◆ implUpdateObject() [2/2]

bool dbtools::implUpdateObject ( const Reference< XRowUpdate > &  _rxUpdatedObject,
const sal_Int32  _nColumnIndex,
const Any &  _rValue 
)

◆ isAggregateColumn() [1/6]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isAggregateColumn ( const css::uno::Reference< css::beans::XPropertySet > &  _xColumn)

is this column an aggregate?

Parameters
_xColumn

◆ isAggregateColumn() [2/6]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isAggregateColumn ( const css::uno::Reference< css::container::XNameAccess > &  _xColumns,
const OUString &  _sName 
)

is this column an aggregate?

Parameters
_xColumnscollection of columns look for column sName in there
_sNamename of the column

◆ isAggregateColumn() [3/6]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isAggregateColumn ( const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &  _xComposer,
const css::uno::Reference< css::beans::XPropertySet > &  _xField 
)

is this field an aggregate?

Parameters
_xComposera query composer that knows the field by name
_xFieldthe field

◆ isAggregateColumn() [4/6]

bool dbtools::isAggregateColumn ( const Reference< XNameAccess > &  _xColumns,
const OUString &  _sName 
)

Definition at line 983 of file dbtools2.cxx.

References isAggregateColumn().

◆ isAggregateColumn() [5/6]

bool dbtools::isAggregateColumn ( const Reference< XPropertySet > &  _xColumn)

Definition at line 994 of file dbtools2.cxx.

References u.

◆ isAggregateColumn() [6/6]

bool dbtools::isAggregateColumn ( const Reference< XSingleSelectQueryComposer > &  _xParser,
const Reference< XPropertySet > &  _xField 
)

Definition at line 971 of file dbtools2.cxx.

References isAggregateColumn(), and sName.

Referenced by dbtools::ParameterManager::classifyLinks(), and isAggregateColumn().

◆ isCharOk()

static bool dbtools::isCharOk ( sal_Unicode  c,
std::u16string_view  _rSpecials 
)
static

Definition at line 168 of file CommonTools.cxx.

Referenced by convertName2SQLName(), and isValidSQLName().

◆ isDataSourcePropertyEnabled() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isDataSourcePropertyEnabled ( const css::uno::Reference< css::uno::XInterface > &  _xProp,
const OUString &  _sProperty,
bool  _bDefault 
)

check if a specific property is enabled in the info sequence

Deprecated:
Use getBooleanDataSourceSetting instead, which cares for the default of the property itself, instead of spreading this knowledge through all callers.

◆ isDataSourcePropertyEnabled() [2/2]

bool dbtools::isDataSourcePropertyEnabled ( const Reference< XInterface > &  _xProp,
const OUString &  _sProperty,
bool  _bDefault 
)

Definition at line 626 of file dbtools2.cxx.

References DBG_UNHANDLED_EXCEPTION, and findDataSource().

Referenced by composeTableNameForSelect().

◆ isEmbeddedInDatabase() [1/2]

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isEmbeddedInDatabase ( const css::uno::Reference< css::uno::XInterface > &  _rxComponent,
css::uno::Reference< css::sdbc::XConnection > &  _rxActualConnection 
)

determines whether the given component is part of a document which is an embedded database document (such as a form)

◆ isEmbeddedInDatabase() [2/2]

bool dbtools::isEmbeddedInDatabase ( const Reference< XInterface > &  _rxComponent,
Reference< XConnection > &  _rxActualConnection 
)

Definition at line 828 of file dbtools2.cxx.

References Exception, and xModel.

Referenced by lcl_connectRowSet().

◆ isValidSQLName()

OOO_DLLPUBLIC_DBTOOLS bool dbtools::isValidSQLName ( const OUString &  _rName,
std::u16string_view  _rSpecials 
)

checks whether the given name is a valid SQL name

Parameters
_rNamethe string which should be converted
_rSpecials
See also
com.sun.star.sdbc.XDatabaseMetaData.getExtraNameCharacters
convertName2SQLName

Definition at line 176 of file CommonTools.cxx.

References isCharOk().

Referenced by convertName2SQLName().

◆ lcl_concatWarnings()

static void dbtools::lcl_concatWarnings ( Any &  _rChainLeft,
const Any &  _rChainRight 
)
static

◆ lcl_connectRowSet()

static SharedConnection dbtools::lcl_connectRowSet ( const Reference< XRowSet > &  _rxRowSet,
const Reference< XComponentContext > &  _rxContext,
bool  _bAttachAutoDisposer,
const Reference< XWindow > &  _rxParent 
)
static

◆ lcl_getSeparatorChar()

static sal_Unicode dbtools::lcl_getSeparatorChar ( std::u16string_view  _rSeparator,
sal_Unicode  _nFallback 
)
static

◆ operator==()

bool dbtools::operator== ( const OCharsetMap::CharsetIterator lhs,
const OCharsetMap::CharsetIterator rhs 
)

Definition at line 182 of file dbcharset.cxx.

◆ prependErrorInfo() [1/2]

OOO_DLLPUBLIC_DBTOOLS css::sdbc::SQLException dbtools::prependErrorInfo ( const css::sdbc::SQLException &  _rChainedException,
const css::uno::Reference< css::uno::XInterface > &  _rxContext,
const OUString &  _rAdditionalError,
const StandardSQLState  _eSQLState = StandardSQLState::ERROR_UNSPECIFIED 
)

create a new css::sdbc::SQLContext, fill it with the given descriptions and the given source, and append _rException (i.e.

put it into the NextException member of the SQLContext).

◆ prependErrorInfo() [2/2]

SQLException dbtools::prependErrorInfo ( const SQLException &  _rChainedException,
const Reference< XInterface > &  _rxContext,
const OUString &  _rAdditionalError,
const StandardSQLState  _eSQLState 
)

Definition at line 741 of file dbtools.cxx.

References Any, ERROR_UNSPECIFIED, and getStandardSQLState().

◆ qualifiedNameComponents() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::qualifiedNameComponents ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _rxConnMetaData,
const OUString &  _rQualifiedName,
OUString &  _rCatalog,
OUString &  _rSchema,
OUString &  _rName,
EComposeRule  _eComposeRule 
)

split a fully qualified table name (including catalog and schema, if applicable) into its component parts.

Parameters
_rxConnMetaDatameta data describing the connection where you got the table name from
_rQualifiedNamefully qualified table name
_rCatalog(out parameter) upon return, contains the catalog name
_rSchema(out parameter) upon return, contains the schema name
_rName(out parameter) upon return, contains the table name
_eComposeRulewhere do you need the name for

◆ qualifiedNameComponents() [2/2]

void dbtools::qualifiedNameComponents ( const Reference< XDatabaseMetaData > &  _rxConnMetaData,
const OUString &  _rQualifiedName,
OUString &  _rCatalog,
OUString &  _rSchema,
OUString &  _rName,
EComposeRule  _eComposeRule 
)

◆ quoteName()

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::quoteName ( std::u16string_view  _rQuote,
const OUString &  _rName 
)

◆ quoteTableName() [1/2]

OOO_DLLPUBLIC_DBTOOLS OUString dbtools::quoteTableName ( const css::uno::Reference< css::sdbc::XDatabaseMetaData > &  _rxMeta,
const OUString &  _rName,
EComposeRule  _eComposeRule 
)

quote the given table name (which may contain a catalog and a schema) according to the rules provided by the meta data

◆ quoteTableName() [2/2]

OUString dbtools::quoteTableName ( const Reference< XDatabaseMetaData > &  _rxMeta,
const OUString &  _rName,
EComposeRule  _eComposeRule 
)

◆ setObjectWithInfo() [1/4]

OOO_DLLPUBLIC_DBTOOLS void dbtools::setObjectWithInfo ( const css::uno::Reference< css::sdbc::XParameters > &  _xParameters,
sal_Int32  parameterIndex,
const ::connectivity::ORowSetValue x,
sal_Int32  sqlType,
sal_Int32  scale 
)

call the appropriate set method for the specific sql type

See also
css::sdbc::DataType
Parameters
_xParamsthe parameters where to set the value
parameterIndexthe index of the parameter, 1 based
xthe value to set
sqlTypethe corresponding sql type
See also
css::sdbc::DataType
Parameters
scalethe scale of the sql type can be 0
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

◆ setObjectWithInfo() [2/4]

OOO_DLLPUBLIC_DBTOOLS void dbtools::setObjectWithInfo ( const css::uno::Reference< css::sdbc::XParameters > &  _xParameters,
sal_Int32  parameterIndex,
const css::uno::Any &  x,
sal_Int32  sqlType,
sal_Int32  scale = 0 
)

call the appropriate set method for the specific sql type

See also
css::sdbc::DataType
Parameters
_xParamsthe parameters where to set the value
parameterIndexthe index of the parameter, 1 based
xthe value to set
sqlTypethe corresponding sql type
See also
css::sdbc::DataType
Parameters
scalethe scale of the sql type can be 0
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

◆ setObjectWithInfo() [3/4]

void dbtools::setObjectWithInfo ( const Reference< XParameters > &  _xParams,
sal_Int32  parameterIndex,
const ::connectivity::ORowSetValue _rValue,
sal_Int32  sqlType,
sal_Int32  scale 
)

◆ setObjectWithInfo() [4/4]

void dbtools::setObjectWithInfo ( const Reference< XParameters > &  _xParams,
sal_Int32  parameterIndex,
const Any &  x,
sal_Int32  sqlType,
sal_Int32  scale 
)

Definition at line 1765 of file dbtools.cxx.

References connectivity::ORowSetValue::fill(), scale, setObjectWithInfo(), and x.

Referenced by setObjectWithInfo().

◆ showError() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::showError ( const SQLExceptionInfo _rInfo,
const css::uno::Reference< css::awt::XWindow > &  _pParent,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext 
)

◆ showError() [2/2]

void dbtools::showError ( const SQLExceptionInfo _rInfo,
const Reference< XWindow > &  _xParent,
const Reference< XComponentContext > &  _rxContext 
)

◆ subDays()

static void dbtools::subDays ( const sal_Int32  nDays,
css::util::Date &  _rDate 
)
static

◆ throwFeatureNotImplementedRuntimeException() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFeatureNotImplementedRuntimeException ( const OUString &  _rFeatureName,
const css::uno::Reference< css::uno::XInterface > &  _rxContext 
)

throw a RuntimeException (Optional feature not implemented)

Parameters
_rFeatureNamea description of the feature which is not implemented. It's recommended that the feature name is built from the name of the interface plus its method, for instance "XParameters::updateBinaryStream"
_rxContextthe context of the exception
Exceptions
css::uno::RuntimeException

◆ throwFeatureNotImplementedRuntimeException() [2/2]

void dbtools::throwFeatureNotImplementedRuntimeException ( const OUString &  _rFeatureName,
const Reference< XInterface > &  _rxContext 
)

◆ throwFeatureNotImplementedSQLException() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFeatureNotImplementedSQLException ( const OUString &  _rFeatureName,
const css::uno::Reference< css::uno::XInterface > &  _rxContext,
const css::uno::Any &  _rNextException = css::uno::Any() 
)

throw a SQLException with SQLState HYC00 (Optional feature not implemented)

Parameters
_rFeatureNamea description of the feature which is not implemented. It's recommended that the feature name is built from the name of the interface plus its method, for instance "XParameters::updateBinaryStream"
_rxContextthe context of the exception
Exceptions
css::sdbc::SQLException

◆ throwFeatureNotImplementedSQLException() [2/2]

void dbtools::throwFeatureNotImplementedSQLException ( const OUString &  _rFeatureName,
const Reference< XInterface > &  _rxContext,
const Any &  _rNextException 
)

Definition at line 416 of file dbexception.cxx.

References FEATURE_NOT_IMPLEMENTED, connectivity::SharedResources::getResourceStringWithSubstitution(), and getStandardSQLState().

Referenced by connectivity::sdbcx::OTable::alterColumnByIndex(), connectivity::sdbcx::OTable::alterColumnByName(), connectivity::sdbcx::OUser::changePassword(), connectivity::hsqldb::ODriverDelegator::createCatalog(), connectivity::component::OComponentResultSet::deleteRows(), connectivity::dbase::ODbaseResultSet::deleteRows(), connectivity::evoab::OEvoabPreparedStatement::executeUpdate(), connectivity::evoab::OStatement::executeUpdate(), connectivity::ado::OCallableStatement::getArray(), connectivity::ado::ODatabaseMetaDataResultSet::getArray(), connectivity::ado::OResultSet::getArray(), connectivity::ado::OCallableStatement::getBinaryStream(), connectivity::ado::OCallableStatement::getBlob(), connectivity::ado::ODatabaseMetaDataResultSet::getBlob(), connectivity::ado::OResultSet::getBlob(), connectivity::ado::OCallableStatement::getCharacterStream(), connectivity::ado::ODatabaseMetaDataResultSet::getCharacterStream(), connectivity::ado::OResultSet::getCharacterStream(), connectivity::ado::OCallableStatement::getClob(), connectivity::ado::ODatabaseMetaDataResultSet::getClob(), connectivity::ado::OResultSet::getClob(), connectivity::sdbcx::OUser::getGrantablePrivileges(), connectivity::ado::ODatabaseMetaDataResultSet::getLong(), connectivity::ado::OResultSet::getLong(), connectivity::sdbcx::OUser::getPrivileges(), connectivity::ado::OCallableStatement::getRef(), connectivity::ado::ODatabaseMetaDataResultSet::getRef(), connectivity::ado::OResultSet::getRef(), connectivity::ado::ODatabaseMetaDataResultSet::getRow(), connectivity::evoab::OEvoabConnection::getTypeMap(), connectivity::firebird::Connection::getTypeMap(), connectivity::evoab::OEvoabDatabaseMetaData::getUDTs(), connectivity::sdbcx::OGroup::grantPrivileges(), connectivity::sdbcx::OUser::grantPrivileges(), connectivity::BlobHelper::position(), connectivity::firebird::Blob::position(), connectivity::firebird::Clob::position(), connectivity::BlobHelper::positionOfBlob(), connectivity::java_sql_Blob::positionOfBlob(), connectivity::firebird::Blob::positionOfBlob(), connectivity::firebird::Clob::positionOfClob(), connectivity::java_sql_Clob::positionOfClob(), connectivity::evoab::OEvoabConnection::prepareCall(), connectivity::calc::OCalcConnection::prepareCall(), connectivity::dbase::ODbaseConnection::prepareCall(), connectivity::file::OConnection::prepareCall(), connectivity::odbc::OConnection::prepareCall(), connectivity::writer::OWriterConnection::prepareCall(), connectivity::sdbcx::OGroup::revokePrivileges(), connectivity::sdbcx::OUser::revokePrivileges(), connectivity::java_sql_PreparedStatement::setArray(), connectivity::evoab::OEvoabConnection::setAutoCommit(), connectivity::java_sql_PreparedStatement::setBlob(), connectivity::evoab::OEvoabConnection::setCatalog(), connectivity::file::OConnection::setCatalog(), connectivity::java_sql_PreparedStatement::setClob(), connectivity::ado::ODatabaseMetaDataResultSet::setFetchDirection(), connectivity::ado::OResultSet::setFetchDirection(), connectivity::ado::OStatement_Base::setFetchDirection(), connectivity::file::OPreparedStatement::setLong(), connectivity::ado::OStatement_Base::setMaxFieldSize(), connectivity::evoab::OEvoabConnection::setReadOnly(), connectivity::java_sql_PreparedStatement::setRef(), connectivity::evoab::OEvoabConnection::setTransactionIsolation(), connectivity::file::OConnection::setTransactionIsolation(), connectivity::evoab::OEvoabConnection::setTypeMap(), connectivity::java_sql_Connection::setTypeMap(), connectivity::java_sql_ResultSet::updateBinaryStream(), connectivity::java_sql_ResultSet::updateCharacterStream(), and connectivity::file::OResultSet::updateLong().

◆ throwFunctionNotSupportedRuntimeException()

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFunctionNotSupportedRuntimeException ( const OUString &  _rFunctionName,
const css::uno::Reference< css::uno::XInterface > &  _rxContext 
)
Exceptions
css::uno::RuntimeException

Definition at line 391 of file dbexception.cxx.

References connectivity::SharedResources::getResourceStringWithSubstitution().

◆ throwFunctionNotSupportedSQLException()

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFunctionNotSupportedSQLException ( const OUString &  _rFunctionName,
const css::uno::Reference< css::uno::XInterface > &  _rxContext 
)

throws an exception with SQL state IM001, saying that a certain function is not supported

Exceptions
css::sdbc::SQLException

Definition at line 374 of file dbexception.cxx.

References FUNCTION_NOT_SUPPORTED, connectivity::SharedResources::getResourceStringWithSubstitution(), and getStandardSQLState().

Referenced by connectivity::odbc::OPreparedStatement::addBatch(), connectivity::odbc::OPreparedStatement::clearBatch(), connectivity::macab::MacabPreparedStatement::clearParameters(), connectivity::odbc::OPreparedStatement::executeBatch(), connectivity::evoab::OEvoabResultSet::getArray(), connectivity::macab::MacabResultSet::getArray(), connectivity::odbc::ODatabaseMetaDataResultSet::getArray(), connectivity::odbc::OResultSet::getArray(), connectivity::evoab::OEvoabResultSet::getBinaryStream(), connectivity::macab::MacabResultSet::getBinaryStream(), connectivity::odbc::ODatabaseMetaDataResultSet::getBinaryStream(), connectivity::odbc::OResultSet::getBinaryStream(), connectivity::evoab::OEvoabResultSet::getBlob(), connectivity::macab::MacabResultSet::getBlob(), connectivity::odbc::ODatabaseMetaDataResultSet::getBlob(), connectivity::odbc::OResultSet::getBlob(), connectivity::macab::MacabResultSet::getBoolean(), connectivity::evoab::OEvoabResultSet::getByte(), connectivity::macab::MacabResultSet::getByte(), connectivity::evoab::OEvoabResultSet::getBytes(), connectivity::macab::MacabResultSet::getBytes(), connectivity::firebird::Connection::getCatalog(), connectivity::evoab::OEvoabResultSet::getCharacterStream(), connectivity::macab::MacabResultSet::getCharacterStream(), connectivity::odbc::ODatabaseMetaDataResultSet::getCharacterStream(), connectivity::odbc::OResultSet::getCharacterStream(), connectivity::evoab::OEvoabResultSet::getClob(), connectivity::macab::MacabResultSet::getClob(), connectivity::odbc::ODatabaseMetaDataResultSet::getClob(), connectivity::odbc::OResultSet::getClob(), connectivity::evoab::OEvoabResultSet::getDate(), connectivity::macab::MacabResultSet::getDate(), connectivity::evoab::OEvoabResultSet::getDouble(), connectivity::evoab::OEvoabResultSet::getFloat(), connectivity::evoab::OEvoabResultSet::getInt(), connectivity::evoab::OEvoabResultSet::getLong(), connectivity::evoab::OEvoabResultSet::getObject(), connectivity::macab::MacabResultSet::getObject(), connectivity::evoab::OEvoabResultSet::getRef(), connectivity::macab::MacabResultSet::getRef(), connectivity::odbc::ODatabaseMetaDataResultSet::getRef(), connectivity::odbc::OResultSet::getRef(), connectivity::evoab::OEvoabResultSet::getShort(), connectivity::macab::MacabResultSet::getShort(), connectivity::evoab::OEvoabResultSet::getTime(), connectivity::macab::MacabResultSet::getTime(), connectivity::evoab::OEvoabResultSet::getTimestamp(), connectivity::evoab::OEvoabPreparedStatement::setArray(), connectivity::macab::MacabPreparedStatement::setArray(), connectivity::evoab::OEvoabPreparedStatement::setBinaryStream(), connectivity::macab::MacabPreparedStatement::setBinaryStream(), connectivity::evoab::OEvoabPreparedStatement::setBlob(), connectivity::macab::MacabPreparedStatement::setBlob(), connectivity::evoab::OEvoabPreparedStatement::setBoolean(), connectivity::macab::MacabPreparedStatement::setBoolean(), connectivity::evoab::OEvoabPreparedStatement::setByte(), connectivity::macab::MacabPreparedStatement::setByte(), connectivity::evoab::OEvoabPreparedStatement::setBytes(), connectivity::macab::MacabPreparedStatement::setBytes(), connectivity::firebird::Connection::setCatalog(), connectivity::evoab::OEvoabPreparedStatement::setCharacterStream(), connectivity::macab::MacabPreparedStatement::setCharacterStream(), connectivity::evoab::OEvoabPreparedStatement::setClob(), connectivity::macab::MacabPreparedStatement::setClob(), connectivity::evoab::OEvoabPreparedStatement::setDate(), connectivity::macab::MacabPreparedStatement::setDate(), connectivity::evoab::OEvoabPreparedStatement::setDouble(), connectivity::macab::MacabPreparedStatement::setDouble(), connectivity::odbc::OResultSet::setFetchDirection(), connectivity::evoab::OEvoabPreparedStatement::setFloat(), connectivity::macab::MacabPreparedStatement::setFloat(), connectivity::evoab::OEvoabPreparedStatement::setInt(), connectivity::macab::MacabPreparedStatement::setInt(), connectivity::evoab::OEvoabPreparedStatement::setLong(), connectivity::macab::MacabPreparedStatement::setLong(), connectivity::evoab::OEvoabPreparedStatement::setNull(), connectivity::evoab::OEvoabPreparedStatement::setObjectNull(), connectivity::macab::MacabPreparedStatement::setObjectNull(), connectivity::evoab::OEvoabPreparedStatement::setObjectWithInfo(), connectivity::macab::MacabPreparedStatement::setObjectWithInfo(), connectivity::evoab::OEvoabPreparedStatement::setRef(), connectivity::macab::MacabPreparedStatement::setRef(), connectivity::evoab::OEvoabPreparedStatement::setShort(), connectivity::macab::MacabPreparedStatement::setShort(), connectivity::evoab::OEvoabPreparedStatement::setString(), connectivity::evoab::OEvoabPreparedStatement::setTime(), connectivity::macab::MacabPreparedStatement::setTime(), connectivity::evoab::OEvoabPreparedStatement::setTimestamp(), connectivity::macab::MacabPreparedStatement::setTimestamp(), and connectivity::odbc::OResultSet::updateLong().

◆ throwFunctionSequenceException() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFunctionSequenceException ( const css::uno::Reference< css::uno::XInterface > &  Context,
const css::uno::Any &  Next = css::uno::Any() 
)

throws a function sequence (HY010) exception

Exceptions
css::sdbc::SQLException

◆ throwFunctionSequenceException() [2/2]

void dbtools::throwFunctionSequenceException ( const Reference< XInterface > &  Context,
const Any &  Next 
)

Definition at line 349 of file dbexception.cxx.

References FUNCTION_SEQUENCE_ERROR, connectivity::SharedResources::getResourceString(), getStandardSQLState(), and Next.

Referenced by connectivity::ado::OResultSet::absolute(), connectivity::ODatabaseMetaDataResultSet::absolute(), connectivity::ODatabaseMetaDataResultSet::afterLast(), connectivity::ODatabaseMetaDataResultSet::beforeFirst(), connectivity::ado::ODatabaseMetaDataResultSet::checkRecordSet(), connectivity::ado::OResultSet::construct(), connectivity::dbase::ODbaseIndex::CreateImpl(), createStandardCreateStatement(), createStandardKeyStatement(), connectivity::ODatabaseMetaDataResultSet::first(), connectivity::file::OStatement_Base::GetAssignValues(), connectivity::ado::OStatement_Base::getMaxRows(), connectivity::odbc::OStatement_Base::getResultSet(), connectivity::ODatabaseMetaDataResultSet::getValue(), connectivity::file::OResultSet::insertRow(), connectivity::ODatabaseMetaDataResultSet::isFirst(), connectivity::ODatabaseMetaDataResultSet::isLast(), connectivity::ODatabaseMetaDataResultSet::last(), connectivity::ODatabaseMetaDataResultSet::next(), connectivity::file::OStatement_Base::ParseAssignValues(), connectivity::ODatabaseMetaDataResultSet::previous(), connectivity::ODatabaseMetaDataResultSet::relative(), connectivity::ODatabaseMetaDataResultSet::rowDeleted(), connectivity::ODatabaseMetaDataResultSet::rowInserted(), connectivity::ODatabaseMetaDataResultSet::rowUpdated(), and connectivity::file::OStatement_Base::SetAssignValue().

◆ throwGenericSQLException() [1/3]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwGenericSQLException ( const OUString &  _rMsg,
const css::uno::Reference< css::uno::XInterface > &  _rxSource 
)

throw a generic SQLException, i.e.

one with an SQLState of HY000, an ErrorCode of 0 and no NextException

Exceptions
css::sdbc::SQLException

Definition at line 405 of file dbexception.cxx.

References Any, and throwGenericSQLException().

Referenced by connectivity::calc::OCalcConnection::acquireDoc(), connectivity::writer::OWriterConnection::acquireDoc(), connectivity::hsqldb::OHSQLUser::changePassword(), connectivity::dbase::ODbaseResultSet::compareBookmarks(), connectivity::firebird::Connection::construct(), connectivity::dbase::ODbaseIndex::CreateImpl(), connectivity::dbase::ODbaseIndexes::createObject(), connectivity::dbase::ODbaseTables::dropObject(), connectivity::file::OPredicateCompiler::execute_Operand(), connectivity::file::OFileDriver::getDataDefinitionByURL(), connectivity::macab::MacabPreparedStatement::getNextParameter(), connectivity::evoab::OEvoabDriver::getPropertyInfo(), connectivity::firebird::FirebirdDriver::getPropertyInfo(), connectivity::file::OFileDriver::getPropertyInfo(), connectivity::java_sql_Driver::getPropertyInfo(), connectivity::odbc::ODBCDriver::getPropertyInfo(), connectivity::ODatabaseMetaDataBase::getTypeInfo(), connectivity::hsqldb::OHSQLUser::grantPrivileges(), connectivity::mysql::OMySQLUser::grantPrivileges(), connectivity::ado::ODriver::impl_checkURL_throw(), connectivity::macab::impl_throwError(), connectivity::firebird::Connection::loadDatabaseFile(), connectivity::java_sql_Connection::loadDriverFromProperties(), connectivity::dbase::ODbaseIndex::openIndexFile(), connectivity::hsqldb::OHSQLUser::revokePrivileges(), connectivity::mysql::OMySQLUser::revokePrivileges(), connectivity::evoab::OEvoabResultSetMetaData::setEvoabFields(), connectivity::macab::MacabPreparedStatement::setMacabFields(), connectivity::macab::MacabCommonStatement::setMacabFields(), connectivity::evoab::OEvoabPreparedStatement::setObject(), connectivity::macab::MacabPreparedStatement::setObject(), connectivity::java_sql_PreparedStatement::setObject(), setObjectWithInfo(), throwGenericSQLException(), connectivity::OMetaConnection::throwGenericSQLException(), and connectivity::java_sql_ResultSet::updateObject().

◆ throwGenericSQLException() [2/3]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwGenericSQLException ( const OUString &  _rMsg,
const css::uno::Reference< css::uno::XInterface > &  _rxSource,
const css::uno::Any &  _rNextException 
)

throw a generic SQLException, i.e.

one with an SQLState of HY000, an ErrorCode of 0 and no NextException

Exceptions
css::sdbc::SQLException

◆ throwGenericSQLException() [3/3]

void dbtools::throwGenericSQLException ( const OUString &  _rMsg,
const Reference< XInterface > &  _rxSource,
const Any &  _rNextException 
)

Definition at line 411 of file dbexception.cxx.

References GENERAL_ERROR, and getStandardSQLState().

◆ throwInvalidColumnException() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwInvalidColumnException ( const OUString &  _rColumnName,
const css::uno::Reference< css::uno::XInterface > &  _rxContext 
)

throw a SQLException with SQLState 42S22 (Column Not Found)

Parameters
_rColumnNameNameThe column that couldn't be found.
_rxContextthe context of the exception
Exceptions
css::sdbc::SQLException

◆ throwInvalidColumnException() [2/2]

void dbtools::throwInvalidColumnException ( const OUString &  _rColumnName,
const Reference< XInterface > &  _rxContext 
)

◆ throwInvalidIndexException()

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwInvalidIndexException ( const css::uno::Reference< css::uno::XInterface > &  Context,
const css::uno::Any &  Next = css::uno::Any() 
)

◆ throwSQLException() [1/4]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwSQLException ( const OUString &  _rMessage,
const OUString &  _rSQLState,
const css::uno::Reference< css::uno::XInterface > &  _rxContext,
const sal_Int32  _nErrorCode 
)
Exceptions
css::sdbc::SQLException

◆ throwSQLException() [2/4]

void dbtools::throwSQLException ( const OUString &  _rMessage,
const OUString &  _rSQLState,
const Reference< XInterface > &  _rxContext,
const sal_Int32  _nErrorCode 
)

◆ throwSQLException() [3/4]

OOO_DLLPUBLIC_DBTOOLS void dbtools::throwSQLException ( const OUString &  _rMessage,
StandardSQLState  _eSQLState,
const css::uno::Reference< css::uno::XInterface > &  _rxContext,
const sal_Int32  _nErrorCode = 0 
)
Exceptions
css::sdbc::SQLException

◆ throwSQLException() [4/4]

void dbtools::throwSQLException ( const OUString &  _rMessage,
StandardSQLState  _eSQLState,
const Reference< XInterface > &  _rxContext,
const sal_Int32  _nErrorCode 
)

Definition at line 466 of file dbexception.cxx.

References getStandardSQLState(), and throwSQLException().

◆ TransferFormComponentProperties() [1/2]

OOO_DLLPUBLIC_DBTOOLS void dbtools::TransferFormComponentProperties ( const css::uno::Reference< css::beans::XPropertySet > &  _rxOld,
const css::uno::Reference< css::beans::XPropertySet > &  _rxNew,
const css::lang::Locale &  _rLocale 
)

transfer and translate properties between two FormComponents

Parameters
_rxOldthe source property set
_rxNewthe destination property set
_rLocalethe locale for converting number related properties

◆ TransferFormComponentProperties() [2/2]

void dbtools::TransferFormComponentProperties ( const Reference< XPropertySet > &  xOldProps,
const Reference< XPropertySet > &  xNewProps,
const Locale &  _rLocale 
)

Variable Documentation

◆ ACTIVE_CONNECTION_PROPERTY_NAME

constexpr OUStringLiteral dbtools::ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection"
constexpr