LibreOffice Module connectivity (master) 1
|
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::UStringMixLess > | ColumnInformationMap |
typedef ::utl::SharedUNOComponent< css::sdb::XSingleSelectQueryComposer, ::utl::DisposableComponent > | SharedQueryComposer |
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< XPropertySet > | createSDBCXColumn (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::XPropertySet > | 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. 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 ::std::pair< TBoolPair,sal_Int32 > dbtools::ColumnInformation |
Definition at line 744 of file dbtools.hxx.
typedef ::std::multimap< OUString, ColumnInformation, ::comphelper::UStringMixLess> dbtools::ColumnInformationMap |
Definition at line 745 of file dbtools.hxx.
typedef ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener, css::sdbc::XRowSetListener > dbtools::OAutoConnectionDisposer_Base |
Definition at line 41 of file conncleanup.hxx.
typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > dbtools::SharedConnection |
Definition at line 80 of file dbtools.hxx.
typedef ::utl::SharedUNOComponent< css::sdb::XSingleSelectQueryComposer, ::utl::DisposableComponent > dbtools::SharedQueryComposer |
Definition at line 53 of file parameters.hxx.
typedef ::std::pair<bool,bool> dbtools::TBoolPair |
Definition at line 743 of file dbtools.hxx.
|
strong |
Enumerator | |
---|---|
InTableDefinitions | |
InIndexDefinitions | |
InDataManipulation | |
InProcedureCalls | |
InPrivilegeDefinitions | |
Complete |
Definition at line 82 of file dbtools.hxx.
Enumerator | |
---|---|
ParameterInteractionCancelled |
Definition at line 47 of file dbexception.hxx.
|
strong |
standard SQLStates to be used with an SQLException
Extend this list whenever you need a new state ...
Definition at line 35 of file standardsqlstate.hxx.
|
static |
Definition at line 204 of file dbconversion.cxx.
References comphelper::date::convertDaysToDate(), and implRelativeToAbsoluteNull().
Referenced by dbtools::DBTypeConversion::toDate().
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
_xConnection | the connection must be able to create css::sdb::SingleSelectQueryComposers |
_xPreparedStmt | the prepared statement where the parameters could be set when needed |
_aParametersSet | contains which parameters have to asked for and which already have set. |
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 | ||
) |
Definition at line 1673 of file dbtools.cxx.
References Any, connectivity::OMetaConnection::getPropMap(), hasProperty(), i, ParameterInteractionCancelled, PROPERTY_ID_NAME, PROPERTY_ID_SCALE, PROPERTY_ID_TYPE, PROPERTY_NAME, and sName.
OOO_DLLPUBLIC_DBTOOLS bool dbtools::canDelete | ( | const css::uno::Reference< css::beans::XPropertySet > & | _rxCursorSet | ) |
check if the property "Privileges" supports css::sdbcx::Privilege::DELETE
_rxCursorSet | the property set |
bool dbtools::canDelete | ( | const Reference< XPropertySet > & | _rxCursorSet | ) |
Definition at line 1192 of file dbtools.cxx.
References getINT32().
OOO_DLLPUBLIC_DBTOOLS bool dbtools::canInsert | ( | const css::uno::Reference< css::beans::XPropertySet > & | _rxCursorSet | ) |
check if the property "Privileges" supports css::sdbcx::Privilege::INSERT
_rxCursorSet | the property set |
bool dbtools::canInsert | ( | const Reference< XPropertySet > & | _rxCursorSet | ) |
Definition at line 1182 of file dbtools.cxx.
References getINT32().
OOO_DLLPUBLIC_DBTOOLS bool dbtools::canUpdate | ( | const css::uno::Reference< css::beans::XPropertySet > & | _rxCursorSet | ) |
check if the property "Privileges" supports css::sdbcx::Privilege::UPDATE
_rxCursorSet | the property set |
bool dbtools::canUpdate | ( | const Reference< XPropertySet > & | _rxCursorSet | ) |
Definition at line 1187 of file dbtools.cxx.
References getINT32().
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.
_xConnection | The connection. |
_sComposedTableName | The quoted table name. ccc.sss.ttt |
_sName | The name of the column, or * |
_rInfo | The information about the column(s). |
void dbtools::collectColumnInformation | ( | const Reference< XConnection > & | _xConnection, |
std::u16string_view | _sComposedName, | ||
std::u16string_view | _rName, | ||
ColumnInformationMap & | _rInfo | ||
) |
Definition at line 795 of file dbtools2.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, connectivity::OMetaConnection::getPropMap(), i, nCount, and PROPERTY_ID_ESCAPEPROCESSING.
Referenced by connectivity::OColumnsHelper::createObject().
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
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>
_xMetaData | The metadata from the connection. |
_xTable | The table. |
OUString dbtools::composeTableName | ( | const Reference< XDatabaseMetaData > & | _rxMetaData, |
const OUString & | _rCatalog, | ||
const OUString & | _rSchema, | ||
const OUString & | _rName, | ||
bool | _bQuote, | ||
EComposeRule | _eComposeRule | ||
) |
Definition at line 1286 of file dbtools.cxx.
References impl_doComposeTableName().
Referenced by connectivity::hsqldb::HView::alterCommand(), connectivity::OColumnsHelper::appendObject(), connectivity::OIndexesHelper::appendObject(), connectivity::OKeysHelper::appendObject(), connectivity::sdbcx::OCatalog::buildName(), createStandardCreateStatement(), createStandardKeyStatement(), connectivity::firebird::Views::createView(), connectivity::mysqlc::Views::createView(), connectivity::hsqldb::HViews::createView(), connectivity::mysql::OViews::createView(), connectivity::firebird::Views::dropObject(), connectivity::mysqlc::Views::dropObject(), connectivity::hsqldb::OTables::dropObject(), connectivity::hsqldb::HViews::dropObject(), connectivity::mysql::OViews::dropObject(), connectivity::OColumnsHelper::dropObject(), connectivity::OIndexesHelper::dropObject(), connectivity::OKeysHelper::dropObject(), connectivity::mysqlc::Table::getAlterTableColumnPart(), connectivity::hsqldb::OHSQLTable::getAlterTableColumnPart(), connectivity::mysql::OMySQLTable::getAlterTableColumnPart(), connectivity::sdbcx::OView::getName(), connectivity::OTableHelper::getName(), connectivity::mysqlc::Tables::getNameForObject(), connectivity::hsqldb::OTables::getNameForObject(), connectivity::OTableHelper::refreshForeignKeys(), connectivity::hsqldb::OHSQLTable::rename(), connectivity::OTableHelper::rename(), and connectivity::OSQLParseTreeIterator::traverseOneTableName().
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.
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.
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.
OUString dbtools::composeTableNameForSelect | ( | const Reference< XConnection > & | _rxConnection, |
const OUString & | _rCatalog, | ||
const OUString & | _rSchema, | ||
const OUString & | _rName | ||
) |
Definition at line 1296 of file dbtools.cxx.
References impl_doComposeTableName(), InDataManipulation, and isDataSourcePropertyEnabled().
Referenced by composeTableNameForSelect(), and connectivity::OColumnsHelper::createObject().
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.
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.
_rxRowSet | the row set |
_rxFactory | a service factory, which can be used to create data sources, interaction handler etc (the usual stuff) |
Reference< XConnection > dbtools::connectRowset | ( | const Reference< XRowSet > & | _rxRowSet, |
const Reference< XComponentContext > & | _rxContext, | ||
const Reference< XWindow > & | _rxParent | ||
) |
Definition at line 470 of file dbtools.cxx.
References utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), and lcl_connectRowSet().
Referenced by getComposedRowSetStatement().
OOO_DLLPUBLIC_DBTOOLS OUString dbtools::convertName2SQLName | ( | const OUString & | _rName, |
std::u16string_view | _rSpecials | ||
) |
create a name which is a valid SQL 92 identifier name
_rName | the string which should be converted |
_rSpecials |
Definition at line 205 of file CommonTools.cxx.
References i, isCharOk(), isValidSQLName(), and nLength.
Referenced by dbtools::ParameterManager::createFilterConditionFromColumnLink().
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.
_xTable | The table. |
_rName | The name of the column. |
_bCase | Is the column case sensitive. |
_bQueryForInfo | If <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. |
_nDataType | The data type of the column. |
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 | ||
) |
Definition at line 516 of file dbtools2.cxx.
References Any, dbtools::OPropertyMap::getNameByIndex(), getPrimaryKeyColumns_throw(), connectivity::OMetaConnection::getPropMap(), PROPERTY_ID_CATALOGNAME, PROPERTY_ID_NAME, PROPERTY_ID_SCHEMANAME, and sCatalog.
Referenced by connectivity::OColumnsHelper::createObject().
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
descriptor | The descriptor of the new table. |
_xConnection | The connection. |
OUString dbtools::createSqlCreateTableStatement | ( | const Reference< XPropertySet > & | descriptor, |
const Reference< XConnection > & | _xConnection | ||
) |
Definition at line 371 of file dbtools2.cxx.
References createStandardCreateStatement(), createStandardKeyStatement(), and u.
Referenced by connectivity::mysqlc::Tables::createTable().
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.
_pHelper | Allow to add special SQL constructs. |
descriptor | The descriptor of the column. |
_xConnection | The connection. |
_pHelper | Allow to add special SQL constructs. |
OUString dbtools::createStandardColumnPart | ( | const Reference< XPropertySet > & | xColProp, |
const Reference< XConnection > & | _xConnection, | ||
ISQLStatementHelper * | _pHelper, | ||
std::u16string_view | _sCreatePattern | ||
) |
Definition at line 169 of file dbtools2.cxx.
References dbtools::ISQLStatementHelper::addComment(), createStandardTypePart(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), PROPERTY_ID_AUTOINCREMENTCREATION, PROPERTY_ID_ISAUTOINCREMENT, PROPERTY_ID_ISNULLABLE, PROPERTY_ID_NAME, and quoteName().
Referenced by connectivity::mysql::OMySQLTable::alterColumnByName(), connectivity::hsqldb::OHSQLTable::alterColumnType(), connectivity::mysql::OMySQLTable::alterColumnType(), connectivity::OColumnsHelper::appendObject(), and createStandardCreateStatement().
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.
descriptor | The descriptor of the new table. |
_xConnection | The connection. |
_bAddScale | The scale will also be added when the value is 0. |
OUString dbtools::createStandardCreateStatement | ( | const Reference< XPropertySet > & | descriptor, |
const Reference< XConnection > & | _xConnection, | ||
ISQLStatementHelper * | _pHelper, | ||
std::u16string_view | _sCreatePattern | ||
) |
Definition at line 204 of file dbtools2.cxx.
References composeTableName(), createStandardColumnPart(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), i, nCount, PROPERTY_ID_CATALOGNAME, PROPERTY_ID_NAME, PROPERTY_ID_SCHEMANAME, sCatalog, sComposedName, sSchema, and throwFunctionSequenceException().
Referenced by createSqlCreateTableStatement().
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.
descriptor | The descriptor of the new table. |
_xConnection | The connection. |
OUString dbtools::createStandardKeyStatement | ( | const Reference< XPropertySet > & | descriptor, |
const Reference< XConnection > & | _xConnection | ||
) |
Definition at line 267 of file dbtools2.cxx.
References composeTableName(), getINT32(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), getString(), i, PROPERTY_ID_DELETERULE, PROPERTY_ID_REFERENCEDTABLE, PROPERTY_ID_TYPE, qualifiedNameComponents(), sCatalog, sComposedName, sSchema, and throwFunctionSequenceException().
Referenced by createSqlCreateTableStatement().
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.
_pHelper | Allow to add special SQL constructs. |
descriptor | The descriptor of the column. |
_xConnection | The connection. |
OUString dbtools::createStandardTypePart | ( | const Reference< XPropertySet > & | xColProp, |
const Reference< XConnection > & | _xConnection, | ||
std::u16string_view | _sCreatePattern | ||
) |
Definition at line 67 of file dbtools2.cxx.
References dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), nDataType, nIndex, nType, PROPERTY_ID_AUTOINCREMENTCREATION, PROPERTY_ID_DEFAULTVALUE, PROPERTY_ID_PRECISION, PROPERTY_ID_SCALE, PROPERTY_ID_TYPE, PROPERTY_ID_TYPENAME, sPrefix, and u.
Referenced by connectivity::firebird::Tables::createStandardColumnPart(), and createStandardColumnPart().
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
_rxContainer | the NameAccess container to search in |
_rBaseName | the base name that should be used to create the new name |
_bStartWithNumber | When <TRUE> the name ends with number even when the name itself doesn't occur in the collection. |
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
OUString dbtools::createUniqueName | ( | const Reference< XNameAccess > & | _rxContainer, |
const OUString & | _rBaseName, | ||
bool | _bStartWithNumber | ||
) |
Definition at line 1398 of file dbtools.cxx.
References createUniqueName().
OUString dbtools::createUniqueName | ( | const Sequence< OUString > & | _rNames, |
const OUString & | _rBaseName, | ||
bool | _bStartWithNumber | ||
) |
Definition at line 1382 of file dbtools.cxx.
Referenced by createUniqueName().
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:
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().
|
static |
Definition at line 224 of file dbtools.cxx.
References findConnection().
Referenced by findConnection(), and lcl_connectRowSet().
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.
Reference< XDataSource > dbtools::findDataSource | ( | const Reference< XInterface > & | _xParent | ) |
Definition at line 1197 of file dbtools.cxx.
References findDataSource().
Referenced by findDataSource(), getBooleanDataSourceSetting(), getDataSourceSetting(), and isDataSourcePropertyEnabled().
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
_rExpression | the expression which is to be compared with a boolean value |
_bValue | the boolean value which the expression is to be compared with |
_nBooleanComparisonMode | the boolean comparison mode to be used. Usually obtained from a css.sdb.DataSource's Settings member. |
_out_rSQLPredicate | the buffer to which the comparison predicate will be appended |
Definition at line 1904 of file dbtools.cxx.
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
_rxConnection | the connection belonging to the data source whose setting is to be retrieved |
_pAsciiSettingName | the ASCII name of the setting |
OOO_DLLPUBLIC_DBTOOLS bool dbtools::getBooleanDataSourceSetting | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection, |
const OUString & | rSettingName | ||
) |
bool dbtools::getBooleanDataSourceSetting | ( | const Reference< XConnection > & | _rxConnection, |
const char * | _pAsciiSettingName | ||
) |
Definition at line 566 of file dbtools2.cxx.
References getBooleanDataSourceSetting().
Referenced by connectivity::OIndexesHelper::appendObject(), and getBooleanDataSourceSetting().
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().
|
static |
Definition at line 1214 of file dbtools.cxx.
References connectRowset(), DBG_UNHANDLED_EXCEPTION, Exception, dbtools::StatementComposer::getComposer(), dbtools::StatementComposer::getQuery(), getString(), dbtools::StatementComposer::setDisposeComposer(), dbtools::StatementComposer::setFilter(), dbtools::StatementComposer::setHavingClause(), and dbtools::StatementComposer::setOrder().
Referenced by getCurrentSettingsComposer().
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)
css::uno::RuntimeException |
Reference< XConnection > dbtools::getConnection | ( | const Reference< XRowSet > & | _rxRowSet | ) |
Definition at line 348 of file dbtools.cxx.
Referenced by dbtools::ParameterManager::cacheConnectionInfo(), connectivity::dbase::ODbaseTables::createDescriptor(), connectivity::hsqldb::OTables::createDescriptor(), connectivity::hsqldb::HViews::createDescriptor(), connectivity::mysql::OViews::createDescriptor(), connectivity::evoab::OEvoabTables::createObject(), connectivity::macab::MacabTables::createObject(), connectivity::calc::OCalcTables::createObject(), connectivity::dbase::ODbaseTables::createObject(), connectivity::flat::OFlatTables::createObject(), connectivity::hsqldb::OTables::createObject(), connectivity::writer::OWriterTables::createObject(), connectivity::hsqldb::HViews::createView(), connectivity::mysql::OViews::createView(), connectivity::dbase::ODbaseTables::dropObject(), connectivity::hsqldb::OTables::dropObject(), connectivity::hsqldb::HViews::dropObject(), connectivity::mysql::OViews::dropObject(), and dbtools::ParameterManager::fillParameterValues().
|
static |
Definition at line 264 of file dbtools.cxx.
References Any, Exception, getDataSource_allowException(), connectivity::OMetaConnection::getPropMap(), and PROPERTY_ID_PASSWORD.
Referenced by getConnection_withFeedback(), and lcl_connectRowSet().
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 | ||
) |
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.
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 ...)
Reference< XSingleSelectQueryComposer > dbtools::getCurrentSettingsComposer | ( | const Reference< XPropertySet > & | _rxRowSetProps, |
const Reference< XComponentContext > & | _rxContext, | ||
const Reference< XWindow > & | _rxParent | ||
) |
Definition at line 1264 of file dbtools.cxx.
References Exception, getComposedRowSetStatement(), and TOOLS_WARN_EXCEPTION.
Referenced by dbtools::ParameterManager::getParentColumns(), and dbtools::ParameterManager::initializeComposerByComponent().
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
_rsUrl | The URL used to connect to the database. |
_xConnection | The connection used to find the correct driver. |
_rxContext | Used to create the drivermanager. |
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.
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource > dbtools::getDataSource | ( | const OUString & | _rsDataSourceName, |
const css::uno::Reference< css::uno::XComponentContext > & | _rxContext | ||
) |
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().
|
static |
Definition at line 236 of file dbtools.cxx.
References ENSURE_OR_RETURN.
Referenced by getConnection_allowException(), and getDataSource().
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
_rxDataSource | a data source component |
_pAsciiSettingsName | the ASCII name of the setting to obtain |
_rSettingsValue | the value of the setting, upon successful return |
OOO_DLLPUBLIC_DBTOOLS bool dbtools::getDataSourceSetting | ( | const css::uno::Reference< css::uno::XInterface > & | _rxDataSource, |
const OUString & | _sSettingsName, | ||
css::uno::Any & | _rSettingsValue | ||
) |
bool dbtools::getDataSourceSetting | ( | const Reference< XInterface > & | _rxDataSource, |
const char * | _pAsciiSettingsName, | ||
Any & | _rSettingsValue | ||
) |
Definition at line 619 of file dbtools2.cxx.
References getDataSourceSetting().
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().
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 | ||
) |
sal_Int32 dbtools::getDefaultNumberFormat | ( | const Reference< XPropertySet > & | _xColumn, |
const Reference< XNumberFormatTypes > & | _xTypes, | ||
const Locale & | _rLocale | ||
) |
Definition at line 115 of file dbtools.cxx.
References Exception, getDefaultNumberFormat(), and nDataType.
Referenced by connectivity::OSQLParser::extractDate(), and getDefaultNumberFormat().
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 | ||
) |
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.
OOO_DLLPUBLIC_DBTOOLS OUString dbtools::getDefaultReportEngineServiceName | ( | const css::uno::Reference< css::uno::XComponentContext > & | _rxFactory | ) |
OUString dbtools::getDefaultReportEngineServiceName | ( | const Reference< XComponentContext > & | _rxORB | ) |
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:
_rxConnection | the connection relative to which the to-be-examined object exists |
_nCommandType | the type of the object |
_rCommand | the object. This may be a table name, a query name, or an SQL statement, depending on the value of <arg>_nCommandType</arg> |
_pErrorInfo | If 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. |
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().
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:
_rxConnection | the connection relative to which the to-be-examined object exists |
_nCommandType | the type of the object |
_rCommand | the object. This may be a table name, a query name, or an SQL statement, depending on the value of <arg>_nCommandType</arg> |
_rxCollectionOner | If (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.
_pErrorInfo | If 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. |
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().
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
_rxConn | the connection for which the formatter is requested |
_bAllowDefault | if 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. |
_rxFactory | required (only of _bAllowDefault is sal_True) for creating the DatabaseEnvironment. |
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().
Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw | ( | const Any & | i_aTable | ) |
Definition at line 487 of file dbtools.cxx.
References getPrimaryKeyColumns_throw().
Referenced by connectivity::OColumnsHelper::createObject(), createSDBCXColumn(), and getPrimaryKeyColumns_throw().
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
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess > dbtools::getPrimaryKeyColumns_throw | ( | const css::uno::Reference< css::beans::XPropertySet > & | i_xTable | ) |
Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw | ( | const Reference< XPropertySet > & | i_xTable | ) |
Definition at line 493 of file dbtools.cxx.
References dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), i, nCount, and PROPERTY_ID_TYPE.
OOO_DLLPUBLIC_DBTOOLS sal_Int32 dbtools::getSearchColumnFlag | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConn, |
sal_Int32 | _nDataType | ||
) |
sal_Int32 dbtools::getSearchColumnFlag | ( | const Reference< XConnection > & | _rxConn, |
sal_Int32 | _nDataType | ||
) |
Definition at line 1363 of file dbtools.cxx.
OOO_DLLPUBLIC_DBTOOLS OUString dbtools::getStandardSQLState | ( | StandardSQLState | _eState | ) |
returns a standard error string for a given SQLState
_eState | describes the state whose description is to retrieve. Must not be SQL_ERROR_UNSPECIFIED. |
RuntimeException | in 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().
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
Reference< XNameAccess > dbtools::getTableFields | ( | const Reference< XConnection > & | _rxConn, |
const OUString & | _rName | ||
) |
Definition at line 481 of file dbtools.cxx.
References getFieldsByCommandDescriptor().
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
_xMetaData | The meta data. |
_sCatalog | contains the catalog name |
_sSchema | contains the schema name |
_sTable | contains the table name |
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().
|
static |
Definition at line 803 of file dbtools.cxx.
References quoteName().
Referenced by composeTableName(), composeTableNameForSelect(), and quoteTableName().
|
static |
Definition at line 152 of file dbconversion.cxx.
References comphelper::date::convertDateToDaysNormalizing().
Referenced by addDays(), subDays(), and dbtools::DBTypeConversion::toDays().
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.
_rxParameters | the interface to forward all setXXX calls to (except setObject) |
_nColumnIndex | the column index to update |
_rValue | the value to update |
bool dbtools::implSetObject | ( | const Reference< XParameters > & | _rxParameters, |
const sal_Int32 | _nColumnIndex, | ||
const Any & | _rValue | ||
) |
Definition at line 1516 of file dbtools.cxx.
References implSetObject(), nValue, o3tl::tryAccess(), and xStream.
Referenced by implSetObject(), connectivity::evoab::OEvoabPreparedStatement::setObject(), connectivity::macab::MacabPreparedStatement::setObject(), and connectivity::java_sql_PreparedStatement::setObject().
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.
_rxUpdatedObject | the interface to forward all updateXXX calls to (except updateObject) |
_nColumnIndex | the column index to update |
_rValue | the value to update |
bool dbtools::implUpdateObject | ( | const Reference< XRowUpdate > & | _rxUpdatedObject, |
const sal_Int32 | _nColumnIndex, | ||
const Any & | _rValue | ||
) |
Definition at line 1427 of file dbtools.cxx.
References implUpdateObject(), nValue, o3tl::tryAccess(), and xStream.
Referenced by implUpdateObject(), and connectivity::java_sql_ResultSet::updateObject().
OOO_DLLPUBLIC_DBTOOLS bool dbtools::isAggregateColumn | ( | const css::uno::Reference< css::beans::XPropertySet > & | _xColumn | ) |
is this column an aggregate?
_xColumn |
OOO_DLLPUBLIC_DBTOOLS bool dbtools::isAggregateColumn | ( | const css::uno::Reference< css::container::XNameAccess > & | _xColumns, |
const OUString & | _sName | ||
) |
is this column an aggregate?
_xColumns | collection of columns look for column sName in there |
_sName | name of the column |
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?
_xComposer | a query composer that knows the field by name |
_xField | the field |
bool dbtools::isAggregateColumn | ( | const Reference< XNameAccess > & | _xColumns, |
const OUString & | _sName | ||
) |
Definition at line 983 of file dbtools2.cxx.
References isAggregateColumn().
bool dbtools::isAggregateColumn | ( | const Reference< XPropertySet > & | _xColumn | ) |
Definition at line 994 of file dbtools2.cxx.
References u.
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().
|
static |
Definition at line 168 of file CommonTools.cxx.
Referenced by convertName2SQLName(), and isValidSQLName().
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
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().
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)
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().
OOO_DLLPUBLIC_DBTOOLS bool dbtools::isValidSQLName | ( | const OUString & | _rName, |
std::u16string_view | _rSpecials | ||
) |
checks whether the given name is a valid SQL name
_rName | the string which should be converted |
_rSpecials |
Definition at line 176 of file CommonTools.cxx.
References isCharOk().
Referenced by convertName2SQLName().
|
static |
Definition at line 39 of file warningscontainer.cxx.
References dbtools::SQLExceptionIteratorHelper::hasMoreElements(), and dbtools::SQLExceptionIteratorHelper::next().
Referenced by dbtools::WarningsContainer::appendWarning(), and dbtools::WarningsContainer::getWarnings().
|
static |
Definition at line 360 of file dbtools.cxx.
References Any, Exception, findConnection(), getConnection_allowException(), connectivity::OMetaConnection::getPropMap(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), hasProperty(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), isEmbeddedInDatabase(), utl::SharedUNOComponent< css::sdbc::XConnection >::NoTakeOwnership, PROPERTY_ID_PASSWORD, utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::reset(), utl::SharedUNOComponent< css::sdbc::XConnection >::TakeOwnership, TOOLS_WARN_EXCEPTION, and u.
Referenced by connectRowset(), and ensureRowSetConnection().
|
static |
Definition at line 62 of file predicateinput.cxx.
Referenced by dbtools::OPredicateInputController::getSeparatorChars().
bool dbtools::operator== | ( | const OCharsetMap::CharsetIterator & | lhs, |
const OCharsetMap::CharsetIterator & | rhs | ||
) |
Definition at line 182 of file dbcharset.cxx.
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).
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().
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.
_rxConnMetaData | meta data describing the connection where you got the table name from |
_rQualifiedName | fully 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 |
_eComposeRule | where do you need the name for |
void dbtools::qualifiedNameComponents | ( | const Reference< XDatabaseMetaData > & | _rxConnMetaData, |
const OUString & | _rQualifiedName, | ||
OUString & | _rCatalog, | ||
OUString & | _rSchema, | ||
OUString & | _rName, | ||
EComposeRule | _eComposeRule | ||
) |
Definition at line 862 of file dbtools.cxx.
Referenced by connectivity::OIndexesHelper::appendObject(), connectivity::firebird::Views::createObject(), connectivity::mysqlc::Views::createObject(), connectivity::hsqldb::OTables::createObject(), connectivity::hsqldb::HViews::createObject(), connectivity::mysql::OViews::createObject(), connectivity::mysqlc::Tables::createObject(), createStandardKeyStatement(), connectivity::hsqldb::OTables::dropObject(), connectivity::hsqldb::OHSQLUser::findPrivilegesAndGrantPrivileges(), connectivity::mysql::OMySQLUser::findPrivilegesAndGrantPrivileges(), connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(), connectivity::OSQLParseTreeIterator::impl_locateRecordSource(), quoteTableName(), connectivity::hsqldb::OHSQLTable::rename(), connectivity::sdbcx::OTable::rename(), and connectivity::OTableHelper::rename().
OOO_DLLPUBLIC_DBTOOLS OUString dbtools::quoteName | ( | std::u16string_view | _rQuote, |
const OUString & | _rName | ||
) |
quote the given name with the given quote string.
Definition at line 224 of file CommonTools.cxx.
References sName.
Referenced by connectivity::hsqldb::OHSQLTable::alterColumnByName(), connectivity::mysql::OMySQLTable::alterColumnByName(), connectivity::mysql::OMySQLTable::alterColumnType(), connectivity::hsqldb::OHSQLTable::alterDefaultValue(), connectivity::mysql::OMySQLTable::alterDefaultValue(), connectivity::OIndexesHelper::appendObject(), connectivity::OKeysHelper::appendObject(), connectivity::hsqldb::OHSQLUser::changePassword(), dbtools::ParameterManager::createFilterConditionFromColumnLink(), connectivity::firebird::Tables::createStandardColumnPart(), createStandardColumnPart(), connectivity::hsqldb::OHSQLTable::dropDefaultValue(), connectivity::mysql::OMySQLTable::dropDefaultValue(), connectivity::hsqldb::OUsers::dropObject(), connectivity::OColumnsHelper::dropObject(), connectivity::OKeysHelper::dropObject(), connectivity::firebird::Keys::dropObject(), connectivity::hsqldb::OHSQLUser::grantPrivileges(), impl_doComposeTableName(), and connectivity::hsqldb::OHSQLUser::revokePrivileges().
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
OUString dbtools::quoteTableName | ( | const Reference< XDatabaseMetaData > & | _rxMeta, |
const OUString & | _rName, | ||
EComposeRule | _eComposeRule | ||
) |
Definition at line 853 of file dbtools.cxx.
References impl_doComposeTableName(), qualifiedNameComponents(), sCatalog, and sSchema.
Referenced by connectivity::OKeysHelper::appendObject(), dbtools::ParameterManager::createFilterConditionFromColumnLink(), connectivity::hsqldb::OHSQLUser::grantPrivileges(), connectivity::mysql::OMySQLUser::grantPrivileges(), connectivity::hsqldb::OHSQLUser::revokePrivileges(), and connectivity::mysql::OMySQLUser::revokePrivileges().
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
_xParams | the parameters where to set the value |
parameterIndex | the index of the parameter, 1 based |
x | the value to set |
sqlType | the corresponding sql type |
scale | the scale of the sql type can be 0 |
css::sdbc::SQLException | |
css::uno::RuntimeException |
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
_xParams | the parameters where to set the value |
parameterIndex | the index of the parameter, 1 based |
x | the value to set |
sqlType | the corresponding sql type |
scale | the scale of the sql type can be 0 |
css::sdbc::SQLException | |
css::uno::RuntimeException |
void dbtools::setObjectWithInfo | ( | const Reference< XParameters > & | _xParams, |
sal_Int32 | parameterIndex, | ||
const ::connectivity::ORowSetValue & | _rValue, | ||
sal_Int32 | sqlType, | ||
sal_Int32 | scale | ||
) |
Definition at line 1776 of file dbtools.cxx.
References Any, connectivity::SharedResources::getResourceStringWithSubstitution(), scale, throwGenericSQLException(), x, and xStream.
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().
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 | ||
) |
void dbtools::showError | ( | const SQLExceptionInfo & | _rInfo, |
const Reference< XWindow > & | _xParent, | ||
const Reference< XComponentContext > & | _rxContext | ||
) |
Definition at line 1409 of file dbtools.cxx.
References Exception, dbtools::SQLExceptionInfo::get(), and dbtools::SQLExceptionInfo::isValid().
|
static |
Definition at line 226 of file dbconversion.cxx.
References comphelper::date::convertDaysToDate(), and implRelativeToAbsoluteNull().
Referenced by dbtools::DBTypeConversion::toDate().
OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFeatureNotImplementedRuntimeException | ( | const OUString & | _rFeatureName, |
const css::uno::Reference< css::uno::XInterface > & | _rxContext | ||
) |
throw a RuntimeException (Optional feature not implemented)
_rFeatureName | a 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" |
_rxContext | the context of the exception |
css::uno::RuntimeException |
void dbtools::throwFeatureNotImplementedRuntimeException | ( | const OUString & | _rFeatureName, |
const Reference< XInterface > & | _rxContext | ||
) |
Definition at line 433 of file dbexception.cxx.
References connectivity::SharedResources::getResourceStringWithSubstitution().
Referenced by connectivity::sdbcx::OGroup::setName().
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)
_rFeatureName | a 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" |
_rxContext | the context of the exception |
css::sdbc::SQLException |
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().
OOO_DLLPUBLIC_DBTOOLS void dbtools::throwFunctionNotSupportedRuntimeException | ( | const OUString & | _rFunctionName, |
const css::uno::Reference< css::uno::XInterface > & | _rxContext | ||
) |
css::uno::RuntimeException |
Definition at line 391 of file dbexception.cxx.
References connectivity::SharedResources::getResourceStringWithSubstitution().
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
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().
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
css::sdbc::SQLException |
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().
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
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().
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
css::sdbc::SQLException |
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().
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)
_rColumnNameName | The column that couldn't be found. |
_rxContext | the context of the exception |
css::sdbc::SQLException |
void dbtools::throwInvalidColumnException | ( | const OUString & | _rColumnName, |
const Reference< XInterface > & | _rxContext | ||
) |
Definition at line 444 of file dbexception.cxx.
References COLUMN_NOT_FOUND, connectivity::SharedResources::getResourceStringWithSubstitution(), and throwSQLException().
Referenced by connectivity::evoab::OEvoabResultSet::findColumn(), connectivity::macab::MacabResultSet::findColumn(), pq_sdbc_driver::ResultSet::findColumn(), pq_sdbc_driver::SequenceResultSet::findColumn(), connectivity::ado::ODatabaseMetaDataResultSet::findColumn(), connectivity::ado::OResultSet::findColumn(), connectivity::ODatabaseMetaDataResultSet::findColumn(), connectivity::file::OResultSet::findColumn(), connectivity::odbc::ODatabaseMetaDataResultSet::findColumn(), connectivity::odbc::OResultSet::findColumn(), and connectivity::sdbcx::OCollection::findColumn().
OOO_DLLPUBLIC_DBTOOLS void dbtools::throwInvalidIndexException | ( | const css::uno::Reference< css::uno::XInterface > & | Context, |
const css::uno::Any & | Next = css::uno::Any() |
||
) |
throw an invalid index sqlexception
css::sdbc::SQLException |
Definition at line 361 of file dbexception.cxx.
References connectivity::SharedResources::getResourceString(), getStandardSQLState(), INVALID_DESCRIPTOR_INDEX, and Next.
Referenced by connectivity::macab::MacabPreparedStatement::checkAndResizeParameters(), connectivity::file::OPreparedStatement::checkAndResizeParameters(), connectivity::file::OResultSetMetaData::checkColumnIndex(), connectivity::ODatabaseMetaDataResultSet::checkIndex(), connectivity::file::OResultSet::checkIndex(), connectivity::odbc::OPreparedStatement::checkParameterIndex(), connectivity::macab::MacabResultSetMetaData::getColumnType(), and connectivity::ado::ADOS::getField().
OOO_DLLPUBLIC_DBTOOLS void dbtools::throwSQLException | ( | const OUString & | _rMessage, |
const OUString & | _rSQLState, | ||
const css::uno::Reference< css::uno::XInterface > & | _rxContext, | ||
const sal_Int32 | _nErrorCode | ||
) |
css::sdbc::SQLException |
void dbtools::throwSQLException | ( | const OUString & | _rMessage, |
const OUString & | _rSQLState, | ||
const Reference< XInterface > & | _rxContext, | ||
const sal_Int32 | _nErrorCode | ||
) |
Definition at line 453 of file dbexception.cxx.
References Any.
Referenced by connectivity::firebird::OPreparedStatement::checkParameterIndex(), connectivity::mysqlc::OResultSet::checkRowIndex(), connectivity::firebird::OPreparedStatement::setDouble(), connectivity::firebird::OPreparedStatement::setString(), connectivity::firebird::OPreparedStatement::setValue(), throwInvalidColumnException(), and throwSQLException().
OOO_DLLPUBLIC_DBTOOLS void dbtools::throwSQLException | ( | const OUString & | _rMessage, |
StandardSQLState | _eSQLState, | ||
const css::uno::Reference< css::uno::XInterface > & | _rxContext, | ||
const sal_Int32 | _nErrorCode = 0 |
||
) |
css::sdbc::SQLException |
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().
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
_rxOld | the source property set |
_rxNew | the destination property set |
_rLocale | the locale for converting number related properties |
void dbtools::TransferFormComponentProperties | ( | const Reference< XPropertySet > & | xOldProps, |
const Reference< XPropertySet > & | xNewProps, | ||
const Locale & | _rLocale | ||
) |
Definition at line 930 of file dbtools.cxx.
References Any, Exception, getDouble(), getINT32(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), hasProperty(), Property, PROPERTY_ID_DEFAULTVALUE, PROPERTY_ID_FORMATKEY, dbtools::DBTypeConversion::toDate(), TOOLS_WARN_EXCEPTION, dbtools::DBTypeConversion::toTime(), and u.
|
constexpr |