LibreOffice Module connectivity (master) 1
Namespaces | Functions
dbtools.cxx File Reference
#include <connectivity/CommonTools.hxx>
#include <TConnection.hxx>
#include <ParameterCont.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdb/BooleanComparisonMode.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/ErrorMessageDialog.hpp>
#include <com/sun/star/sdb/ParametersRequest.hpp>
#include <com/sun/star/sdb/RowSetVetoException.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/sdb/XParametersSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
#include <com/sun/star/sdbc/ConnectionPool.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbc/XRowUpdate.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/NumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/property.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/types.hxx>
#include <connectivity/conncleanup.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/statementcomposer.hxx>
#include <o3tl/any.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <tools/stream.hxx>
#include <cppuhelper/implbase.hxx>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
#include <algorithm>
#include <iterator>
#include <set>
Include dependency graph for dbtools.cxx:

Go to the source code of this file.

Namespaces

namespace  dbtools
 
namespace  connectivity
 
namespace  connectivity::dbase
 

Functions

sal_Int32 dbtools::getDefaultNumberFormat (const Reference< XPropertySet > &_xColumn, const Reference< XNumberFormatTypes > &_xTypes, const Locale &_rLocale)
 
sal_Int32 dbtools::getDefaultNumberFormat (sal_Int32 _nDataType, sal_Int32 _nScale, bool _bIsCurrency, const Reference< XNumberFormatTypes > &_xTypes, const Locale &_rLocale)
 
static Reference< XConnection > dbtools::findConnection (const Reference< XInterface > &xParent)
 
static Reference< XDataSource > dbtools::getDataSource_allowException (const OUString &_rsTitleOrPath, const Reference< XComponentContext > &_rxContext)
 
Reference< XDataSource > dbtools::getDataSource (const OUString &_rsTitleOrPath, const Reference< XComponentContext > &_rxContext)
 
static Reference< XConnection > dbtools::getConnection_allowException (const OUString &_rsTitleOrPath, const OUString &_rsUser, const OUString &_rsPwd, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > dbtools::getConnection_withFeedback (const OUString &_rDataSourceName, const OUString &_rUser, const OUString &_rPwd, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > dbtools::getConnection (const Reference< XRowSet > &_rxRowSet)
 
static SharedConnection dbtools::lcl_connectRowSet (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, bool _bAttachAutoDisposer, const Reference< XWindow > &_rxParent)
 
Reference< XConnection > dbtools::connectRowset (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
SharedConnection dbtools::ensureRowSetConnection (const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XNameAccess > dbtools::getTableFields (const Reference< XConnection > &_rxConn, const OUString &_rName)
 
Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw (const Any &i_aTable)
 
Reference< XNameAccess > dbtools::getPrimaryKeyColumns_throw (const Reference< XPropertySet > &i_xTable)
 
Reference< XNameAccess > dbtools::getFieldsByCommandDescriptor (const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, Reference< XComponent > &_rxKeepFieldsAlive, SQLExceptionInfo *_pErrorInfo)
 
Sequence< OUString > dbtools::getFieldNamesByCommandDescriptor (const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, SQLExceptionInfo *_pErrorInfo)
 
SQLException dbtools::prependErrorInfo (const SQLException &_rChainedException, const Reference< XInterface > &_rxContext, const OUString &_rAdditionalError, const StandardSQLState _eSQLState)
 
static OUString dbtools::impl_doComposeTableName (const Reference< XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
 
OUString dbtools::quoteTableName (const Reference< XDatabaseMetaData > &_rxMeta, const OUString &_rName, EComposeRule _eComposeRule)
 
void dbtools::qualifiedNameComponents (const Reference< XDatabaseMetaData > &_rxConnMetaData, const OUString &_rQualifiedName, OUString &_rCatalog, OUString &_rSchema, OUString &_rName, EComposeRule _eComposeRule)
 
Reference< XNumberFormatsSupplier > dbtools::getNumberFormats (const Reference< XConnection > &_rxConn, bool _bAlloweDefault, const Reference< XComponentContext > &_rxContext)
 
void dbtools::TransferFormComponentProperties (const Reference< XPropertySet > &xOldProps, const Reference< XPropertySet > &xNewProps, const Locale &_rLocale)
 
bool dbtools::canInsert (const Reference< XPropertySet > &_rxCursorSet)
 
bool dbtools::canUpdate (const Reference< XPropertySet > &_rxCursorSet)
 
bool dbtools::canDelete (const Reference< XPropertySet > &_rxCursorSet)
 
Reference< XDataSource > dbtools::findDataSource (const Reference< XInterface > &_xParent)
 
static Reference< XSingleSelectQueryComposer > dbtools::getComposedRowSetStatement (const Reference< XPropertySet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
Reference< XSingleSelectQueryComposer > dbtools::getCurrentSettingsComposer (const Reference< XPropertySet > &_rxRowSetProps, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
 
OUString dbtools::composeTableName (const Reference< XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
 
OUString dbtools::composeTableNameForSelect (const Reference< XConnection > &_rxConnection, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName)
 
OUString dbtools::composeTableNameForSelect (const Reference< XConnection > &_rxConnection, const Reference< XPropertySet > &_xTable)
 
OUString dbtools::composeTableName (const Reference< XDatabaseMetaData > &_xMetaData, const Reference< XPropertySet > &_xTable, EComposeRule _eComposeRule, bool _bQuote)
 
sal_Int32 dbtools::getSearchColumnFlag (const Reference< XConnection > &_rxConn, sal_Int32 _nDataType)
 
OUString dbtools::createUniqueName (const Sequence< OUString > &_rNames, const OUString &_rBaseName, bool _bStartWithNumber)
 
OUString dbtools::createUniqueName (const Reference< XNameAccess > &_rxContainer, const OUString &_rBaseName, bool _bStartWithNumber)
 
void dbtools::showError (const SQLExceptionInfo &_rInfo, const Reference< XWindow > &_xParent, const Reference< XComponentContext > &_rxContext)
 
bool dbtools::implUpdateObject (const Reference< XRowUpdate > &_rxUpdatedObject, const sal_Int32 _nColumnIndex, const Any &_rValue)
 
bool dbtools::implSetObject (const Reference< XParameters > &_rxParameters, const sal_Int32 _nColumnIndex, const Any &_rValue)
 
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)
 
void dbtools::setObjectWithInfo (const Reference< XParameters > &_xParams, sal_Int32 parameterIndex, const Any &x, sal_Int32 sqlType, sal_Int32 scale)
 
void dbtools::setObjectWithInfo (const Reference< XParameters > &_xParams, sal_Int32 parameterIndex, const ::connectivity::ORowSetValue &_rValue, sal_Int32 sqlType, sal_Int32 scale)
 
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 More...
 
void connectivity::checkDisposed (bool _bThrow)
 
OSQLColumns::const_iterator connectivity::find (const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
 
OSQLColumns::const_iterator connectivity::findRealName (const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
 
OSQLColumns::const_iterator connectivity::find (OSQLColumns::const_iterator first, const OSQLColumns::const_iterator &last, const OUString &_rProp, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
 
bool connectivity::dbase::dbfDecodeCharset (rtl_TextEncoding &_out_nCharset, sal_uInt8 nType, sal_uInt8 nCodepage)
 decode a DBase file's codepage byte to a RTL charset More...
 
bool connectivity::dbase::dbfReadCharset (rtl_TextEncoding &nCharSet, SvStream *dbf_Stream)
 decode a DBase file's codepage byte to a RTL charset More...
 

Variable Documentation

◆ bCatalogs

const bool bCatalogs

Definition at line 753 of file dbtools.cxx.

◆ bSchemas

const bool bSchemas

Definition at line 754 of file dbtools.cxx.

◆ m_aSet

std::vector<bool, std::allocator<bool> > m_aSet
private

Definition at line 1626 of file dbtools.cxx.

◆ m_xSource

Reference<XIndexAccess> m_xSource
private

Definition at line 1627 of file dbtools.cxx.