35#include <core_resource.hxx>
38#include <com/sun/star/beans/PropertyAttribute.hpp>
39#include <com/sun/star/lang/DisposedException.hpp>
40#include <com/sun/star/lang/XMultiServiceFactory.hpp>
41#include <com/sun/star/sdb/CommandType.hpp>
42#include <com/sun/star/sdb/DatabaseContext.hpp>
43#include <com/sun/star/sdb/ErrorCondition.hpp>
44#include <com/sun/star/sdb/RowChangeAction.hpp>
45#include <com/sun/star/sdb/RowSetVetoException.hpp>
46#include <com/sun/star/sdb/XCompletedConnection.hpp>
47#include <com/sun/star/sdb/XParametersSupplier.hpp>
48#include <com/sun/star/sdb/XQueriesSupplier.hpp>
49#include <com/sun/star/sdbc/FetchDirection.hpp>
50#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
51#include <com/sun/star/sdbc/ResultSetType.hpp>
52#include <com/sun/star/sdbc/XDataSource.hpp>
53#include <com/sun/star/sdbcx/Privilege.hpp>
54#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
90using namespace ::
cppu;
93extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
95 css::uno::Sequence<css::uno::Any>
const &)
97 return cppu::acquire(
new ORowSet(context));
111 ,m_nFetchDirection(FetchDirection::FORWARD)
117 ,m_nTransactionIsolation(0)
119 ,m_nLastKnownRowCount(0)
121 ,m_bInsertingRow(false)
122 ,m_bLastKnownRowCountFinal(false)
123 ,m_bUseEscapeProcessing(true)
124 ,m_bApplyFilter(false)
125 ,m_bCommandFacetsDirty( true )
126 ,m_bParametersDirty( true )
128 ,m_bRebuildConnOnExecute(false)
129 ,m_bIsBookmarkable(true)
131 ,m_bCanUpdateInsertedRows(true)
132 ,m_bOwnConnection(false)
133 ,m_bPropChangeNotifyEnabled(true)
140 sal_Int32
const nRBT = PropertyAttribute::READONLY | PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT;
141 sal_Int32
const nRT = PropertyAttribute::READONLY | PropertyAttribute::TRANSIENT;
142 sal_Int32
const nBT = PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT;
195 SAL_WARN(
"dbaccess",
"Please check who doesn't dispose this component!");
206 _rDefault <<= CommandType::COMMAND;
224 _rDefault <<= ResultSetType::SCROLL_INSENSITIVE;
227 _rDefault <<= ResultSetConcurrency::UPDATABLE;
230 _rDefault <<= FetchDirection::FORWARD;
233 _rDefault <<= static_cast<sal_Int32>(1);
239 _rDefault <<= sal_Int32( 0 );
248 _rDefault <<= OUString();
262 throw Exception(
"resultsettype is FORWARD_ONLY",
nullptr);
303 Reference< XConnection > xNewConn;
305 aNewConn <<= xNewConn;
328 Reference< XConnection > xNewConn;
330 aNewConn <<= xNewConn;
403 return css::uno::Sequence<sal_Int8>();
426 if (!aRet.hasValue())
434 return "com.sun.star.comp.dba.ORowSet";
451 OPropertyStateContainer::disposing();
454 EventObject aDisposeEvent;
455 aDisposeEvent.Source =
static_cast< XComponent*
>(
this);
466 Reference<XEventListener> xEvt;
468 xComponent->removeEventListener(xEvt);
487 Reference< XComponent > xComp(
clone.get(), UNO_QUERY);
516 try { ::comphelper::disposeComponent(
m_xComposer ); }
551 Reference<XEventListener> xListener;
553 xComponent->removeEventListener(xListener);
563 Any aNewConnection; aNewConnection <<= _rxNewConn;
574 fire(&
nHandle, &aNewConnection, &aOldConnection, 1,
false);
580 Reference<XEventListener> xListener;
582 xComponent->addEventListener(xListener);
590 Reference<XConnection> xCon(
Source.Source,UNO_QUERY);
596 Reference< XConnection > xXConnection;
607 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
616 Sequence< Property > aProps;
618 return new ::cppu::OPropertyArrayHelper(aProps);
629 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
631 ::osl::MutexGuard aGuard( *
m_pMutex );
645 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
647 ::osl::MutexGuard aGuard( *
m_pMutex );
720 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
721 ::osl::MutexGuard aGuard( *
m_pMutex );
726 Sequence<sal_Int8>
aSeq;
735 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
736 ::osl::MutexGuard aGuard( *
m_pMutex );
748 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
749 ::osl::MutexGuard aGuard( *
m_pMutex );
757 Reference<XPropertySet>
xColumn(
m_pColumns->getByIndex(columnIndex-1),UNO_QUERY);
758 sal_Int32 nColType = 0;
764 case DataType::TIMESTAMP:
769 if ( DataType::TIMESTAMP == nColType )
771 else if ( DataType::DATE == nColType )
781 if (!::dbtools::implUpdateObject(
this, columnIndex, aNewValue))
793 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
794 ::osl::MutexGuard aGuard( *
m_pMutex );
810 explicit ProtectFlag(
bool& rInsertingRow)
815 throw std::runtime_error(
"recursion in insertRow");
831 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
836 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
847 Sequence<Any> aChangedBookmarks;
848 RowsChangeEvent aEvt(*
this,RowChangeAction::INSERT,1,aChangedBookmarks);
851 std::vector< Any > aBookmarks;
852 bool bInserted =
m_pCache->insertRow(aBookmarks);
855 m_pCache->resetInsertRow(bInserted);
867 if ( !aBookmarks.empty() )
876 OSL_ENSURE( !
m_bModified,
"ORowSet::insertRow: just updated, but _still_ modified?" );
888 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
890 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
902 Sequence<Any> aChangedBookmarks;
903 RowsChangeEvent aEvt(*
this,RowChangeAction::UPDATE,1,aChangedBookmarks);
906 std::vector< Any > aBookmarks;
908 if ( !aBookmarks.empty() )
910 aEvt.Rows += aBookmarks.size();
916 if (
m_pCache->isResultSetChanged() )
934 OSL_ENSURE( !
m_bModified,
"ORowSet::updateRow: just updated, but _still_ modified?" );
941 ::dbtools::throwSQLException(
DBA_RES( RID_STR_UPDATE_FAILED ), StandardSQLState::INVALID_CURSOR_POSITION, *
this );
947 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
949 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
953 ::dbtools::throwSQLException(
DBA_RES( RID_STR_NO_DELETE_BEFORE_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *
this );
955 ::dbtools::throwSQLException(
DBA_RES( RID_STR_NO_DELETE_INSERT_ROW ), StandardSQLState::INVALID_CURSOR_POSITION, *
this );
957 ::dbtools::throwSQLException(
DBA_RES( RID_STR_RESULT_IS_READONLY ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *
this );
958 if ( (
m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE )
959 ::dbtools::throwSQLException(
DBA_RES( RID_STR_NO_DELETE_PRIVILEGE ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *
this );
961 ::dbtools::throwSQLException(
DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *
this );
966 sal_Int32 nDeletePosition =
m_pCache->getRow();
974 Sequence<Any> aChangedBookmarks;
975 RowsChangeEvent aEvt(*
this,RowChangeAction::DELETE,1,aChangedBookmarks);
998 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1000 ::osl::MutexGuard aGuard( *
m_pMutex );
1041 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1050 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1086 bool bCheck = std::all_of(aListenerSeq.rbegin(), aListenerSeq.rend(),
1087 [&aEvt](Reference<css::sdb::XRowSetApproveListener>& rxItem) {
1090 return static_cast<bool>(rxItem->approveCursorMove(aEvt));
1101void ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,
const RowChangeEvent &aEvt)
1105 bool bCheck = std::all_of(aListenerSeq.rbegin(), aListenerSeq.rend(),
1106 [&aEvt](Reference<css::sdb::XRowSetApproveListener>& rxItem) {
1109 return static_cast<bool>(rxItem->approveRowChange(aEvt));
1125 bool bCurrentRowCountFinal(
m_pCache->m_bRowCountFinal );
1132 fire(&
nHandle,&aNew,&aOld,1,
false);
1139 aNew <<= bCurrentRowCountFinal;
1141 fire(&
nHandle,&aNew,&aOld,1,
false);
1148 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1150 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
1152 if ( (
m_pCache->m_nPrivileges & Privilege::INSERT ) != Privilege::INSERT )
1153 ::dbtools::throwSQLException(
DBA_RES( RID_STR_NO_INSERT_PRIVILEGE ), StandardSQLState::GENERAL_ERROR, *
this );
1177 const bool bNewState =
m_bNew;
1199 if ( bNewState !=
m_bNew )
1236 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1238 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
1251 ::dbtools::throwSQLException(
DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *
this );
1272 ::osl::MutexGuard aGuard( *
m_pMutex );
1292 ::osl::MutexGuard aGuard( *
m_pMutex );
1298 ::osl::MutexGuard aGuard( *
m_pMutex );
1304 ::osl::MutexGuard aGuard( *
m_pMutex );
1310 ::osl::MutexGuard aGuard( *
m_pMutex );
1316 ::osl::MutexGuard aGuard( *
m_pMutex );
1322 ::osl::MutexGuard aGuard( *
m_pMutex );
1328 ::osl::MutexGuard aGuard( *
m_pMutex );
1334 ::osl::MutexGuard aGuard( *
m_pMutex );
1340 ::osl::MutexGuard aGuard( *
m_pMutex );
1346 ::osl::MutexGuard aGuard( *
m_pMutex );
1352 ::osl::MutexGuard aGuard( *
m_pMutex );
1358 ::osl::MutexGuard aGuard( *
m_pMutex );
1364 ::osl::MutexGuard aGuard( *
m_pMutex );
1377 ::osl::MutexGuard aGuard( *
m_pMutex );
1390 ::osl::MutexGuard aGuard( *
m_pMutex );
1396 return Reference< XRef >();
1417 return Reference< XArray >();
1422 if (!_rxHandler.is())
1425 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1430 ResettableMutexGuard aGuard(
m_aMutex );
1440 Reference< XConnection > xXConnection;
1447 Reference<XParametersSupplier> xParameters(xComposer, UNO_QUERY);
1449 Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
1450 const sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
1457 catch(SQLException&)
1467 TOOLS_WARN_EXCEPTION(
"dbaccess",
"ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters");
1478 ::osl::MutexGuard aGuard( *
m_pMutex );
1479 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1490 OUString sNotInterestedIn;
1508 EventObject aEvt(*
this);
1513 Reference< XRowSetApproveListener > xListener( aApproveIter.
next() );
1516 if ( !xListener->approveRowSetChange( aEvt ) )
1517 throw RowSetVetoException();
1519 catch (
const DisposedException& e )
1521 if ( e.Context == xListener )
1525 catch (
const RowSetVetoException& ) {
throw; }
1536 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
1541 ResettableMutexGuard aGuard(
m_aMutex );
1547 Reference< XConnection> xXConnection;
1560 OSL_ENSURE( _rxStatement.is(),
"ORowSet::setStatementResultSetType: invalid statement - this will crash!" );
1562 sal_Int32 nResultSetType( _nDesiredResultSetType );
1563 sal_Int32 nResultSetConcurrency( _nDesiredResultSetConcurrency );
1567 bool bRespectDriverRST =
false;
1571 OSL_VERIFY( aSetting >>= bRespectDriverRST );
1574 if ( bRespectDriverRST )
1580 sal_Int32 nCharacteristics[5][2] =
1581 { { ResultSetType::SCROLL_SENSITIVE, ResultSetConcurrency::UPDATABLE },
1582 { ResultSetType::SCROLL_INSENSITIVE, ResultSetConcurrency::UPDATABLE },
1583 { ResultSetType::SCROLL_SENSITIVE, ResultSetConcurrency::READ_ONLY },
1584 { ResultSetType::SCROLL_INSENSITIVE, ResultSetConcurrency::READ_ONLY },
1585 { ResultSetType::FORWARD_ONLY, ResultSetConcurrency::READ_ONLY }
1593 nResultSetType = nCharacteristics[
i][0];
1594 nResultSetConcurrency = nCharacteristics[
i][1];
1597 if ( nResultSetType > _nDesiredResultSetType )
1599 if ( nResultSetConcurrency > _nDesiredResultSetConcurrency )
1602 if ( xMeta.is() && xMeta->supportsResultSetConcurrency( nResultSetType, nResultSetConcurrency ) )
1613 OUString sCommandToExecute;
1628 ::dbtools::throwSQLException(
DBA_RES( RID_STR_INTERNAL_ERROR ), StandardSQLState::GENERAL_ERROR, *
this );
1631 Reference< XPropertySet > xStatementProps(
m_xStatement, UNO_QUERY_THROW );
1646 catch (SQLException& rException)
1649 assert(pLastExceptionInChain &&
"will at least be &rException");
1652 OUString sInfo(
m_sErrorString.replaceFirst(
"$command$", sCommandToExecute));
1654 pLastExceptionInChain->NextException = aAppend;
1666 Reference< XParameters > xParam(
m_xStatement, UNO_QUERY_THROW );
1668 for (
size_t i=1;
i<=nParamCount; ++
i )
1671 ::dbtools::setObjectWithInfo( xParam,
i, rParamValue.
makeAny(), rParamValue.
getTypeKind() );
1676 Reference< XResultSet > xResultSet(
m_xStatement->executeQuery());
1678 OUString aComposedUpdateTableName;
1682 SAL_INFO(
"dbaccess",
"ORowSet::impl_prepareAndExecute_throw: creating cache" );
1689 m_pCache->m_nPrivileges = Privilege::SELECT;
1701 OSL_ENSURE( _rxTemplateColumn.is() && _rxRowSetColumn.is(),
1702 "ORowSet::impl_initializeColumnSettings_nothrow: this will crash!" );
1704 bool bHaveAnyColumnSetting =
false;
1707 Reference< XPropertySetInfo > xInfo( _rxTemplateColumn->getPropertySetInfo(), UNO_SET_THROW );
1710 const OUString aPropertyNames[] = {
1714 for (
const auto & aPropertyName : aPropertyNames)
1716 if ( xInfo->hasPropertyByName( aPropertyName ) )
1718 _rxRowSetColumn->setPropertyValue( aPropertyName, _rxTemplateColumn->getPropertyValue( aPropertyName ) );
1719 bHaveAnyColumnSetting =
true;
1724 sal_Int32 nFormatKey = 0;
1728 bHaveAnyColumnSetting =
true;
1740 if ( bHaveAnyColumnSetting )
1748 Reference< XPropertySetInfo > xInfo( _rxTemplateColumn->getPropertySetInfo(), UNO_SET_THROW );
1753 OUString sTableName;
1754 OSL_VERIFY( _rxTemplateColumn->getPropertyValue(
PROPERTY_TABLENAME ) >>= sTableName );
1757 if ( !xTables->hasByName( sTableName ) )
1761 Reference< XColumnsSupplier > xTableColSup( xTables->getByName( sTableName ), UNO_QUERY_THROW );
1762 Reference< XNameAccess > xTableCols( xTableColSup->getColumns(), UNO_SET_THROW );
1764 OUString sTableColumnName;
1770 OSL_VERIFY( _rxTemplateColumn->getPropertyValue( sNamePropertyName ) >>= sTableColumnName );
1772 if ( !xTableCols->hasByName( sTableColumnName ) )
1775 Reference< XPropertySet > xTableColumn( xTableCols->getByName( sTableColumnName ), UNO_QUERY_THROW );
1810 Reference< XNumberFormatsSupplier> xNumberFormat = ::dbtools::getNumberFormats(
m_xActiveConnection);
1811 if ( xNumberFormat.is() )
1815 std::vector< OUString> aNames;
1816 OUString aDescription;
1818 const std::map<sal_Int32,sal_Int32>& rKeyColumns =
m_pCache->getKeyColumns();
1821 SAL_INFO(
"dbaccess",
"ORowSet::execute_NoApprove_NoNewConn::creating columns" );
1823 Reference<XResultSetMetaDataSupplier> xMetaSup(
m_xStatement,UNO_QUERY);
1826 Reference<XResultSetMetaData> xMetaData = xMetaSup->getMetaData();
1827 if ( xMetaData.is() )
1829 sal_Int32
nCount = xMetaData->getColumnCount();
1831 aColumns->reserve(
nCount+1);
1832 std::map< OUString, int > aColumnMap;
1836 OUString
sName = xMetaData->getColumnName(
i + 1);
1838 if(aColumnMap.find(
sName) != aColumnMap.end())
1840 OUString sAlias(
sName);
1841 sal_Int32 searchIndex=1;
1842 while(aColumnMap.find(sAlias) != aColumnMap.end())
1844 sAlias =
sName + OUString::number(searchIndex++);
1855 [
this] (sal_Int32
const column) ->
ORowSetValue const& {
1858 aColumnMap.insert(std::make_pair(
sName,0));
1859 aColumns->emplace_back(pColumn);
1860 pColumn->setName(
sName);
1861 aNames.push_back(
sName);
1868 sal_Int32 nFormatKey = 0;
1885 catch (SQLException&)
1892 Reference< XResultSetMetaData > xMeta(
getMetaData(), UNO_SET_THROW );
1893 sal_Int32
nCount = xMeta->getColumnCount();
1895 aColumns->reserve(
nCount+1);
1896 std::set< Reference< XPropertySet > > aAllColumns;
1900 OUString
sName = xMeta->getColumnName(
i);
1901 OUString sColumnLabel = xMeta->getColumnLabel(
i);
1904 Reference<XPropertySet>
xColumn;
1906 bool bReFetchName =
false;
1913 if ( aAllColumns.find(
xColumn ) != aAllColumns.end() )
1916 bReFetchName =
true;
1917 sColumnLabel.clear();
1922 Reference<XIndexAccess> xIndexAccess(
m_xColumns,UNO_QUERY);
1923 if(xIndexAccess.is() && i <= xIndexAccess->getCount())
1925 xIndexAccess->getByIndex(
i-1) >>=
xColumn;
1930 if(
i <=
aSeq.getLength())
1936 if(bReFetchName &&
xColumn.is())
1938 aAllColumns.insert(
xColumn );
1943 Reference<XPropertySetInfo> xInfo =
xColumn.is() ?
xColumn->getPropertySetInfo() : Reference<XPropertySetInfo>();
1947 OUString sParseLabel;
1959 [
this] (sal_Int32
const column) ->
ORowSetValue const& {
1960 return this->getInsertValue(column);
1962 aColumns->emplace_back(pColumn);
1966 if(sColumnLabel.isEmpty())
1971 sColumnLabel =
DBA_RES( RID_STR_EXPRESSION1 );
1973 pColumn->setName(sColumnLabel);
1974 aNames.push_back(sColumnLabel);
1994 Reference< XResultSet > xResultSet;
2019 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2028 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2038 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2047 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2062 m_aClones.emplace_back(css::uno::Reference< css::uno::XWeak >(pClone));
2065 return Reference< XResultSet >();
2071 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2077 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2082 ::osl::ResettableMutexGuard aGuard( *
m_pMutex );
2084 Sequence<Any> aChangedBookmarks;
2085 RowsChangeEvent aEvt(*
this,RowChangeAction::DELETE,rows.getLength(),aChangedBookmarks);
2089 Sequence< sal_Int32 > aResults( rows.getLength() );
2090 const Any* row = rows.getConstArray();
2091 const Any* rowEnd = rows.getConstArray() + rows.getLength();
2092 sal_Int32*
result = aResults.getArray();
2093 for ( ; row != rowEnd; ++row, ++
result )
2096 if ( !
m_pCache->moveToBookmark( *row ) )
2098 sal_Int32 nDeletePosition =
m_pCache->getRow();
2110 aEvt.Rows = aResults.getLength();
2138 pClone->onDeleteRow( _rBookmark );
2151 pClone->onDeletedRow( _rBookmark,
_nPos );
2160 Reference< XConnection > xNewConn;
2163 Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(
m_aContext) );
2166 Reference< XDataSource > xDataSource( xDatabaseContext->getByName(
m_aDataSourceName ), UNO_QUERY_THROW );
2169 Reference< XCompletedConnection > xComplConn( xDataSource, UNO_QUERY );
2170 if ( _rxHandler.is() && xComplConn.is() )
2172 xNewConn = xComplConn->connectWithCompletion( _rxHandler );
2179 catch (
const SQLException& )
2185 Any aError = ::cppu::getCaughtException();
2188 ::dbtools::throwGenericSQLException(
sMessage, *
this, aError );
2199 Reference< XNameAccess > xTables;
2202 if ( xTablesAccess.is() )
2204 xTables.set( xTablesAccess->getTables(), UNO_SET_THROW );
2219 bCase = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers();
2221 catch(SQLException&)
2228 Sequence<OUString> aTableFilter {
"%" };
2229 m_xTables->construct(aTableFilter,Sequence< OUString>());
2256 if ( !bUseEscapeProcessing )
2293 Reference< XColumnsSupplier > xCols(
m_xComposer, UNO_QUERY_THROW );
2299 _out_rCommandToExecute =
m_xComposer->getQueryWithSubstitution();
2315 return bDoEscapeProcessing;
2322 if ( bDoEscapeProcessing )
2336 sCommand =
"SELECT * FROM ";
2347 if (!xQueriesAccess.is())
2348 throw SQLException(
DBA_RES(RID_STR_NO_XQUERIESSUPPLIER),*
this,OUString(),0,
Any());
2349 Reference< css::container::XNameAccess > xQueries(xQueriesAccess->getQueries());
2352 Reference< XPropertySet > xQuery(xQueries->getByName(
m_aCommand),UNO_QUERY);
2353 OSL_ENSURE(xQuery.is(),
"ORowSet::impl_buildActiveCommand_throw: Query is NULL!");
2365 OUString aCatalog,aSchema,aTable;
2369 if(!aTable.isEmpty())
2389 ::dbtools::throwSQLException(
DBA_RES( RID_STR_NO_SQL_COMMAND ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *
this );
2391 return bDoEscapeProcessing;
2396 OSL_PRECOND( !
m_pParameters.is(),
"ORowSet::impl_initParametersContainer_nothrow: already initialized the parameters!" );
2401 for (
size_t i=0;
i<nParamCount; ++
i )
2403 (*m_pParameters)[
i] = (*m_aPrematureParamValues)[
i];
2415 for (
size_t i=0;
i<nParamCount; ++
i )
2417 (*m_aPrematureParamValues)[
i] = (*m_pParameters)[
i];
2426 ::connectivity::checkDisposed( ORowSet_BASE1::rBHelper.bDisposed );
2427 if ( parameterIndex < 1 )
2464 setNull( parameterIndex, sqlType );
2542 Sequence <sal_Int8>
aData;
2544 rParamValue =
aData;
2551 throw SQLException(
"ORowSet::setBinaryStream", *
this,
"S1000", 0,anyEx);
2561 Sequence <sal_Int8>
aData;
2568 rParamValue = aDataStr;
2575 throw SQLException(
"ORowSet::setCharacterStream", *
this,
"S1000", 0, anyEx);
2581 if ( !::dbtools::implSetObject(
this, parameterIndex,
x ) )
2583 throw SQLException();
2598 ::dbtools::throwFeatureNotImplementedSQLException(
"XParameters::setRef", *
this );
2603 ::dbtools::throwFeatureNotImplementedSQLException(
"XParameters::setBlob", *
this );
2608 ::dbtools::throwFeatureNotImplementedSQLException(
"XParameters::setClob", *
this );
2613 ::dbtools::throwFeatureNotImplementedSQLException(
"XParameters::setArray", *
this );
2618 ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
2623 for (
size_t i=1;
i<=nParamCount; ++
i )
2684 ::dbtools::throwSQLException(
DBA_RES( RID_STR_RESULT_IS_READONLY ), StandardSQLState::GENERAL_ERROR, *
this );
2687 ::dbtools::throwSQLException(
DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *
this );
2690 ::dbtools::throwSQLException(
DBA_RES( RID_STR_INVALID_CURSOR_STATE ), StandardSQLState::INVALID_CURSOR_STATE, *
this );
2693 ::dbtools::throwSQLException(
DBA_RES( RID_STR_INVALID_INDEX ), StandardSQLState::INVALID_DESCRIPTOR_INDEX, *
this );
2716 Reference< XResultSet > xResultSet(
m_xStatement->executeQuery());
2729 ,m_pParent(&rParent)
2730 ,m_nFetchDirection(rParent.m_nFetchDirection)
2731 ,m_nFetchSize(rParent.m_nFetchSize)
2732 ,m_bIsBookmarkable(true)
2749 std::vector< OUString> aNames;
2751 OUString aDescription;
2756 Sequence< OUString>
aSeq = rParent.
m_pColumns->getElementNames();
2757 const OUString* pIter =
aSeq.getConstArray();
2758 const OUString* pEnd = pIter +
aSeq.getLength();
2759 aColumns->reserve(
aSeq.getLength()+1);
2760 for(sal_Int32
i=1;pIter != pEnd ;++pIter,++
i)
2762 Reference<XPropertySet>
xColumn;
2767 OUString sParseLabel;
2775 [
this] (sal_Int32
const column) ->
ORowSetValue const& {
2776 return this->getValue(column);
2778 aColumns->emplace_back(pColumn);
2779 pColumn->setName(*pIter);
2780 aNames.push_back(*pIter);
2784 sal_Int32 nFormatKey = 0;
2802 sal_Int32
const nRT = PropertyAttribute::READONLY | PropertyAttribute::TRANSIENT;
2827 if(!aRet.hasValue())
2828 aRet = OSubComponent::queryInterface(rType);
2834 OSubComponent::acquire();
2845 return "com.sun.star.sdb.ORowSetClone";
2866 OSubComponent::disposing();
2874 if (WeakComponentImplHelper::rBHelper.bDisposed)
2883 Sequence< Property > aProps;
2885 return new ::cppu::OPropertyArrayHelper(aProps);
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_dba_ORowSet_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
virtual void SAL_CALL release() noexcept override
const LanguageTag & GetLanguageTag() const
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
std::vector< css::uno::Reference< ListenerT > > getElements() const
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
bool hasMoreElements() const
css::uno::Reference< ListenerT > const & next()
::cppu::IPropertyArrayHelper * getArrayHelper()
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
void registerMayBeVoidProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const css::uno::Any &rValue) override final
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
std::vector< VectorVal > Vector
css::util::Time getTime() const
sal_Int32 getInt32() const
OUString getString() const
css::uno::Any makeAny() const
sal_Int32 getTypeKind() const
sal_Int16 getInt16() const
void setTypeKind(sal_Int32 _eType)
css::util::Date getDate() const
css::util::DateTime getDateTime() const
sal_Int64 getLong() const
css::uno::Sequence< sal_Int8 > getSequence() const
void raiseTypedException(const ErrorCondition _eCondition, const css::uno::Reference< css::uno::XInterface > &_rxContext, const css::uno::Type &_rExceptionType) const
mutable::osl::Mutex m_aMutex
virtual css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
ORowSetCacheIterator m_aCurrentRow
sal_Int32 m_nLastColumnIndex
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
const connectivity::ORowSetValue & getValue(sal_Int32 columnIndex)
TORowSetOldRowHelperRef m_aOldRow
virtual sal_Bool SAL_CALL rowDeleted() override
std::unique_ptr< ORowSetDataColumns > m_pColumns
::cppu::OBroadcastHelper & m_rBHelper
void checkPositioningAllowed()
TDataColumns m_aDataColumns
void fireProperty(sal_Int32 _nProperty, bool _bNew, bool _bOld)
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
void onDeleteRow(const css::uno::Any &_rBookmark)
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
::cppu::OWeakObject * m_pMySelf
css::uno::Reference< css::uno::XComponentContext > m_aContext
css::uno::Reference< css::util::XNumberFormatTypes > m_xNumberFormatTypes
::osl::Mutex m_aColumnsMutex
sal_Int32 impl_getRowCount() const
returns the current row count
css::uno::Any m_aBookmark
@ Current
denotes no cursor move at all, but move cache to current row (if it is not there already)
@ Forward
denotes a cursor move forward
@ CurrentRefresh
denotes no cursor move at all, but force the cache to move to current row (and refresh the row)
void onDeletedRow(const css::uno::Any &_rBookmark, sal_Int32 _nPos)
void setCurrentRow(bool _bMoved, bool _bDoNotify, const ORowSetRow &_rOldValues, ::osl::ResettableMutexGuard &_rGuard)
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
void positionCache(CursorMoveDirection _ePrepareForDirection)
positions the cache in preparation of a cursor move
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL disposing()
void firePropertyChange(const ORowSetRow &_rOldRow)
virtual sal_Bool SAL_CALL wasNull() override
std::shared_ptr< ORowSetCache > m_pCache
sal_Int32 m_nResultSetType
std::vector< ORowSetDataColumn * > TDataColumns
sal_Int32 m_nResultSetConcurrency
virtual void SAL_CALL refreshRow() override
virtual void doCancelModification() override
virtual void SAL_CALL execute() override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual void SAL_CALL disposing() override
virtual bool isNew() override
virtual ~ORowSetClone() override
virtual bool isModified() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL close() override
ORowSetClone(const css::uno::Reference< css::uno::XComponentContext > &_rContext, ORowSet &rParent, ::osl::Mutex *_pMutex)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
sal_Int32 m_nFetchDirection
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual bool isModification() override
eases the handling of the doCancelModification and notifyCancelInsert methods
void firePropertyChange()
notifies value change events and notifies IsModified
void fire()
notifies the insertion
std::vector< sal_Int32 > & getChangedColumns()
use this one to store the index of the changed column values
bool impl_buildActiveCommand_throw()
builds m_aActiveCommand from our settings
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
sal_Int32 m_nMaxFieldSize
virtual void SAL_CALL execute() override
void notifyAllListeners(::osl::ResettableMutexGuard &_rGuard)
css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL removeRowsChangeListener(const css::uno::Reference< css::sdb::XRowsChangeListener > &listener) override
css::uno::Reference< css::container::XNameAccess > m_xTypeMap
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
void notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard &_rGuard, const css::sdb::RowChangeEvent &rEvt)
virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL cancel() override
virtual void doCancelModification() override
virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const css::util::Time &x) override
void implCancelRowUpdates(bool _bNotifyModified)
virtual bool isModification() override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
void checkUpdateConditions(sal_Int32 columnIndex)
::comphelper::OInterfaceContainerHelper3< css::sdb::XRowSetApproveListener > m_aApproveListeners
virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const css::util::Date &x) override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Any m_aActiveConnection
bool m_bUseEscapeProcessing
void checkUpdateIterator()
css::uno::Reference< css::container::XNameAccess > m_xColumns
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const css::util::DateTime &x) override
bool m_bCommandFacetsDirty
virtual void SAL_CALL addRowsChangeListener(const css::uno::Reference< css::sdb::XRowsChangeListener > &listener) override
void impl_restoreDataColumnsWriteable_throw()
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
void impl_ensureStatement_throw()
css::uno::Reference< css::sdbc::XPreparedStatement > m_xStatement
virtual void SAL_CALL clearWarnings() override
virtual void SAL_CALL addRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
virtual void SAL_CALL removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard &_rGuard) override
rtl::Reference< ORowSetValueVector > m_aPrematureParamValues
our parameters values, used when we do not yet have a parameters container (since we have not been ex...
virtual void SAL_CALL moveToCurrentRow() override
virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard &_rGuard) override
virtual bool isPropertyChangeNotificationEnabled() const override
bool m_bLastKnownRowCountFinal
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
std::vector< bool > m_aParametersSet
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
void notifyRowSetAndClonesRowDelete(const css::uno::Any &_rBookmark)
informs the clones (and ourself) that we are going to delete a record with a given bookmark
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) 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 setDouble(sal_Int32 parameterIndex, double x) override
virtual css::uno::Any SAL_CALL getWarnings() override
virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const css::uno::Any &x) override
virtual void SAL_CALL setString(sal_Int32 parameterIndex, const OUString &x) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
void notifyRowSetAndClonesRowDeleted(const css::uno::Any &_rBookmark, sal_Int32 _nPos)
inform the clones (and ourself) that we have deleted a record with a given bookmark
virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) override
css::uno::Reference< css::sdbc::XConnection > m_xOldConnection
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
rtl::Reference< ORowSetValueVector > m_aParameterValueForCache
virtual void fireRowcount() override
connectivity::OWeakRefArray m_aClones
virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) override
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef > &x) override
void notifyAllListenersRowChanged(::osl::ResettableMutexGuard &_rGuard, const css::sdb::RowsChangeEvent &rEvt)
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
virtual void SAL_CALL cancelRowUpdates() override
void setStatementResultSetType(const css::uno::Reference< css::beans::XPropertySet > &_rxStatement, sal_Int32 _nDesiredResultSetType, sal_Int32 _nDesiredResultSetConcurrency)
sets the given result set type/concurrency at the given statement, while respecting possibly related ...
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
void setActiveConnection(css::uno::Reference< css::sdbc::XConnection > const &_rxNewConn, bool _bFireEvent=true)
set m_xActiveConnection, fire a PropertyChangeEvent if necessary, do the event listener handling etc
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
std::vector< bool > m_aReadOnlyDataColumns
virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob > &x) override
virtual bool isNew() override
std::atomic< std::size_t > m_nInAppend
virtual void SAL_CALL executeWithCompletion(const css::uno::Reference< css::task::XInteractionHandler > &handler) override
const connectivity::ORowSetValue & getInsertValue(sal_Int32 columnIndex)
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
void freeResources(bool _bComplete)
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
void impl_setDataColumnsWriteable_throw()
virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) override
virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) override
virtual void SAL_CALL close() override
void impl_disposeParametersContainer_nothrow()
disposes our parameters container
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL createResultSet() override
::dbtools::param::ParametersContainerRef m_pParameters
our parameters as XPropertySet instances and ORowSetValue instances
void execute_NoApprove_NoNewConn(::osl::ResettableMutexGuard &_rClearForNotification)
implement the <method>execute</method>, without calling the approve listeners and without building a ...
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
bool m_bCanUpdateInsertedRows
ORowSet(const css::uno::Reference< css::uno::XComponentContext > &)
virtual void SAL_CALL updateRow() override
sal_Int32 m_nTransactionIsolation
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
void setParameter(sal_Int32 parameterIndex, const connectivity::ORowSetValue &x)
virtual void SAL_CALL refreshRow() override
::dbtools::WarningsContainer m_aWarnings
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL deleteRow() override
virtual void SAL_CALL addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
::comphelper::OInterfaceContainerHelper3< css::sdb::XRowsChangeListener > m_aRowsChangeListener
::connectivity::ORowSetValue & getParameterStorage(sal_Int32 parameterIndex)
css::uno::Reference< css::sdbc::XResultSet > impl_prepareAndExecute_throw()
prepares and executes our command
css::uno::Reference< css::sdbc::XConnection > calcConnection(const css::uno::Reference< css::task::XInteractionHandler > &_rxHandler)
sal_Int32 m_nFetchDirection
virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) override
virtual OUString SAL_CALL getImplementationName() override
sal_Int32 m_nLastKnownRowCount
OUString m_aUpdateTableName
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
void approveExecution()
call the RowSetApproveListeners
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
bool m_bPropChangeNotifyEnabled
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 targetSqlType, sal_Int32 scale) override
OUString m_aUpdateCatalogName
virtual void SAL_CALL removeRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob > &x) override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
std::unique_ptr< OTableContainer > m_xTables
virtual void SAL_CALL clearParameters() override
::comphelper::OInterfaceContainerHelper3< css::sdbc::XRowSetListener > m_aRowsetListeners
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
void impl_resetTables_nothrow()
cleans up m_pTables, and resets it to <NULL>
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL wasNull() override
void impl_rebuild_throw(::osl::ResettableMutexGuard &_rGuard)
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray > &x) override
friend class ORowSetClone
css::uno::Reference< css::container::XNameAccess > impl_getTables_throw()
returns the table container of our active connection
OUString m_aActiveCommand
void impl_initComposer_throw(OUString &_out_rCommandToExecute)
initializes our query composer, and everything which has to do with it
void impl_initParametersContainer_nothrow()
initializes our parameters container (m_pParameters) according to the parameter columns as obtained f...
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
void impl_initializeColumnSettings_nothrow(const css::uno::Reference< css::beans::XPropertySet > &_rxTemplateColumn, const css::uno::Reference< css::beans::XPropertySet > &_rxRowSetColumn)
initializes a given RowSet column with the ColumnSettings (width, format, hidden, etc....
OUString m_aUpdateSchemaName
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL moveToInsertRow() override
sal_Int32 m_nQueryTimeOut
virtual ~ORowSet() override
virtual bool isModified() override
virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) override
virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) override
void updateValue(sal_Int32 columnIndex, const connectivity::ORowSetValue &x)
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual void SAL_CALL insertRow() override
virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString &typeName) override
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xComposer
bool m_bRebuildConnOnExecute
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
OUString m_aDataSourceName
virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters() override
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
static OUString loadString(TranslateId pResId)
loads the string with the specified resource id
T * clone(T *const other)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
::connectivity::SQLError m_aErrors
Reference< XSingleServiceFactory > xFactory
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
constexpr OUStringLiteral aData
const LanguageTag & getLocale()
bool query_aggregation(const css::uno::Reference< css::uno::XAggregation > &_rxAggregate, css::uno::Reference< iface > &_rxOut)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
OUString getString(const Any &_rAny)
bool any2bool(const css::uno::Any &rAny)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
connectivity::ORowVector< connectivity::ORowSetValue > ORowSetValueVector
OUString extractExceptionMessage(const css::uno::Reference< css::uno::XComponentContext > &_rContext, const css::uno::Any &_rError)
retrieves a to-be-displayed string for a given caught exception;
OUString loadString(TranslateId aResId)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)
#define PROPERTY_ID_ISMODIFIED
#define PROPERTY_ID_ACTIVE_CONNECTION
#define PROPERTY_ID_ISBOOKMARKABLE
#define PROPERTY_ID_RESULTSETTYPE
#define PROPERTY_ID_ISROWCOUNTFINAL
#define PROPERTY_ID_HAVING_CLAUSE
#define PROPERTY_ID_ISREADONLY
#define PROPERTY_ID_QUERYTIMEOUT
#define PROPERTY_ID_ESCAPE_PROCESSING
#define PROPERTY_ID_CONTROLMODEL
#define PROPERTY_ID_DATASOURCENAME
#define PROPERTY_ID_PRIVILEGES
#define PROPERTY_ID_UPDATE_CATALOGNAME
#define PROPERTY_ID_UPDATE_SCHEMANAME
#define PROPERTY_ID_PROPCHANGE_NOTIFY
#define PROPERTY_ID_PASSWORD
#define PROPERTY_ID_RELATIVEPOSITION
#define PROPERTY_ID_FILTER
#define PROPERTY_ID_IGNORERESULT
#define PROPERTY_ID_RESULTSETCONCURRENCY
#define PROPERTY_ID_MAXFIELDSIZE
#define PROPERTY_ID_HELPTEXT
#define PROPERTY_ID_COMMAND
#define PROPERTY_ID_SINGLESELECTQUERYCOMPOSER
#define PROPERTY_ID_TRANSACTIONISOLATION
#define PROPERTY_ID_ACTIVECOMMAND
#define PROPERTY_ID_WIDTH
#define PROPERTY_ID_FETCHSIZE
#define PROPERTY_ID_HIDDEN
#define PROPERTY_ID_ALIGN
#define PROPERTY_ID_CONTROLDEFAULT
#define PROPERTY_ID_ORDER
#define PROPERTY_ID_UPDATE_TABLENAME
#define PROPERTY_ID_GROUP_BY
#define PROPERTY_ID_ISNEW
#define PROPERTY_ID_ROWCOUNT
#define PROPERTY_ID_NUMBERFORMAT
#define PROPERTY_ID_CANUPDATEINSERTEDROWS
#define PROPERTY_ID_TYPEMAP
#define PROPERTY_ID_MAXROWS
#define PROPERTY_ID_FETCHDIRECTION
#define PROPERTY_ID_APPLYFILTER
#define PROPERTY_ID_COMMAND_TYPE
constexpr OUStringLiteral PROPERTY_IGNORERESULT(u"IgnoreResult")
constexpr OUStringLiteral PROPERTY_WIDTH(u"Width")
constexpr OUStringLiteral PROPERTY_COMMAND(u"Command")
constexpr OUStringLiteral PROPERTY_FETCHDIRECTION(u"FetchDirection")
constexpr OUStringLiteral SERVICE_SDBC_RESULTSET
constexpr OUStringLiteral PROPERTY_USER(u"User")
constexpr OUStringLiteral PROPERTY_URL(u"URL")
constexpr OUStringLiteral PROPERTY_HAVING_CLAUSE(u"HavingClause")
constexpr OUStringLiteral PROPERTY_UPDATE_TABLENAME(u"UpdateTableName")
constexpr OUStringLiteral PROPERTY_RESULTSETCONCURRENCY(u"ResultSetConcurrency")
constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT(u"ControlDefault")
constexpr OUStringLiteral PROPERTY_SINGLESELECTQUERYCOMPOSER(u"SingleSelectQueryComposer")
constexpr OUStringLiteral PROPERTY_RESULTSETTYPE(u"ResultSetType")
constexpr OUStringLiteral PROPERTY_RELATIVEPOSITION(u"RelativePosition")
constexpr OUStringLiteral PROPERTY_NUMBERFORMAT(u"FormatKey")
constexpr OUStringLiteral PROPERTY_ISREADONLY(u"IsReadOnly")
constexpr OUStringLiteral PROPERTY_LABEL(u"Label")
constexpr OUStringLiteral PROPERTY_QUERYTIMEOUT(u"QueryTimeOut")
constexpr OUStringLiteral PROPERTY_ISMODIFIED(u"IsModified")
constexpr OUStringLiteral PROPERTY_UPDATE_SCHEMANAME(u"UpdateSchemaName")
constexpr OUStringLiteral PROPERTY_DESCRIPTION(u"Description")
constexpr OUStringLiteral PROPERTY_ISBOOKMARKABLE(u"IsBookmarkable")
constexpr OUStringLiteral SERVICE_SDB_ROWSET
constexpr OUStringLiteral PROPERTY_APPLYFILTER(u"ApplyFilter")
constexpr OUStringLiteral PROPERTY_CHANGE_NOTIFICATION_ENABLED(u"PropertyChangeNotificationEnabled")
constexpr OUStringLiteral PROPERTY_REALNAME(u"RealName")
constexpr OUStringLiteral SERVICE_NAME_SINGLESELECTQUERYCOMPOSER
constexpr OUStringLiteral PROPERTY_GROUP_BY(u"GroupBy")
constexpr OUStringLiteral PROPERTY_PASSWORD(u"Password")
constexpr OUStringLiteral PROPERTY_MAXFIELDSIZE(u"MaxFieldSize")
constexpr OUStringLiteral PROPERTY_TYPEMAP(u"TypeMap")
constexpr OUStringLiteral PROPERTY_FILTER(u"Filter")
constexpr OUStringLiteral PROPERTY_ACTIVE_CONNECTION(u"ActiveConnection")
constexpr OUStringLiteral SERVICE_SDBC_ROWSET
constexpr OUStringLiteral PROPERTY_MAXROWS(u"MaxRows")
constexpr OUStringLiteral PROPERTY_TABLENAME(u"TableName")
constexpr OUStringLiteral PROPERTY_ESCAPE_PROCESSING(u"EscapeProcessing")
constexpr OUStringLiteral SQLSTATE_GENERAL
constexpr OUStringLiteral SERVICE_SDBCX_RESULTSET
constexpr OUStringLiteral SERVICE_SDB_RESULTSET
constexpr OUStringLiteral PROPERTY_TRANSACTIONISOLATION(u"TransactionIsolation")
constexpr OUStringLiteral PROPERTY_HELPTEXT(u"HelpText")
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")
constexpr OUStringLiteral PROPERTY_USEBOOKMARKS(u"UseBookmarks")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_UPDATE_CATALOGNAME(u"UpdateCatalogName")
constexpr OUStringLiteral PROPERTY_CONTROLMODEL(u"ControlModel")
constexpr OUStringLiteral PROPERTY_DATASOURCENAME(u"DataSourceName")
constexpr OUStringLiteral PROPERTY_ACTIVECOMMAND(u"ActiveCommand")
constexpr OUStringLiteral PROPERTY_FETCHSIZE(u"FetchSize")
constexpr OUStringLiteral PROPERTY_HIDDEN(u"Hidden")
constexpr OUStringLiteral PROPERTY_ALIGN(u"Align")
constexpr OUStringLiteral PROPERTY_PRIVILEGES(u"Privileges")
constexpr OUStringLiteral PROPERTY_COMMAND_TYPE(u"CommandType")
constexpr OUStringLiteral PROPERTY_CANUPDATEINSERTEDROWS(u"CanUpdateInsertedRows")
constexpr OUStringLiteral PROPERTY_ORDER(u"Order")
constexpr OUStringLiteral PROPERTY_ISNEW(u"IsNew")