2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2020-09-13 12:02:57 +00:00
|
|
|
#pragma once
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2017-08-28 15:49:36 +02:00
|
|
|
#include <sal/config.h>
|
|
|
|
|
|
|
|
#include <atomic>
|
|
|
|
#include <cstddef>
|
|
|
|
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <apitools.hxx>
|
2007-07-06 06:52:06 +00:00
|
|
|
#include "RowSetBase.hxx"
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XConnection.hpp>
|
2004-10-22 07:54:48 +00:00
|
|
|
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
|
2000-09-18 23:16:46 +00:00
|
|
|
#include <com/sun/star/sdb/XResultSetAccess.hpp>
|
2000-12-06 08:55:44 +00:00
|
|
|
#include <com/sun/star/sdbc/XRowSetListener.hpp>
|
2000-09-18 23:16:46 +00:00
|
|
|
#include <com/sun/star/sdbc/XRowUpdate.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XParameters.hpp>
|
|
|
|
#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
|
|
|
|
#include <com/sun/star/util/XCancellable.hpp>
|
|
|
|
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
|
2000-10-31 14:21:51 +00:00
|
|
|
#include <com/sun/star/sdb/XCompletedExecution.hpp>
|
2007-07-06 06:52:06 +00:00
|
|
|
#include <com/sun/star/sdb/XParametersSupplier.hpp>
|
2010-02-15 09:53:53 +01:00
|
|
|
#include <com/sun/star/sdb/XRowsChangeBroadcaster.hpp>
|
2004-11-17 13:42:08 +00:00
|
|
|
|
2010-02-15 09:53:53 +01:00
|
|
|
#include <cppuhelper/compbase12.hxx>
|
2016-07-01 09:46:23 +02:00
|
|
|
#include <cppuhelper/basemutex.hxx>
|
2021-11-28 09:44:42 +02:00
|
|
|
#include <comphelper/interfacecontainer3.hxx>
|
2007-07-06 06:52:06 +00:00
|
|
|
#include <connectivity/paramwrapper.hxx>
|
|
|
|
#include <connectivity/FValue.hxx>
|
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
|
|
|
#include <connectivity/warningscontainer.hxx>
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
namespace dbaccess
|
|
|
|
{
|
2015-08-03 09:14:58 +02:00
|
|
|
typedef ::cppu::WeakAggComponentImplHelper12 < css::sdb::XResultSetAccess
|
|
|
|
, css::sdb::XRowSetApproveBroadcaster
|
|
|
|
, css::sdb::XRowsChangeBroadcaster
|
|
|
|
, css::sdbcx::XDeleteRows
|
|
|
|
, css::sdbc::XParameters
|
|
|
|
, css::lang::XEventListener
|
|
|
|
, css::sdbc::XResultSetUpdate
|
|
|
|
, css::sdbc::XRowUpdate
|
|
|
|
, css::util::XCancellable
|
|
|
|
, css::sdb::XCompletedExecution
|
|
|
|
, css::sdb::XParametersSupplier
|
|
|
|
, css::sdbc::XWarningsSupplier
|
2007-07-06 06:52:06 +00:00
|
|
|
> ORowSet_BASE1;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2000-11-03 13:42:50 +00:00
|
|
|
class OTableContainer;
|
2017-11-06 11:11:04 +02:00
|
|
|
class ORowSet final : public cppu::BaseMutex
|
2000-11-22 13:58:32 +00:00
|
|
|
, public ORowSet_BASE1
|
2000-09-18 23:16:46 +00:00
|
|
|
, public ORowSetBase
|
2000-10-11 10:21:40 +00:00
|
|
|
, public ::comphelper::OPropertyArrayUsageHelper<ORowSet>
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
friend class ORowSetClone;
|
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::sdbc::XConnection > m_xOldConnection;
|
|
|
|
css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection;
|
|
|
|
css::uno::Any m_aActiveConnection;
|
|
|
|
css::uno::Reference< css::container::XNameAccess > m_xTypeMap;
|
|
|
|
css::uno::Any m_aTypeMap;
|
|
|
|
css::uno::Reference< css::sdbc::XPreparedStatement > m_xStatement;
|
|
|
|
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposer;
|
|
|
|
css::uno::Reference< css::container::XNameAccess > m_xColumns; // the columns from a table or query
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2002-12-05 13:10:11 +00:00
|
|
|
connectivity::OWeakRefArray m_aClones;
|
2007-07-06 06:52:06 +00:00
|
|
|
/** our parameters as XPropertySet instances and ORowSetValue instances
|
|
|
|
*/
|
|
|
|
::dbtools::param::ParametersContainerRef m_pParameters;
|
|
|
|
/** our parameters values, used when we do not yet have a parameters container
|
|
|
|
(since we have not been executed, yet)
|
|
|
|
*/
|
2015-08-05 10:48:40 +02:00
|
|
|
rtl::Reference<ORowSetValueVector> m_aPrematureParamValues;
|
|
|
|
rtl::Reference<ORowSetValueVector> m_aParameterValueForCache;
|
2017-02-17 19:06:24 +02:00
|
|
|
std::vector<bool> m_aParametersSet;
|
|
|
|
std::vector<bool> m_aReadOnlyDataColumns;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2021-11-28 09:44:42 +02:00
|
|
|
::comphelper::OInterfaceContainerHelper3<css::sdbc::XRowSetListener> m_aRowsetListeners;
|
|
|
|
::comphelper::OInterfaceContainerHelper3<css::sdb::XRowSetApproveListener> m_aApproveListeners;
|
|
|
|
::comphelper::OInterfaceContainerHelper3<css::sdb::XRowsChangeListener> m_aRowsChangeListener;
|
2001-08-06 10:01:19 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
|
|
|
::dbtools::WarningsContainer m_aWarnings;
|
|
|
|
|
2021-09-23 15:03:45 +01:00
|
|
|
// no Reference! see OCollection::acquire
|
2021-09-23 08:53:17 +01:00
|
|
|
std::unique_ptr<OTableContainer> m_xTables;
|
2000-11-03 13:42:50 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString m_aCommand;
|
|
|
|
OUString m_aDataSourceName;
|
|
|
|
OUString m_aURL;
|
|
|
|
OUString m_aUser;
|
|
|
|
OUString m_aPassword;
|
|
|
|
OUString m_aFilter;
|
|
|
|
OUString m_aHavingClause;
|
|
|
|
OUString m_aGroupBy;
|
|
|
|
OUString m_aOrder;
|
|
|
|
OUString m_aActiveCommand;
|
|
|
|
OUString m_aUpdateCatalogName; // is set by a query
|
|
|
|
OUString m_aUpdateSchemaName; // is set by a query
|
|
|
|
OUString m_aUpdateTableName; // is set by a query
|
we just want to append to the caught exception and rethrow it
try and avoid using cppu::throwException due to asan
AddressSanitizer:DEADLYSIGNAL
=================================================================
==571495==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f0af1cee04c bp 0x7ffc0fa694f0 sp 0x7ffc0fa69298 T0)
==571495==The signal is caused by a READ memory access.
==571495==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x7f0af1cee04c (<unknown module>)
#1 0xab690cf in dbtools::SQLExceptionInfo::doThrow() connectivity/source/commontools/dbexception.cxx:240:9
#2 0xa5e0a26 in dbaccess::ORowSet::impl_ensureStatement_throw() dbaccess/source/core/api/RowSet.cxx:1661:16
#3 0xa5e0d80 in dbaccess::ORowSet::impl_prepareAndExecute_throw() dbaccess/source/core/api/RowSet.cxx:1667:5
#4 0xa5d33c4 in dbaccess::ORowSet::execute_NoApprove_NoNewConn(osl::ResettableGuard<osl::Mutex>&) dbaccess/source/core/api/RowSet.cxx:1800:45
#5 0xa5d0a10 in dbaccess::ORowSet::execute() dbaccess/source/core/api/RowSet.cxx:1556:5
#6 0x6eae94 in ScDocShell::DBaseImport(rtl::OUString const&, unsigned short, std::__1::map<short, ScColWidthParam, std::__1::less<short>, std::__1::allocator<std::__1::pair<short const, ScColWidthParam> > >&, ScFlatBoolRowSegments&) sc/source/ui/docshell/docsh8.cxx:316:18
#7 0x65ba78 in TestImportDBF sc/source/ui/docshell/docsh.cxx:3448:33
#8 0x627912 in LLVMFuzzerTestOneInput vcl/workben/dbffuzzer.cxx:49:11
#9 0x53fe23 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) cxa_noexception.cpp
#10 0x53f61a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) cxa_noexception.cpp
#11 0x540ccb in fuzzer::Fuzzer::MutateAndTestOne() cxa_noexception.cpp
#12 0x5416f5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) cxa_noexception.cpp
#13 0x5325ce in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) cxa_noexception.cpp
#14 0x557582 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#15 0x7f0af28b90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
seen in oss-fuzz build with
clang version 14.0.0 (https://github.com/llvm/llvm-project.git 0e03450ae4358e8a8242b73d493d96efea9d3ccf)
Change-Id: I0d676e10d7749ab331870b3d763e8f0bbefa18c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122571
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-24 11:03:34 +01:00
|
|
|
OUString m_sErrorString;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
sal_Int32 m_nFetchDirection;
|
|
|
|
sal_Int32 m_nFetchSize;
|
|
|
|
sal_Int32 m_nMaxFieldSize;
|
|
|
|
sal_Int32 m_nMaxRows;
|
|
|
|
sal_Int32 m_nQueryTimeOut;
|
|
|
|
sal_Int32 m_nCommandType;
|
|
|
|
sal_Int32 m_nTransactionIsolation;
|
|
|
|
sal_Int32 m_nPrivileges;
|
2006-01-25 14:10:07 +00:00
|
|
|
sal_Int32 m_nLastKnownRowCount;
|
2017-08-28 15:49:36 +02:00
|
|
|
std::atomic<std::size_t> m_nInAppend;
|
2016-03-17 14:51:06 +00:00
|
|
|
bool m_bInsertingRow;
|
2015-08-03 09:14:58 +02:00
|
|
|
bool m_bLastKnownRowCountFinal;
|
|
|
|
bool m_bUseEscapeProcessing ;
|
|
|
|
bool m_bApplyFilter ;
|
|
|
|
bool m_bCommandFacetsDirty; // any of the facets which define the active command is dirty
|
2013-12-16 04:16:54 +01:00
|
|
|
bool m_bParametersDirty; // parameters changed since execute
|
2015-08-03 09:14:58 +02:00
|
|
|
bool m_bModified ;
|
|
|
|
bool m_bRebuildConnOnExecute ;
|
|
|
|
bool m_bIsBookmarkable ;
|
|
|
|
bool m_bNew ;
|
|
|
|
bool m_bCanUpdateInsertedRows;
|
|
|
|
bool m_bOwnConnection;
|
|
|
|
bool m_bPropChangeNotifyEnabled;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2007-07-06 06:52:06 +00:00
|
|
|
/** builds m_aActiveCommand from our settings
|
|
|
|
|
|
|
|
@return
|
|
|
|
whether we should use escape processing before executing the actual command. This is determined
|
|
|
|
from our own EscapeProcessing property, and possibly overruled by the respective property
|
|
|
|
of a query we're based on.
|
|
|
|
*/
|
2014-04-17 11:16:55 +02:00
|
|
|
bool impl_buildActiveCommand_throw();
|
2007-07-06 06:52:06 +00:00
|
|
|
|
|
|
|
/** initializes our query composer, and everything which has to do with it
|
2006-07-10 14:03:25 +00:00
|
|
|
|
2007-07-06 06:52:06 +00:00
|
|
|
If we don't use escape processing, then we don't have a composer, and everything
|
|
|
|
related to it. Nonetheless, _out_rCommandToExecute and the return value are properly
|
|
|
|
initialized.
|
2006-07-10 14:03:25 +00:00
|
|
|
|
2007-07-06 06:52:06 +00:00
|
|
|
@param _out_rCommandToExecute
|
|
|
|
The command which is to be executed, according to the current settings -
|
|
|
|
it is built from our active command plus our current filter/order criterions.
|
|
|
|
|
2006-07-10 14:03:25 +00:00
|
|
|
@precond
|
|
|
|
m_xActiveConnection points to a valid SDB-level connection
|
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
@throws css::sdb::SQLException
|
2019-04-10 16:04:39 +00:00
|
|
|
if a database-related error occurred
|
2007-07-06 06:52:06 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
@throws css::uno::RuntimeException
|
|
|
|
if any of the components involved throws a css::uno::RuntimeException
|
2006-07-10 14:03:25 +00:00
|
|
|
*/
|
2016-01-11 08:40:36 +02:00
|
|
|
void impl_initComposer_throw( OUString& _out_rCommandToExecute );
|
2006-07-10 14:03:25 +00:00
|
|
|
|
2006-08-04 12:55:25 +00:00
|
|
|
/** returns the table container of our active connection
|
|
|
|
|
|
|
|
If our connection is able to provide a tables container, this one is returned.
|
|
|
|
Else, if m_pTables is not <NULL/>, this one will returned.
|
|
|
|
Else, m_pTables will be constructed and returned.
|
|
|
|
|
|
|
|
@precond m_xActiveConnection is not <NULL/>
|
2015-08-03 09:14:58 +02:00
|
|
|
@throws css::sdbc::SQLException
|
2006-08-04 12:55:25 +00:00
|
|
|
if retrieving or constructing the tables container goes wrong
|
|
|
|
|
|
|
|
@see impl_resetTables_nothrow
|
|
|
|
*/
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::container::XNameAccess >
|
2006-08-04 12:55:25 +00:00
|
|
|
impl_getTables_throw();
|
|
|
|
|
|
|
|
/** cleans up m_pTables, and resets it to <NULL/>
|
|
|
|
*/
|
|
|
|
void impl_resetTables_nothrow();
|
|
|
|
|
2006-07-10 14:03:25 +00:00
|
|
|
/** prepares and executes our command
|
|
|
|
*/
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::sdbc::XResultSet >
|
2006-07-10 14:03:25 +00:00
|
|
|
impl_prepareAndExecute_throw();
|
2015-05-30 14:33:16 +02:00
|
|
|
void impl_ensureStatement_throw();
|
2006-07-10 14:03:25 +00:00
|
|
|
|
2017-01-19 17:58:58 +01:00
|
|
|
/// @throws css::sdbc::SQLException
|
|
|
|
/// @throws css::uno::RuntimeException
|
2017-01-26 12:28:58 +01:00
|
|
|
css::uno::Reference< css::sdbc::XConnection > calcConnection(const css::uno::Reference< css::task::XInteractionHandler >& _rxHandler);
|
2007-07-06 06:52:06 +00:00
|
|
|
// free clones and ParseTree. Plus, if _bComplete is <TRUE/>, *all* other associated resources
|
|
|
|
void freeResources( bool _bComplete );
|
2000-09-29 14:23:36 +00:00
|
|
|
|
2006-01-25 14:10:07 +00:00
|
|
|
/// informs the clones (and ourself) that we are going to delete a record with a given bookmark
|
2015-08-03 09:14:58 +02:00
|
|
|
void notifyRowSetAndClonesRowDelete( const css::uno::Any& _rBookmark );
|
2006-01-25 14:10:07 +00:00
|
|
|
|
|
|
|
/// inform the clones (and ourself) that we have deleted a record with a given bookmark
|
2015-08-03 09:14:58 +02:00
|
|
|
void notifyRowSetAndClonesRowDeleted( const css::uno::Any& _rBookmark, sal_Int32 _nPos );
|
2006-01-25 14:10:07 +00:00
|
|
|
|
2001-01-22 06:38:24 +00:00
|
|
|
void checkUpdateIterator();
|
2001-07-30 07:53:02 +00:00
|
|
|
const connectivity::ORowSetValue& getInsertValue(sal_Int32 columnIndex);
|
2001-07-24 12:25:26 +00:00
|
|
|
void setParameter(sal_Int32 parameterIndex, const connectivity::ORowSetValue& x);
|
2012-01-18 12:31:06 +01:00
|
|
|
// resizes the parameter vector if necessary
|
2007-07-06 06:52:06 +00:00
|
|
|
::connectivity::ORowSetValue& getParameterStorage( sal_Int32 parameterIndex );
|
|
|
|
|
2001-07-24 12:25:26 +00:00
|
|
|
void updateValue(sal_Int32 columnIndex,const connectivity::ORowSetValue& x);
|
2001-06-26 09:12:41 +00:00
|
|
|
void checkUpdateConditions(sal_Int32 columnIndex);
|
2010-02-15 09:53:53 +01:00
|
|
|
void impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard);
|
|
|
|
// set all data columns to writeable
|
|
|
|
void impl_setDataColumnsWriteable_throw();
|
|
|
|
// restore the old state of the data column read-only state
|
|
|
|
void impl_restoreDataColumnsWriteable_throw();
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const css::uno::Any& rValue) override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue,sal_Int32 nHandle) const override;
|
|
|
|
virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, css::uno::Any& _rDefault ) const override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void fireRowcount() override;
|
2015-08-03 09:14:58 +02:00
|
|
|
void notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const css::sdb::RowChangeEvent &rEvt);
|
|
|
|
void notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,const css::sdb::RowsChangeEvent& rEvt);
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) override;
|
|
|
|
virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard) override;
|
2018-03-29 11:21:02 +02:00
|
|
|
// notify all that rowset changed
|
2018-03-28 08:47:51 +02:00
|
|
|
void notifyAllListeners(::osl::ResettableMutexGuard& _rGuard);
|
2000-09-29 14:23:36 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void doCancelModification( ) override;
|
|
|
|
virtual bool isModification( ) override;
|
|
|
|
virtual bool isModified( ) override;
|
|
|
|
virtual bool isNew( ) override;
|
|
|
|
virtual bool isPropertyChangeNotificationEnabled() const override;
|
2002-12-05 08:53:00 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ORowSet() override;
|
2005-09-05 07:57:19 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
public:
|
2015-06-22 15:44:52 +01:00
|
|
|
explicit ORowSet(const css::uno::Reference<css::uno::XComponentContext>&);
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::lang::XTypeProvider
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::uno::XInterface
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
|
2021-04-30 08:20:03 +02:00
|
|
|
virtual void SAL_CALL acquire() noexcept override;
|
|
|
|
virtual void SAL_CALL release() noexcept override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::uno::XAggregation
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::lang::XServiceInfo
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName( ) override;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
|
|
|
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// OComponentHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL disposing() override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::lang::XEventListener
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbc::XCloseable
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL close( ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2000-10-11 10:21:40 +00:00
|
|
|
// comphelper::OPropertyArrayUsageHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// cppu::OPropertySetHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbc::XResultSet
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL refreshRow( ) override;
|
2000-09-29 14:23:36 +00:00
|
|
|
|
2000-10-31 14:21:51 +00:00
|
|
|
// XCompletedExecution
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL executeWithCompletion( const css::uno::Reference< css::task::XInteractionHandler >& handler ) override;
|
2000-10-31 14:21:51 +00:00
|
|
|
|
2007-07-06 06:52:06 +00:00
|
|
|
// XParametersSupplier
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters( ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XRow
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL wasNull( ) override;
|
|
|
|
virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) override;
|
|
|
|
virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) override;
|
|
|
|
virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) override;
|
|
|
|
virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) override;
|
|
|
|
virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) override;
|
|
|
|
virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) override;
|
|
|
|
virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) override;
|
|
|
|
virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XRowUpdate
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
|
|
|
|
virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) override;
|
|
|
|
virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) override;
|
|
|
|
virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
|
|
|
|
virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
|
|
|
|
virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
|
|
|
|
virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) override;
|
|
|
|
virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) override;
|
|
|
|
virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
|
|
|
|
virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
|
|
|
|
virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::Date& x ) override;
|
|
|
|
virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
|
|
|
|
virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x ) override;
|
|
|
|
virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
|
|
|
|
virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
|
|
|
|
virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const css::uno::Any& x ) override;
|
|
|
|
virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XResultSetUpdate
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL insertRow( ) override;
|
|
|
|
virtual void SAL_CALL updateRow( ) override;
|
|
|
|
virtual void SAL_CALL deleteRow( ) override;
|
|
|
|
virtual void SAL_CALL cancelRowUpdates( ) override;
|
|
|
|
virtual void SAL_CALL moveToInsertRow( ) override;
|
|
|
|
virtual void SAL_CALL moveToCurrentRow( ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XRowSet
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL execute( ) override;
|
|
|
|
virtual void SAL_CALL addRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
|
|
|
|
virtual void SAL_CALL removeRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdb::XRowSetApproveBroadcaster
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL addRowSetApproveListener( const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener ) override;
|
|
|
|
virtual void SAL_CALL removeRowSetApproveListener( const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdb::XRowsChangeBroadcaster
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL addRowsChangeListener( const css::uno::Reference< css::sdb::XRowsChangeListener >& listener ) override;
|
|
|
|
virtual void SAL_CALL removeRowsChangeListener( const css::uno::Reference< css::sdb::XRowsChangeListener >& listener ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdb::XResultSetAccess
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL createResultSet( ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::util::XCancellable
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL cancel( ) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbcx::XDeleteRows
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const css::uno::Sequence< css::uno::Any >& rows ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// XParameters
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) override;
|
|
|
|
virtual void SAL_CALL setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) override;
|
|
|
|
virtual void SAL_CALL setBoolean( sal_Int32 parameterIndex, sal_Bool x ) override;
|
|
|
|
virtual void SAL_CALL setByte( sal_Int32 parameterIndex, sal_Int8 x ) override;
|
|
|
|
virtual void SAL_CALL setShort( sal_Int32 parameterIndex, sal_Int16 x ) override;
|
|
|
|
virtual void SAL_CALL setInt( sal_Int32 parameterIndex, sal_Int32 x ) override;
|
|
|
|
virtual void SAL_CALL setLong( sal_Int32 parameterIndex, sal_Int64 x ) override;
|
|
|
|
virtual void SAL_CALL setFloat( sal_Int32 parameterIndex, float x ) override;
|
|
|
|
virtual void SAL_CALL setDouble( sal_Int32 parameterIndex, double x ) override;
|
|
|
|
virtual void SAL_CALL setString( sal_Int32 parameterIndex, const OUString& x ) override;
|
|
|
|
virtual void SAL_CALL setBytes( sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
|
|
|
|
virtual void SAL_CALL setDate( sal_Int32 parameterIndex, const css::util::Date& x ) override;
|
|
|
|
virtual void SAL_CALL setTime( sal_Int32 parameterIndex, const css::util::Time& x ) override;
|
|
|
|
virtual void SAL_CALL setTimestamp( sal_Int32 parameterIndex, const css::util::DateTime& x ) override;
|
|
|
|
virtual void SAL_CALL setBinaryStream( sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
|
|
|
|
virtual void SAL_CALL setCharacterStream( sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
|
|
|
|
virtual void SAL_CALL setObject( sal_Int32 parameterIndex, const css::uno::Any& x ) override;
|
|
|
|
virtual void SAL_CALL setObjectWithInfo( sal_Int32 parameterIndex, const css::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) override;
|
|
|
|
virtual void SAL_CALL setRef( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef >& x ) override;
|
|
|
|
virtual void SAL_CALL setBlob( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob >& x ) override;
|
|
|
|
virtual void SAL_CALL setClob( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob >& x ) override;
|
|
|
|
virtual void SAL_CALL setArray( sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray >& x ) override;
|
|
|
|
virtual void SAL_CALL clearParameters( ) override;
|
2000-10-31 14:21:51 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
|
|
|
// XWarningsSupplier
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL getWarnings( ) override;
|
|
|
|
virtual void SAL_CALL clearWarnings( ) override;
|
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
|
|
|
|
2000-10-31 14:21:51 +00:00
|
|
|
/** implement the <method>execute</method>, without calling the approve listeners and without building a new
|
|
|
|
connection
|
|
|
|
@param _rClearForNotification mutex to clear before doing the final notifications
|
|
|
|
*/
|
2002-08-13 10:13:00 +00:00
|
|
|
void execute_NoApprove_NoNewConn(::osl::ResettableMutexGuard& _rClearForNotification);
|
2000-10-31 14:21:51 +00:00
|
|
|
|
|
|
|
/** call the RowSetApproveListeners<p/>
|
2017-01-19 17:58:58 +01:00
|
|
|
@throws css::sdb::RowSetVetoException if one of the listeners vetoed
|
|
|
|
@throws css::uno::RuntimeException
|
2000-10-31 14:21:51 +00:00
|
|
|
*/
|
2017-01-26 12:28:58 +01:00
|
|
|
void approveExecution();
|
2001-04-12 08:32:26 +00:00
|
|
|
|
|
|
|
/// set m_xActiveConnection, fire a PropertyChangeEvent if necessary, do the event listener handling etc
|
2017-07-31 12:26:12 +02:00
|
|
|
void setActiveConnection( css::uno::Reference< css::sdbc::XConnection > const & _rxNewConn, bool _bFireEvent = true );
|
2002-12-05 08:53:00 +00:00
|
|
|
|
2014-06-05 08:14:35 +02:00
|
|
|
void implCancelRowUpdates( bool _bNotifyModified );
|
2005-03-10 15:31:10 +00:00
|
|
|
|
|
|
|
/** sets the given result set type/concurrency at the given statement, while respecting
|
|
|
|
possibly related data source settings
|
|
|
|
*/
|
|
|
|
void setStatementResultSetType(
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::beans::XPropertySet >& _rxStatement,
|
2005-03-10 15:31:10 +00:00
|
|
|
sal_Int32 _nDesiredResultSetType,
|
|
|
|
sal_Int32 _nDesiredResultSetConcurrency
|
|
|
|
);
|
2006-06-20 01:35:46 +00:00
|
|
|
|
2006-10-18 12:25:49 +00:00
|
|
|
/** initializes a given RowSet column with the ColumnSettings (width, format, hidden, etc.) from a
|
|
|
|
template column.
|
|
|
|
|
|
|
|
If the template column supports any of the known column settings, they're plain copied. If not,
|
|
|
|
the template column is examined for a TableName and Name property, and the table column described
|
|
|
|
by those is used to find and copy the column settings.
|
|
|
|
*/
|
|
|
|
void impl_initializeColumnSettings_nothrow(
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::beans::XPropertySet >& _rxTemplateColumn,
|
|
|
|
const css::uno::Reference< css::beans::XPropertySet >& _rxRowSetColumn
|
2006-10-18 12:25:49 +00:00
|
|
|
);
|
|
|
|
|
2007-07-06 06:52:06 +00:00
|
|
|
/** initializes our parameters container (m_pParameters) according to the parameter columns as
|
|
|
|
obtained from our composer
|
|
|
|
*/
|
|
|
|
void impl_initParametersContainer_nothrow();
|
|
|
|
/** disposes our parameters container
|
|
|
|
*/
|
|
|
|
void impl_disposeParametersContainer_nothrow();
|
|
|
|
|
2006-06-20 01:35:46 +00:00
|
|
|
using ORowSetBase::getFastPropertyValue;
|
|
|
|
using ORowSetBase::firePropertyChange;
|
|
|
|
using ORowSetBase::doCancelModification;
|
|
|
|
using ORowSetBase::isModification;
|
|
|
|
using ORowSetBase::isModified;
|
|
|
|
using ORowSetBase::isNew;
|
2000-09-18 23:16:46 +00:00
|
|
|
};
|
2000-10-31 14:21:51 +00:00
|
|
|
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
// ORowSetClone
|
2014-02-25 18:11:51 +01:00
|
|
|
|
2016-07-01 09:46:23 +02:00
|
|
|
class ORowSetClone : public cppu::BaseMutex
|
2000-09-18 23:16:46 +00:00
|
|
|
,public OSubComponent
|
2000-11-22 13:58:32 +00:00
|
|
|
,public ORowSetBase
|
2000-10-11 10:21:40 +00:00
|
|
|
,public ::comphelper::OPropertyArrayUsageHelper < ORowSetClone >
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2001-01-24 08:52:19 +00:00
|
|
|
ORowSet* m_pParent;
|
2000-09-18 23:16:46 +00:00
|
|
|
sal_Int32 m_nFetchDirection;
|
|
|
|
sal_Int32 m_nFetchSize;
|
2014-04-17 11:16:55 +02:00
|
|
|
bool m_bIsBookmarkable;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
protected:
|
2000-09-29 14:23:36 +00:00
|
|
|
// the clone can not insert anything
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void doCancelModification( ) override;
|
|
|
|
virtual bool isModification( ) override;
|
|
|
|
virtual bool isModified( ) override;
|
|
|
|
virtual bool isNew( ) override;
|
2002-12-05 08:53:00 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const css::uno::Any& rValue) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
public:
|
2013-03-19 13:08:47 +02:00
|
|
|
ORowSetClone( const css::uno::Reference<css::uno::XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ORowSetClone() override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::lang::XTypeProvider
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
|
2000-12-06 08:55:44 +00:00
|
|
|
{
|
2014-03-10 13:08:29 +01:00
|
|
|
return css::uno::Sequence<sal_Int8>();
|
2000-12-06 08:55:44 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::uno::XInterface
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
|
2021-04-30 08:20:03 +02:00
|
|
|
virtual void SAL_CALL acquire() noexcept override;
|
|
|
|
virtual void SAL_CALL release() noexcept override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::lang::XServiceInfo
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName( ) override;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
|
|
|
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// OComponentHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL disposing() override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbc::XCloseable
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL close( ) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::beans::XPropertySet
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
|
|
|
|
}
|
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbc::XRowSet
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL execute( ) override;
|
|
|
|
virtual void SAL_CALL addRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
|
|
|
|
virtual void SAL_CALL removeRowSetListener( const css::uno::Reference< css::sdbc::XRowSetListener >& listener ) override;
|
2006-01-25 14:10:07 +00:00
|
|
|
|
2000-10-11 10:21:40 +00:00
|
|
|
// comphelper::OPropertyArrayUsageHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// cppu::OPropertySetHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
|
2006-06-20 01:35:46 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
using ORowSetBase::doCancelModification;
|
|
|
|
using ORowSetBase::isModification;
|
|
|
|
using ORowSetBase::isModified;
|
|
|
|
using ORowSetBase::isNew;
|
|
|
|
using ORowSetBase::rowDeleted;
|
2000-09-18 23:16:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|