LibreOffice Module connectivity (master) 1
dbtools.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_CONNECTIVITY_DBTOOLS_HXX
21#define INCLUDED_CONNECTIVITY_DBTOOLS_HXX
22
23#include <sal/config.h>
24
25#include <string_view>
26
32
33namespace com::sun::star {
34
35namespace sdb {
36 class XSingleSelectQueryComposer;
37}
38namespace sdbcx {
39 class XTablesSupplier;
40}
41namespace sdbc {
42 class XConnection;
43 class XDatabaseMetaData;
44 class XRowSet;
45 class XDataSource;
46 class SQLException;
47 class XParameters;
48 class XRowUpdate;
49}
50namespace beans {
51 class XPropertySet;
52}
53namespace awt {
54 class XWindow;
55}
56namespace lang {
57 struct Locale;
58}
59namespace container {
60 class XNameAccess;
61}
62namespace uno {
63 class XComponentContext;
64}
65namespace util {
66 class XNumberFormatTypes;
67 class XNumberFormatsSupplier;
68}
69namespace task {
71}
72
73}
74
75class SvStream;
76
77namespace dbtools
78{
79 class ISQLStatementHelper;
80 typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection;
81
82 enum class EComposeRule
83 {
90 };
91
92 // date conversion
93
94 // calculates the default numberformat for a given datatype and a give language
96 sal_Int32 getDefaultNumberFormat(const css::uno::Reference< css::beans::XPropertySet >& _xColumn,
97 const css::uno::Reference< css::util::XNumberFormatTypes >& _xTypes,
98 const css::lang::Locale& _rLocale);
99
100 // calculates the default numberformat for a given datatype and a give language
101 // @param _nDataType @see com.sun.star.sdbc.DataType
102 // @param _nScale can be zero
104 sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType,
105 sal_Int32 _nScale,
106 bool _bIsCurrency,
107 const css::uno::Reference< css::util::XNumberFormatTypes >& _xTypes,
108 const css::lang::Locale& _rLocale);
109
110
146 css::uno::Reference< css::sdbc::XConnection> connectRowset(
147 const css::uno::Reference< css::sdbc::XRowSet>& _rxRowSet,
148 const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
149 const css::uno::Reference< css::awt::XWindow>& _rxParent
150 );
151
171 const css::uno::Reference< css::sdbc::XRowSet>& _rxRowSet,
172 const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
173 const css::uno::Reference< css::awt::XWindow>& _rxParent
174 );
175
180 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection> getConnection(const css::uno::Reference< css::sdbc::XRowSet>& _rxRowSet);
181 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XConnection> getConnection_withFeedback(
182 const OUString& _rDataSourceName,
183 const OUString& _rUser,
184 const OUString& _rPwd,
185 const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
186 const css::uno::Reference< css::awt::XWindow>& _rxParent);
187
188
193 const css::uno::Reference< css::uno::XInterface >& _rxComponent,
194 css::uno::Reference< css::sdbc::XConnection >& _rxActualConnection
195 );
196
199 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getTableFields(
200 const css::uno::Reference< css::sdbc::XConnection>& _rxConn,
201 const OUString& _rName
202 );
203
206 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getPrimaryKeyColumns_throw(
207 const css::uno::Any& i_aTable
208 );
209 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getPrimaryKeyColumns_throw(
210 const css::uno::Reference< css::beans::XPropertySet >& i_xTable
211 );
212
253 css::uno::Reference< css::container::XNameAccess >
255 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
256 const sal_Int32 _nCommandType,
257 const OUString& _rCommand,
258 css::uno::Reference< css::lang::XComponent >& _rxKeepFieldsAlive,
259 SQLExceptionInfo* _pErrorInfo = nullptr
260 );
261
262
290 OOO_DLLPUBLIC_DBTOOLS css::uno::Sequence< OUString >
292 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
293 const sal_Int32 _nCommandType,
294 const OUString& _rCommand,
295 SQLExceptionInfo* _pErrorInfo = nullptr
296 );
297
298
303 css::sdbc::SQLException prependErrorInfo(
304 const css::sdbc::SQLException& _rChainedException,
305 const css::uno::Reference< css::uno::XInterface >& _rxContext,
306 const OUString& _rAdditionalError,
308
311 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource> findDataSource(const css::uno::Reference< css::uno::XInterface >& _xParent);
312
321 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
322 const char* _pAsciiSettingName
323 );
325 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
326 const OUString& rSettingName
327 );
328
335 bool isDataSourcePropertyEnabled(const css::uno::Reference< css::uno::XInterface>& _xProp,
336 const OUString& _sProperty,
337 bool _bDefault);
338
355 const css::uno::Reference< css::uno::XInterface >& _rxDataSource,
356 const char* _pAsciiSettingsName,
357 css::uno::Any& /* [out] */ _rSettingsValue
358 );
361 const css::uno::Reference< css::uno::XInterface >& _rxDataSource,
362 const OUString& _sSettingsName,
363 css::uno::Any& /* [out] */ _rSettingsValue
364 );
365
366 OOO_DLLPUBLIC_DBTOOLS OUString getDefaultReportEngineServiceName(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
367
370 OOO_DLLPUBLIC_DBTOOLS OUString quoteName(std::u16string_view _rQuote, const OUString& _rName);
371
375 OUString quoteTableName(const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _rxMeta
376 , const OUString& _rName
377 ,EComposeRule _eComposeRule);
378
387 OOO_DLLPUBLIC_DBTOOLS void qualifiedNameComponents(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxConnMetaData,
388 const OUString& _rQualifiedName, OUString& _rCatalog, OUString& _rSchema, OUString& _rName,EComposeRule _eComposeRule);
389
398 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::util::XNumberFormatsSupplier> getNumberFormats(
399 const css::uno::Reference< css::sdbc::XConnection>& _rxConn,
400 bool _bAllowDefault = false,
401 const css::uno::Reference< css::uno::XComponentContext>& _rxContext = css::uno::Reference< css::uno::XComponentContext>()
402 );
403
412 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdb::XSingleSelectQueryComposer > getCurrentSettingsComposer(
413 const css::uno::Reference< css::beans::XPropertySet>& _rxRowSetProps,
414 const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
415 const css::uno::Reference< css::awt::XWindow>& _rxParent
416 );
417
424 const css::uno::Reference< css::beans::XPropertySet>& _rxOld,
425 const css::uno::Reference< css::beans::XPropertySet>& _rxNew,
426 const css::lang::Locale& _rLocale
427 );
428
432 OOO_DLLPUBLIC_DBTOOLS bool canInsert(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet);
436 OOO_DLLPUBLIC_DBTOOLS bool canUpdate(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet);
440 OOO_DLLPUBLIC_DBTOOLS bool canDelete(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet);
441
442
445 OOO_DLLPUBLIC_DBTOOLS OUString composeTableName( const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxMetaData,
446 const OUString& _rCatalog,
447 const OUString& _rSchema,
448 const OUString& _rName,
449 bool _bQuote,
450 EComposeRule _eComposeRule);
451
459 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
460 const OUString& _rCatalog,
461 const OUString& _rSchema,
462 const OUString& _rName );
463
471 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
472 const css::uno::Reference< css::beans::XPropertySet>& _xTable );
473
481 const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData,
482 const css::uno::Reference< css::beans::XPropertySet>& _xTable,
483 EComposeRule _eComposeRule,
484 bool _bQuote);
485
486
487 OOO_DLLPUBLIC_DBTOOLS sal_Int32 getSearchColumnFlag( const css::uno::Reference< css::sdbc::XConnection>& _rxConn,
488 sal_Int32 _nDataType);
489 // return the datasource for the given datasource name
490 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource> getDataSource(const OUString& _rsDataSourceName,
491 const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
492
504 OUString createUniqueName(const css::uno::Reference< css::container::XNameAccess>& _rxContainer,
505 const OUString& _rBaseName,
506 bool _bStartWithNumber = true);
507
511 const css::uno::Sequence< OUString >& _rNames,
512 const OUString& _rBaseName,
513 bool _bStartWithNumber
514 );
515
522 OOO_DLLPUBLIC_DBTOOLS OUString convertName2SQLName(const OUString& _rName, std::u16string_view _rSpecials);
523
531 OOO_DLLPUBLIC_DBTOOLS bool isValidSQLName( const OUString& _rName, std::u16string_view _rSpecials );
532
534 void showError( const SQLExceptionInfo& _rInfo,
535 const css::uno::Reference< css::awt::XWindow>& _pParent,
536 const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
537
551 bool implUpdateObject( const css::uno::Reference< css::sdbc::XRowUpdate >& _rxUpdatedObject,
552 const sal_Int32 _nColumnIndex,
553 const css::uno::Any& _rValue);
554
555
562 void askForParameters( const css::uno::Reference< css::sdb::XSingleSelectQueryComposer >& _xComposer,
563 const css::uno::Reference< css::sdbc::XParameters>& _xParameters,
564 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
565 const css::uno::Reference< css::task::XInteractionHandler >& _rxHandler,
566 const ::std::vector<bool, std::allocator<bool> >& _aParametersSet = ::std::vector<bool, std::allocator<bool> >());
567
578 void setObjectWithInfo( const css::uno::Reference< css::sdbc::XParameters>& _xParameters,
579 sal_Int32 parameterIndex,
580 const css::uno::Any& x,
581 sal_Int32 sqlType,
582 sal_Int32 scale=0);
583
594 void setObjectWithInfo( const css::uno::Reference< css::sdbc::XParameters>& _xParameters,
595 sal_Int32 parameterIndex,
596 const ::connectivity::ORowSetValue& x,
597 sal_Int32 sqlType,
598 sal_Int32 scale);
599
600
614 bool implSetObject( const css::uno::Reference< css::sdbc::XParameters>& _rxParameters,
615 const sal_Int32 _nColumnIndex,
616 const css::uno::Any& _rValue);
617
627 OUString createStandardCreateStatement( const css::uno::Reference< css::beans::XPropertySet >& descriptor,
628 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
629 ISQLStatementHelper* _pHelper,
630 std::u16string_view _sCreatePattern);
631
639 OUString createStandardKeyStatement( const css::uno::Reference< css::beans::XPropertySet >& descriptor,
640 const css::uno::Reference< css::sdbc::XConnection>& _xConnection);
641
651 OUString createStandardTypePart( const css::uno::Reference< css::beans::XPropertySet >& descriptor
652 ,const css::uno::Reference< css::sdbc::XConnection>& _xConnection
653 ,std::u16string_view _sCreatePattern = {});
654
666 OUString createStandardColumnPart( const css::uno::Reference< css::beans::XPropertySet >& descriptor
667 ,const css::uno::Reference< css::sdbc::XConnection>& _xConnection
668 ,ISQLStatementHelper* _pHelper = nullptr
669 ,std::u16string_view _sCreatePattern = {});
670
682 OUString createSqlCreateTableStatement( const css::uno::Reference< css::beans::XPropertySet >& descriptor
683 ,const css::uno::Reference< css::sdbc::XConnection>& _xConnection);
684
702 css::uno::Reference< css::beans::XPropertySet>
703 createSDBCXColumn( const css::uno::Reference< css::beans::XPropertySet>& _xTable,
704 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
705 const OUString& _rName,
706 bool _bCase,
707 bool _bQueryForInfo,
708 bool _bIsAutoIncrement,
709 bool _bIsCurrency,
710 sal_Int32 _nDataType);
711
722 OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbcx::XTablesSupplier> getDataDefinitionByURLAndConnection(
723 const OUString& _rsUrl,
724 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
725 const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
726
738 sal_Int32 getTablePrivileges(const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData,
739 const OUString& _sCatalog,
740 const OUString& _sSchema,
741 const OUString& _sTable);
742
743 typedef ::std::pair<bool,bool> TBoolPair;
744 typedef ::std::pair< TBoolPair,sal_Int32 > ColumnInformation;
745 typedef ::std::multimap< OUString, ColumnInformation, ::comphelper::UStringMixLess> ColumnInformationMap;
758 void collectColumnInformation( const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
759 std::u16string_view _sComposedTableName,
760 std::u16string_view _rName,
761 ColumnInformationMap& _rInfo);
762
763
777 std::u16string_view _rExpression,
778 const bool _bValue,
779 const sal_Int32 _nBooleanComparisonMode,
780 OUStringBuffer& _out_rSQLPredicate
781 );
782
791 const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xComposer,
792 const css::uno::Reference< css::beans::XPropertySet > &_xField
793 );
794
803 const css::uno::Reference< css::container::XNameAccess > &_xColumns,
804 const OUString &_sName
805 );
806
812 const css::uno::Reference< css::beans::XPropertySet > &_xColumn
813 );
814
815} // namespace dbtools
816
817namespace connectivity
818{
819namespace dbase
820{
821 enum DBFType { dBaseIII = 0x03,
822 dBaseIV = 0x04,
823 dBaseV = 0x05,
825 VisualFoxProAuto = 0x31, // Visual FoxPro with AutoIncrement field
826 dBaseFS = 0x43,
831 FoxProMemo = 0xF5
832 };
833
846 OOO_DLLPUBLIC_DBTOOLS bool dbfDecodeCharset(rtl_TextEncoding &_out_nCharset, sal_uInt8 nType, sal_uInt8 nCodepage);
847
860 OOO_DLLPUBLIC_DBTOOLS bool dbfReadCharset(rtl_TextEncoding &nCharSet, SvStream* dbf_Stream);
861
862} // namespace connectivity::dbase
863} // namespace connectivity
864
865#endif // INCLUDED_CONNECTIVITY_DBTOOLS_HXX
866
867/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_DBTOOLS
class SAL_NO_VTABLE XPropertySet
bool dbfReadCharset(rtl_TextEncoding &nCharSet, SvStream *dbf_Stream)
decode a DBase file's codepage byte to a RTL charset
Definition: dbtools.cxx:2052
bool dbfDecodeCharset(rtl_TextEncoding &_out_encoding, sal_uInt8 nType, sal_uInt8 nCodepage)
decode a DBase file's codepage byte to a RTL charset
Definition: dbtools.cxx:1989
sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData > &_xMetaData, const OUString &_sCatalog, const OUString &_sSchema, const OUString &_sTable)
Definition: dbtools2.cxx:676
::std::pair< bool, bool > TBoolPair
Definition: dbtools.hxx:743
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)
Definition: dbtools.cxx:1673
OUString createSqlCreateTableStatement(const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection)
Definition: dbtools2.cxx:371
OUString createStandardCreateStatement(const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection, ISQLStatementHelper *_pHelper, std::u16string_view _sCreatePattern)
Definition: dbtools2.cxx:204
SQLException prependErrorInfo(const SQLException &_rChainedException, const Reference< XInterface > &_rxContext, const OUString &_rAdditionalError, const StandardSQLState _eSQLState)
Definition: dbtools.cxx:741
Reference< XNameAccess > getFieldsByCommandDescriptor(const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, Reference< XComponent > &_rxKeepFieldsAlive, SQLExceptionInfo *_pErrorInfo)
Definition: dbtools.cxx:532
bool getDataSourceSetting(const Reference< XInterface > &_xChild, const OUString &_sAsciiSettingsName, Any &_rSettingsValue)
Definition: dbtools2.cxx:594
OUString composeTableName(const Reference< XDatabaseMetaData > &_rxMetaData, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName, bool _bQuote, EComposeRule _eComposeRule)
Definition: dbtools.cxx:1286
OUString quoteTableName(const Reference< XDatabaseMetaData > &_rxMeta, const OUString &_rName, EComposeRule _eComposeRule)
Definition: dbtools.cxx:853
OUString createStandardTypePart(const Reference< XPropertySet > &xColProp, const Reference< XConnection > &_xConnection, std::u16string_view _sCreatePattern)
Definition: dbtools2.cxx:67
Reference< XConnection > connectRowset(const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
Definition: dbtools.cxx:470
Reference< XConnection > getConnection(const Reference< XRowSet > &_rxRowSet)
Definition: dbtools.cxx:348
StandardSQLState
standard SQLStates to be used with an SQLException
OUString createUniqueName(const Sequence< OUString > &_rNames, const OUString &_rBaseName, bool _bStartWithNumber)
Definition: dbtools.cxx:1382
OUString createStandardColumnPart(const Reference< XPropertySet > &xColProp, const Reference< XConnection > &_xConnection, ISQLStatementHelper *_pHelper, std::u16string_view _sCreatePattern)
Definition: dbtools2.cxx:169
void TransferFormComponentProperties(const Reference< XPropertySet > &xOldProps, const Reference< XPropertySet > &xNewProps, const Locale &_rLocale)
Definition: dbtools.cxx:930
bool implSetObject(const Reference< XParameters > &_rxParameters, const sal_Int32 _nColumnIndex, const Any &_rValue)
Definition: dbtools.cxx:1516
bool canDelete(const Reference< XPropertySet > &_rxCursorSet)
Definition: dbtools.cxx:1192
SharedConnection ensureRowSetConnection(const Reference< XRowSet > &_rxRowSet, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
Definition: dbtools.cxx:476
Reference< XTablesSupplier > getDataDefinitionByURLAndConnection(const OUString &_rsUrl, const Reference< XConnection > &_xConnection, const Reference< XComponentContext > &_rxContext)
Definition: dbtools2.cxx:651
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)
Definition: dbtools2.cxx:516
Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer(const Reference< XPropertySet > &_rxRowSetProps, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
Definition: dbtools.cxx:1264
sal_Int32 getSearchColumnFlag(const Reference< XConnection > &_rxConn, sal_Int32 _nDataType)
Definition: dbtools.cxx:1363
OUString createStandardKeyStatement(const Reference< XPropertySet > &descriptor, const Reference< XConnection > &_xConnection)
Definition: dbtools2.cxx:267
bool canUpdate(const Reference< XPropertySet > &_rxCursorSet)
Definition: dbtools.cxx:1187
sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet > &_xColumn, const Reference< XNumberFormatTypes > &_xTypes, const Locale &_rLocale)
Definition: dbtools.cxx:115
void qualifiedNameComponents(const Reference< XDatabaseMetaData > &_rxConnMetaData, const OUString &_rQualifiedName, OUString &_rCatalog, OUString &_rSchema, OUString &_rName, EComposeRule _eComposeRule)
Definition: dbtools.cxx:862
bool isDataSourcePropertyEnabled(const Reference< XInterface > &_xProp, const OUString &_sProperty, bool _bDefault)
Definition: dbtools2.cxx:626
bool isAggregateColumn(const Reference< XSingleSelectQueryComposer > &_xParser, const Reference< XPropertySet > &_xField)
Definition: dbtools2.cxx:971
OUString getDefaultReportEngineServiceName(const Reference< XComponentContext > &_rxORB)
Definition: dbtools2.cxx:940
bool isValidSQLName(const OUString &rName, std::u16string_view _rSpecials)
checks whether the given name is a valid SQL name
OUString composeTableNameForSelect(const Reference< XConnection > &_rxConnection, const OUString &_rCatalog, const OUString &_rSchema, const OUString &_rName)
Definition: dbtools.cxx:1296
::std::multimap< OUString, ColumnInformation, ::comphelper::UStringMixLess > ColumnInformationMap
Definition: dbtools.hxx:745
void setObjectWithInfo(const Reference< XParameters > &_xParams, sal_Int32 parameterIndex, const Any &x, sal_Int32 sqlType, sal_Int32 scale)
Definition: dbtools.cxx:1765
void showError(const SQLExceptionInfo &_rInfo, const Reference< XWindow > &_xParent, const Reference< XComponentContext > &_rxContext)
Definition: dbtools.cxx:1409
OUString quoteName(std::u16string_view _rQuote, const OUString &_rName)
quote the given name with the given quote string.
void collectColumnInformation(const Reference< XConnection > &_xConnection, std::u16string_view _sComposedName, std::u16string_view _rName, ColumnInformationMap &_rInfo)
Definition: dbtools2.cxx:795
Reference< XConnection > getConnection_withFeedback(const OUString &_rDataSourceName, const OUString &_rUser, const OUString &_rPwd, const Reference< XComponentContext > &_rxContext, const Reference< XWindow > &_rxParent)
Definition: dbtools.cxx:327
::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection
Definition: dbtools.hxx:79
Reference< XNameAccess > getTableFields(const Reference< XConnection > &_rxConn, const OUString &_rName)
Definition: dbtools.cxx:481
EComposeRule
Definition: dbtools.hxx:83
bool getBooleanDataSourceSetting(const Reference< XConnection > &_rxConnection, const char *_pAsciiSettingName)
Definition: dbtools2.cxx:566
Reference< XNumberFormatsSupplier > getNumberFormats(const Reference< XConnection > &_rxConn, bool _bAlloweDefault, const Reference< XComponentContext > &_rxContext)
Definition: dbtools.cxx:908
OUString convertName2SQLName(const OUString &rName, std::u16string_view _rSpecials)
create a name which is a valid SQL 92 identifier name
bool canInsert(const Reference< XPropertySet > &_rxCursorSet)
Definition: dbtools.cxx:1182
Sequence< OUString > getFieldNamesByCommandDescriptor(const Reference< XConnection > &_rxConnection, const sal_Int32 _nCommandType, const OUString &_rCommand, SQLExceptionInfo *_pErrorInfo)
Definition: dbtools.cxx:721
Reference< XDataSource > getDataSource(const OUString &_rsTitleOrPath, const Reference< XComponentContext > &_rxContext)
Definition: dbtools.cxx:247
Reference< XDataSource > findDataSource(const Reference< XInterface > &_xParent)
Definition: dbtools.cxx:1197
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
Definition: dbtools.cxx:1904
bool isEmbeddedInDatabase(const Reference< XInterface > &_rxComponent, Reference< XConnection > &_rxActualConnection)
Definition: dbtools2.cxx:828
Reference< XNameAccess > getPrimaryKeyColumns_throw(const Any &i_aTable)
Definition: dbtools.cxx:487
bool implUpdateObject(const Reference< XRowUpdate > &_rxUpdatedObject, const sal_Int32 _nColumnIndex, const Any &_rValue)
Definition: dbtools.cxx:1427
::std::pair< TBoolPair, sal_Int32 > ColumnInformation
Definition: dbtools.hxx:744
sal_Int32 scale
Definition: pq_statics.cxx:62
unsigned char sal_uInt8