25#include <core_resource.hxx>
29#include <sqlbison.hxx>
32#include <com/sun/star/beans/PropertyAttribute.hpp>
33#include <com/sun/star/i18n/LocaleData.hpp>
34#include <com/sun/star/script/Converter.hpp>
35#include <com/sun/star/sdb/BooleanComparisonMode.hpp>
36#include <com/sun/star/sdb/SQLFilterOperator.hpp>
37#include <com/sun/star/sdb/XQueriesSupplier.hpp>
38#include <com/sun/star/sdb/CommandType.hpp>
39#include <com/sun/star/sdbc/ColumnSearch.hpp>
40#include <com/sun/star/sdbc/DataType.hpp>
41#include <com/sun/star/sdbc/XConnection.hpp>
42#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
43#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
44#include <com/sun/star/sdbc/XParameters.hpp>
45#include <com/sun/star/util/NumberFormatter.hpp>
53#include <osl/diagnose.h>
73using namespace ::
cppu;
78namespace BooleanComparisonMode = ::com::sun::star::sdb::BooleanComparisonMode;
88constexpr OUStringLiteral
STR_OR =
u" OR ";
92constexpr OUStringLiteral
COMMA =
u",";
101 std::unique_ptr<OSQLParseNode> parseStatement_throwError( OSQLParser& _rParser,
const OUString& _rStatement,
const Reference< XInterface >& _rxContext )
104 std::unique_ptr<OSQLParseNode> pNewSqlParseNode = _rParser.parseTree( aErrorMsg, _rStatement );
105 if ( !pNewSqlParseNode )
108 SQLException aError2( aErrorMsg, _rxContext, sSQLStateGeneralError, 1000,
Any() );
109 SQLException aError1( _rStatement, _rxContext, sSQLStateGeneralError, 1000,
Any( aError2 ) );
110 throw SQLException(_rParser.getContext().getErrorMessage(OParseContext::ErrorCode::General),_rxContext,sSQLStateGeneralError,1000,
Any(aError1));
112 return pNewSqlParseNode;
118 void checkForSingleSelect_throwError(
const OSQLParseNode* pStatementNode, OSQLParseTreeIterator& _rIterator,
119 const Reference< XInterface >& _rxContext,
const OUString& _rOriginatingCommand )
121 const OSQLParseNode* pOldNode = _rIterator.getParseTree();
124 _rIterator.setParseTree( pStatementNode );
125 _rIterator.traverseAll();
126 bool bIsSingleSelect = ( _rIterator.getStatementType() == OSQLStatementType::Select );
129 if ( !bIsSingleSelect ||
SQL_ISRULE( pStatementNode, union_statement ) )
132 _rIterator.setParseTree( pOldNode );
134 SQLException aError1( _rOriginatingCommand, _rxContext,
getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 1000,
Any() );
135 throw SQLException(
DBA_RES( RID_STR_ONLY_QUERY ), _rxContext,
144 void parseAndCheck_throwError( OSQLParser& _rParser,
const OUString& _rStatement,
145 OSQLParseTreeIterator& _rIterator,
const Reference< XInterface >& _rxContext )
147 std::unique_ptr<OSQLParseNode> pNode = parseStatement_throwError( _rParser, _rStatement, _rxContext );
148 checkForSingleSelect_throwError( pNode.release(), _rIterator, _rxContext, _rStatement );
154 OUString getPureSelectStatement(
const OSQLParseNode* _pRootNode,
const Reference< XConnection >& _rxConnection )
157 _pRootNode->getChild(1)->parseNodeToStr( sSQL, _rxConnection );
158 _pRootNode->getChild(2)->parseNodeToStr( sSQL, _rxConnection );
160 _pRootNode->getChild(3)->getChild(0)->getChild(1)->parseNodeToStr( sSQL, _rxConnection );
166 void resetIterator( OSQLParseTreeIterator& _rIterator )
168 const OSQLParseNode* pSqlParseNode = _rIterator.getParseTree();
169 _rIterator.setParseTree(
nullptr);
170 delete pSqlParseNode;
171 _rIterator.dispose();
173 void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,std::u16string_view i_sValue,OUStringBuffer& o_sRet)
175 switch( i_nFilterOperator )
177 case SQLFilterOperator::EQUAL:
178 o_sRet.append(OUString::Concat(
" = ") + i_sValue);
180 case SQLFilterOperator::NOT_EQUAL:
181 o_sRet.append(OUString::Concat(
" <> ") + i_sValue);
183 case SQLFilterOperator::LESS:
184 o_sRet.append(OUString::Concat(
" < ") + i_sValue);
186 case SQLFilterOperator::GREATER:
187 o_sRet.append(OUString::Concat(
" > ") + i_sValue);
189 case SQLFilterOperator::LESS_EQUAL:
190 o_sRet.append(OUString::Concat(
" <= ") + i_sValue);
192 case SQLFilterOperator::GREATER_EQUAL:
193 o_sRet.append(OUString::Concat(
" >= ") + i_sValue);
195 case SQLFilterOperator::LIKE:
196 o_sRet.append(OUString::Concat(
" LIKE ") + i_sValue);
198 case SQLFilterOperator::NOT_LIKE:
199 o_sRet.append(OUString::Concat(
" NOT LIKE ") + i_sValue);
201 case SQLFilterOperator::SQLNULL:
202 o_sRet.append(
" IS NULL");
204 case SQLFilterOperator::NOT_SQLNULL:
205 o_sRet.append(
" IS NOT NULL");
208 throw SQLException();
215OSingleSelectQueryComposer::OSingleSelectQueryComposer(
const Reference< XNameAccess>& _rxTables,
216 const Reference< XConnection>& _xConnection,
217 const Reference<XComponentContext>& _rContext )
220 ,m_aSqlParser( _rContext, &m_aParseContext )
221 ,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser )
222 ,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser )
223 ,m_aElementaryParts( size_t(SQLPartCount) )
225 ,m_xMetaData(_xConnection->getMetaData())
226 ,m_xConnectionTables( _rxTables )
228 ,m_nBoolCompareMode( BooleanComparisonMode::EQUAL_INTEGER )
232 throw IllegalArgumentException();
240 Reference< XLocaleData4 > xLocaleData( LocaleData::create(
m_aContext) );
243 OSL_ENSURE(
m_sDecimalSep.getLength() == 1,
"OSingleSelectQueryComposer::OSingleSelectQueryComposer decimal separator is not 1 length");
252 Reference< XQueriesSupplier > xQueriesAccess(
m_xConnection, UNO_QUERY);
253 if (xQueriesAccess.is())
268 OSubComponent::disposing();
282OUString SAL_CALL OSingleSelectQueryComposer::getImplementationName()
284 return "org.openoffice.comp.dba.OSingleSelectQueryComposer";
286sal_Bool SAL_CALL OSingleSelectQueryComposer::supportsService(
const OUString& _rServiceName)
289 for (
const OUString& s : aSupported)
290 if (s == _rServiceName)
295css::uno::Sequence< OUString > SAL_CALL OSingleSelectQueryComposer::getSupportedServiceNames()
302 return css::uno::Sequence<sal_Int8>();
307 return ::comphelper::concatSequences(
308 OSubComponent::getTypes( ),
310 OPropertyContainer::getTypes( )
316 Reference< XPropertySetInfo > xInfo( createPropertySetInfo(
getInfoHelper() ) );
325 css::uno::Sequence< css::beans::Property > aProps;
327 return new ::cppu::OPropertyArrayHelper(aProps);
334 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
335 ::osl::MutexGuard aGuard(
m_aMutex );
343 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
345 ::osl::MutexGuard aGuard(
m_aMutex );
364 switch(_nCommandType)
366 case CommandType::COMMAND:
372 sSQL.append(
"SELECT * FROM ");
373 Reference< XPropertySet > xTable;
378 catch(
const WrappedTargetException& e)
381 if ( e.TargetException >>= e2 )
404 sSQL.append(sCommand);
416 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
418 ::osl::MutexGuard aGuard(
m_aMutex );
424 OUString sCommand = sSQL.makeStringAndClear();
467 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
472 || !column->getPropertySetInfo()->hasPropertyByName(
PROPERTY_NAME)
475 OUString sError(
DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
480 OUString
aName, aNewName;
488 OUString sError(
DBA_RES(RID_STR_COLUMN_MUST_VISIBLE));
492 OUString aQuote =
m_xMetaData->getIdentifierQuoteString();
495 Reference<XPropertySet>
xColumn;
499 OSL_ENSURE(
xColumn->getPropertySetInfo()->hasPropertyByName(
"Function"),
"Property FUNCTION not available!");
501 OUString sRealName, sTableName;
504 bool bFunction =
false;
505 xColumn->getPropertyValue(
"Function") >>= bFunction;
506 if ( sRealName ==
aName )
512 if(sTableName.indexOf(
'.') != -1)
514 OUString aCatalog,aSchema,aTable;
515 ::dbtools::qualifiedNameComponents(
m_xMetaData,sTableName,aCatalog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation);
516 sTableName = ::dbtools::composeTableName(
m_xMetaData, aCatalog, aSchema, aTable,
true, ::dbtools::EComposeRule::InDataManipulation );
518 else if (!sTableName.isEmpty())
519 sTableName = ::dbtools::quoteName(aQuote,sTableName);
521 if(sTableName.isEmpty())
522 aNewName = ::dbtools::quoteName(aQuote,sRealName);
524 aNewName = sTableName +
"." + ::dbtools::quoteName(aQuote,sRealName);
528 aNewName = ::dbtools::quoteName(aQuote,
aName);
537 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
542 || !column->getPropertySetInfo()->hasPropertyByName(
PROPERTY_NAME)
545 OUString sError(
DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
553 const OUString aQuote =
m_xMetaData->getIdentifierQuoteString();
559 return ::dbtools::quoteName(aQuote,
aName);
566 OUString sError(
DBA_RES(RID_STR_COLUMN_MUST_VISIBLE));
576 ::osl::MutexGuard aGuard(
m_aMutex );
579 if ( !(sOrder.isEmpty() || sColumnName.isEmpty()) )
581 sOrder += sColumnName;
582 if ( !(ascending || sColumnName.isEmpty()) )
590 ::osl::MutexGuard aGuard(
m_aMutex );
594 aComposer.
append( sColumnName );
600 OSL_ENSURE( _rParts.size() ==
size_t(
SQLPartCount),
"OSingleSelectQueryComposer::composeStatementFromParts: invalid parts array!" );
604 if ( !_rParts[ eLoopParts ].isEmpty() )
607 aSql.append( _rParts[ eLoopParts ] );
610 return aSql.makeStringAndClear();
620 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
621 ::osl::MutexGuard aGuard(
m_aMutex );
624 std::vector< OUString > aAdditiveClauses(
SQLPartCount );
645 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
653 OUString getComposedClause(
const OUString& _rElementaryClause,
const OUString& _rAdditionalClause,
657 _rComposer.
append( _rElementaryClause );
658 _rComposer.
append( _rAdditionalClause );
660 if ( !sComposed.isEmpty() )
661 sComposed = _rKeyword + sComposed;
668 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
669 ::osl::MutexGuard aGuard(
m_aMutex );
676 std::vector< OUString > aClauses;
682 std::unique_ptr< TokenComposer > pComposer;
693 aSql.append(aClauses[ eLoopParts ]);
700 if ( _ePart ==
Order )
702 else if ( _ePart ==
Group )
711 aClauses[ _ePart ] = getComposedClause( OUString(), _rClause, *pComposer,
getKeyword( _ePart ) );
714 aSql.append(aClauses[ eLoopParts ]);
721 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" );
750 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
752 ::osl::MutexGuard aGuard(
m_aMutex );
756 std::vector< OUString> aNames;
757 for (
auto const& elem : aTables)
758 aNames.push_back(elem.first);
769 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
770 ::osl::MutexGuard aGuard(
m_aMutex );
774 std::vector< OUString> aNames;
777 Reference< XNameAccess> xQueryColumns;
782 xQueryColumns = xSup->getColumns();
789 SharedUNOComponent< XStatement, DisposableComponent > xStatement;
790 SharedUNOComponent< XPreparedStatement, DisposableComponent > xPreparedStatement;
792 bCase =
m_xMetaData->supportsMixedCaseQuotedIdentifiers();
800 if ( !sOriginalWhereClause.isEmpty() )
802 aSQL.append(
" AND ( " + sOriginalWhereClause +
" ) " );
806 if ( !sGroupBy.isEmpty() )
807 aSQL.append( sGroupBy );
809 OUString sSQL( aSQL.makeStringAndClear() );
813 OSL_ENSURE(pStatementTree,
"OSingleSelectQueryComposer::getColumns: could not parse the "
814 "column retrieval statement!");
819 Reference< XResultSetMetaData > xResultSetMeta;
820 Reference< XResultSetMetaDataSupplier > xResMetaDataSup;
823 xPreparedStatement.set(
m_xConnection->prepareStatement( sSQL ), UNO_QUERY_THROW );
824 xResMetaDataSup.set( xPreparedStatement, UNO_QUERY_THROW );
825 xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_SET_THROW );
829 if ( !xResultSetMeta.is() && xPreparedStatement.is() )
836 Reference< XParameters > xParameters( xPreparedStatement, UNO_QUERY_THROW );
838 for(sal_Int32
i = 1;
i <= xPara->getCount();++
i)
839 xParameters->setNull(
i,DataType::VARCHAR);
840 xResMetaDataSup.set(xPreparedStatement->executeQuery(), UNO_QUERY_THROW );
841 xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_SET_THROW );
846 if ( !xResultSetMeta.is() )
848 xStatement.reset( Reference< XStatement >(
m_xConnection->createStatement(), UNO_SET_THROW ) );
849 Reference< XPropertySet > xStatementProps( xStatement, UNO_QUERY_THROW );
852 xResMetaDataSup.set( xStatement->executeQuery( sSQL ), UNO_QUERY_THROW );
853 xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_SET_THROW );
855 if (xResultSetMeta.is())
857 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::getColumns failed to get xResultSetMeta from executed PreparedStatement, but got it from 'no escape processing' statement. SQL command:\n\t" << sSQL );
861 if ( aSelectColumns->empty() )
869 const ::comphelper::UStringMixEqual aCaseCompare( bCase );
870 std::set< size_t > aUsedSelectColumns;
873 sal_Int32
nCount = xResultSetMeta->getColumnCount();
874 OSL_ENSURE(
static_cast<size_t>(
nCount) == aSelectColumns->size(),
"OSingleSelectQueryComposer::getColumns: inconsistent column counts, this might result in wrong columns!" );
877 OUString sColumnName = xResultSetMeta->getColumnName(
i);
878 OUString sColumnLabel;
879 if ( xQueryColumns.is() && xQueryColumns->hasByName(sColumnName) )
881 Reference<XPropertySet> xQueryColumn(xQueryColumns->getByName(sColumnName),UNO_QUERY_THROW);
885 sColumnLabel = xResultSetMeta->getColumnLabel(
i);
887 OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->begin(),aSelectColumns->end(),sColumnLabel,aCaseCompare);
888 size_t nFoundSelectColumnPos = aFind - aSelectColumns->begin();
889 if ( aFind != aSelectColumns->end() )
891 if ( aUsedSelectColumns.find( nFoundSelectColumnPos ) != aUsedSelectColumns.end() )
896 aFind = ::connectivity::findRealName(++aFind,aSelectColumns->end(),sColumnName,aCaseCompare);
897 nFoundSelectColumnPos = aFind - aSelectColumns->begin();
899 while ( ( aUsedSelectColumns.find( nFoundSelectColumnPos ) != aUsedSelectColumns.end() )
900 && ( aFind != aSelectColumns->end() )
903 if ( aFind != aSelectColumns->end() )
906 aUsedSelectColumns.insert( nFoundSelectColumnPos );
907 aNames.push_back(sColumnName);
915 OSQLColumns::Vector::const_iterator aRealFind = ::connectivity::findRealName(
916 aSelectColumns->begin(), aSelectColumns->end(), sColumnName, aCaseCompare );
918 if (
i >
static_cast< sal_Int32
>( aSelectColumns->size() ) )
922 OSL_ENSURE( aSelectColumns->size() ==
static_cast<size_t>(
i),
"OSingleSelectQueryComposer::getColumns: inconsistency!" );
924 else if ( aRealFind == aSelectColumns->end() )
928 OSQLColumns::Vector::const_iterator aFind2 = aSelectColumns->begin() +
i-1;
929 Reference<XPropertySet> xProp = *aFind2;
930 if ( !xProp.is() || !xProp->getPropertySetInfo()->hasPropertyByName(
PROPERTY_REALNAME ) )
934 pColumn->setFunction(::comphelper::getBOOL(xProp->getPropertyValue(
"Function")));
935 pColumn->setAggregateFunction(::comphelper::getBOOL(xProp->getPropertyValue(
"AggregateFunction")));
939 if ( sColumnName.isEmpty() )
943 while ( std::any_of(aNames.begin(),aNames.end(),
944 [&aCaseCompare, &sColumnName](
const OUString& lhs)
945 { return aCaseCompare(lhs, sColumnName); } ) )
947 sColumnName += OUString::number(++j);
950 pColumn->setName(sColumnName);
951 pColumn->setRealName(sRealName);
952 pColumn->setTableName(::comphelper::getString(xProp->getPropertyValue(
PROPERTY_TABLENAME)));
954 (*aSelectColumns)[
i-1] = pColumn;
959 aUsedSelectColumns.insert(
static_cast<size_t>(
i - 1) );
960 aNames.push_back( sColumnName );
969 bool bMissingSomeColumnLabels = !aNames.empty() && aNames.size() != aSelectColumns->size();
970 SAL_WARN_IF(bMissingSomeColumnLabels,
"dbaccess",
"We have column labels for *some* columns but not all");
978 if (bMissingSomeColumnLabels)
981 if ( aNames.empty() )
990 std::vector< std::vector < PropertyValue > >& rFilters,
const Reference< css::util::XNumberFormatter > & xFormatter)
const
993 if (pCondition->
count() == 3 &&
1001 else if (
SQL_ISRULE(pCondition,search_condition))
1003 bool bResult =
true;
1004 for (
int i = 0; bResult &&
i < 3;
i+=2)
1012 rFilters.emplace_back();
1020 rFilters.emplace_back();
1021 return setANDCriteria(pCondition, _rIterator, rFilters[rFilters.size() - 1], xFormatter);
1032 SAL_WARN(
"dbaccess",
"boolean_primary in And-Criteria");
1036 else if (
SQL_ISRULE(pCondition,boolean_term) && pCondition->
count() == 3 )
1041 else if (
SQL_ISRULE(pCondition, comparison_predicate))
1045 else if (
SQL_ISRULE(pCondition,like_predicate))
1049 else if (
SQL_ISRULE(pCondition,test_for_null) ||
1051 SQL_ISRULE(pCondition,all_or_any_predicate) ||
1056 PropertyValue aItem;
1058 OUString aColumnName;
1064 aValue = aValue.copy(aColumnName.getLength());
1065 aValue = aValue.trim();
1068 aItem.Value <<= aValue;
1073 aItem.Handle = SQLFilterOperator::NOT_LIKE;
1075 aItem.Handle = SQLFilterOperator::LIKE;
1077 else if (
SQL_ISRULE(pCondition,test_for_null))
1080 aItem.Handle = SQLFilterOperator::NOT_SQLNULL;
1082 aItem.Handle = SQLFilterOperator::SQLNULL;
1084 else if (
SQL_ISRULE(pCondition,in_predicate))
1086 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::setANDCriteria: in_predicate not implemented!" );
1088 else if (
SQL_ISRULE(pCondition,all_or_any_predicate))
1090 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::setANDCriteria: all_or_any_predicate not implemented!" );
1092 else if (
SQL_ISRULE(pCondition,between_predicate))
1094 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::setANDCriteria: between_predicate not implemented!" );
1097 rFilter.push_back(aItem);
1102 else if (
SQL_ISRULE(pCondition,existence_test) ||
1117 sal_Int32 nPredicate = SQLFilterOperator::EQUAL;
1121 nPredicate = SQLFilterOperator::EQUAL;
1124 nPredicate = SQLFilterOperator::NOT_EQUAL;
1126 case SQLNodeType::Less:
1127 nPredicate = SQLFilterOperator::LESS;
1129 case SQLNodeType::LessEq:
1130 nPredicate = SQLFilterOperator::LESS_EQUAL;
1132 case SQLNodeType::Great:
1133 nPredicate = SQLFilterOperator::GREATER;
1135 case SQLNodeType::GreatEq:
1136 nPredicate = SQLFilterOperator::GREATER_EQUAL;
1139 SAL_WARN(
"dbaccess",
"Wrong NodeType!");
1145 std::vector < PropertyValue >& rFilter,
const Reference< css::util::XNumberFormatter > & xFormatter)
const
1147 OSL_ENSURE(
SQL_ISRULE(pCondition, like_predicate),
"setLikePredicate: pCondition is not a LikePredicate");
1149 assert(pCondition->
count() == 2);
1153 PropertyValue aItem;
1155 aItem.Handle = SQLFilterOperator::NOT_LIKE;
1157 aItem.Handle = SQLFilterOperator::LIKE;
1164 for (
size_t i=2;
i < pPart2->
count();
i++)
1171 aItem.Value <<= aValue;
1172 rFilter.push_back(aItem);
1174 else if (
SQL_ISRULE(pRowValue, set_fct_spec ) ||
1178 OUString aColumnName;
1185 aItem.Value <<= aValue;
1186 rFilter.push_back(aItem);
1190 OUString
aName, aValue;
1195 for (
size_t i=0;
i< pRowValue->
count();
i++)
1199 for(
size_t i=0;
i< pValue->
count();
i++)
1204 aItem.Value <<= aValue;
1205 rFilter.push_back(aItem);
1211 std::vector < PropertyValue >& rFilter,
const Reference< css::util::XNumberFormatter > & xFormatter)
const
1213 OSL_ENSURE(
SQL_ISRULE(pCondition, comparison_predicate),
"setComparisonPredicate: pCondition is not a ComparisonPredicate");
1217 PropertyValue aItem;
1228 for (
i++;
i < pCondition->
count();
i++)
1236 sal_Int32
i = pCondition->
count() - 2;
1240 aItem.Handle = SQLFilterOperator::EQUAL;
1243 aItem.Handle = SQLFilterOperator::NOT_EQUAL;
1245 case SQLNodeType::Less:
1247 aItem.Handle = SQLFilterOperator::GREATER_EQUAL;
1249 case SQLNodeType::LessEq:
1251 aItem.Handle = SQLFilterOperator::GREATER;
1253 case SQLNodeType::Great:
1255 aItem.Handle = SQLFilterOperator::LESS_EQUAL;
1257 case SQLNodeType::GreatEq:
1259 aItem.Handle = SQLFilterOperator::LESS;
1266 for (
i--;
i >= 0;
i--)
1274 aItem.Value <<= aValue;
1275 rFilter.push_back(aItem);
1280 PropertyValue aItem;
1282 OUString aColumnName;
1288 aItem.Value <<= aValue;
1290 rFilter.push_back(aItem);
1294 PropertyValue aItem;
1295 OUString
aName, aValue;
1301 for (
size_t i=0;
i< pLhs->
count();
i++)
1306 for(
size_t i=0;
i< pRhs->
count();
i++)
1310 aItem.Value <<= aValue;
1311 rFilter.push_back(aItem);
1319 OUString aTableRange, aColumnName;
1326 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1327 ::osl::MutexGuard aGuard(
m_aMutex );
1333 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1334 ::osl::MutexGuard aGuard(
m_aMutex );
1340 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1341 ::osl::MutexGuard aGuard(
m_aMutex );
1347 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1348 ::osl::MutexGuard aGuard(
m_aMutex );
1357 OUString aCatalog,aSchema,aTable,aColumnName;
1366 Sequence< OUString> aNames(
m_pTables->getElementNames());
1367 const OUString* pBegin = aNames.getConstArray();
1368 const OUString*
const pEnd = pBegin + aNames.getLength();
1370 if(aTable.isEmpty())
1372 for(;pBegin != pEnd;++pBegin)
1374 Reference<XColumnsSupplier> xColumnsSupp;
1375 m_pTables->getByName(*pBegin) >>= xColumnsSupp;
1377 if(xColumnsSupp.is() && xColumnsSupp->getColumns()->hasByName(aColumnName))
1386 OUString aComposedName = ::dbtools::composeTableName(
m_xMetaData, aCatalog, aSchema, aTable,
false, ::dbtools::EComposeRule::InDataManipulation );
1391 if(!
m_pTables->hasByName(aComposedName))
1395 for(;pBegin != pEnd;++pBegin)
1397 Reference<XPropertySet> xTableProp;
1398 m_pTables->getByName(*pBegin) >>= xTableProp;
1399 OSL_ENSURE(xTableProp.is(),
"Table isn't a propertyset!");
1402 OUString aCatalog2,aSchema2,aTable2;
1406 if(aComp(aCatalog,aCatalog2) && aComp(aSchema,aSchema2) && aComp(aTable,aTable2))
1408 aCatalog = aCatalog2;
1419 sReturn = ::dbtools::composeTableName(
m_xMetaData, aCatalog, aSchema, aTable,
true, ::dbtools::EComposeRule::InDataManipulation ) +
".";
1431 std::vector< OUString> aNames;
1432 for (
auto const& elem : *aCols)
1443 if ( pColumns !=
nullptr )
1456 currentColumn->disposing();
1469 const ::rtl::Reference< OSQLColumns >& _rCols )
1471 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1473 ::osl::MutexGuard aGuard(
m_aMutex );
1477 std::vector< OUString> aNames;
1478 for (
auto const& elem : *_rCols)
1498 ::osl::MutexGuard aGuard(
m_aMutex );
1499 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1501 OUString sSqlStatement(
getQuery() );
1504 if ( pStatementNode )
1506 SQLException aError;
1511 return sSqlStatement;
1527 OUString lcl_getDecomposedColumnName(
const OUString& rComposedName, std::u16string_view rQuoteString)
1529 const size_t nQuoteLength = rQuoteString.size();
1530 OUString
sName = rComposedName.trim();
1531 OUString sColumnName;
1532 sal_Int32
nPos, nRPos = 0;
1536 nPos =
sName.indexOf( rQuoteString, nRPos );
1539 nRPos =
sName.indexOf( rQuoteString, nPos + nQuoteLength );
1542 if (
static_cast<sal_Int32
>(nRPos + nQuoteLength) <
sName.getLength() )
1544 nRPos += nQuoteLength;
1548 sColumnName =
sName.copy( nPos + nQuoteLength, nRPos - nPos - nQuoteLength );
1558 return sColumnName.isEmpty() ? rComposedName : sColumnName;
1561 OUString lcl_getCondition(
const Sequence< Sequence< PropertyValue > >&
filter,
1562 const OPredicateInputController& i_aPredicateInputController,
1563 const Reference< XNameAccess >& i_xSelectColumns,
1564 std::u16string_view rQuoteString)
1566 OUStringBuffer sRet;
1567 const Sequence< PropertyValue >* pOrIter =
filter.getConstArray();
1568 const Sequence< PropertyValue >* pOrEnd = pOrIter +
filter.getLength();
1569 while ( pOrIter != pOrEnd )
1571 if ( pOrIter->hasElements() )
1574 const PropertyValue* pAndIter = pOrIter->getConstArray();
1575 const PropertyValue* pAndEnd = pAndIter + pOrIter->getLength();
1576 while ( pAndIter != pAndEnd )
1578 sRet.append(pAndIter->Name);
1580 pAndIter->Value >>= sValue;
1581 const OUString sColumnName = lcl_getDecomposedColumnName( pAndIter->Name, rQuoteString );
1582 if ( i_xSelectColumns.is() && i_xSelectColumns->hasByName(sColumnName) )
1584 Reference<XPropertySet>
xColumn(i_xSelectColumns->getByName(sColumnName),UNO_QUERY);
1585 sValue = i_aPredicateInputController.getPredicateValueStr(sValue,xColumn);
1589 sValue = i_aPredicateInputController.getPredicateValueStr(pAndIter->Name,sValue);
1591 lcl_addFilterCriteria_throw(pAndIter->Handle,sValue,sRet);
1593 if ( pAndIter != pAndEnd )
1599 if ( pOrIter != pOrEnd && !sRet.isEmpty() )
1602 return sRet.makeStringAndClear();
1622 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1625 || !column->getPropertySetInfo()->hasPropertyByName(
PROPERTY_VALUE)
1626 || !column->getPropertySetInfo()->hasPropertyByName(
PROPERTY_NAME)
1627 || !column->getPropertySetInfo()->hasPropertyByName(
PROPERTY_TYPE))
1630 sal_Int32
nType = 0;
1633 if(nSearchable == ColumnSearch::NONE)
1636 ::osl::MutexGuard aGuard(
m_aMutex );
1643 OUStringBuffer aSQL;
1644 const OUString aQuote =
m_xMetaData->getIdentifierQuoteString();
1652 Reference<XPropertySet>
xColumn;
1654 OSL_ENSURE(
xColumn->getPropertySetInfo()->hasPropertyByName(
PROPERTY_REALNAME),
"Property REALNAME not available!");
1656 OSL_ENSURE(
xColumn->getPropertySetInfo()->hasPropertyByName(
"AggregateFunction"),
"Property AggregateFunction not available!");
1658 OUString sRealName,sTableName;
1661 if(sTableName.indexOf(
'.') != -1)
1663 OUString aCatalog,aSchema,aTable;
1664 ::dbtools::qualifiedNameComponents(
m_xMetaData,sTableName,aCatalog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation);
1665 sTableName = ::dbtools::composeTableName(
m_xMetaData, aCatalog, aSchema, aTable,
true, ::dbtools::EComposeRule::InDataManipulation );
1668 sTableName = ::dbtools::quoteName(aQuote,sTableName);
1670 if ( !::comphelper::getBOOL(
xColumn->getPropertyValue(
"Function")) )
1672 aSQL = sTableName +
"." + ::dbtools::quoteName( aQuote, sRealName );
1682 if ( aValue.hasValue() )
1688 if (
nType != DataType::BOOLEAN && DataType::BIT !=
nType )
1690 lcl_addFilterCriteria_throw(filterOperator,
u"",aSQL);
1695 case DataType::VARCHAR:
1696 case DataType::CHAR:
1697 case DataType::LONGVARCHAR:
1700 case DataType::CLOB:
1702 Reference< XClob > xClob(aValue,UNO_QUERY);
1705 const ::sal_Int64
nLength = xClob->length();
1708 aSQL.append(
"'" + xClob->getSubString(1,
static_cast<sal_Int32
>(
nLength)) +
"'");
1717 case DataType::VARBINARY:
1718 case DataType::BINARY:
1719 case DataType::LONGVARBINARY:
1721 Sequence<sal_Int8>
aSeq;
1722 if(!(aValue >>=
aSeq))
1724 if(nSearchable == ColumnSearch::CHAR)
1726 aSQL.append(
"\'" );
1728 aSQL.append(
"0x" );
1731 for(;pBegin != pEnd;++pBegin)
1733 aSQL.append(
static_cast<sal_Int32
>(*pBegin), 16 );
1735 if(nSearchable == ColumnSearch::CHAR)
1736 aSQL.append(
"\'" );
1740 case DataType::BOOLEAN:
1742 bool bValue =
false;
1743 m_xTypeConverter->convertToSimpleType(aValue, TypeClass_BOOLEAN) >>= bValue;
1745 OUString sColumnExp = aSQL.makeStringAndClear();
1756 sal_Int32 nFilterOp = filterOperator;
1757 if ( filterOperator != SQLFilterOperator::SQLNULL && filterOperator != SQLFilterOperator::NOT_SQLNULL )
1758 nFilterOp = SQLFilterOperator::SQLNULL;
1759 lcl_addFilterCriteria_throw(nFilterOp,
u"",aSQL);
1766 if ( !sFilter.isEmpty() && !aSQL.isEmpty() )
1769 (andCriteria ? std::u16string_view(
STR_AND) : std::u16string_view(
STR_OR));
1774 _aSetFunctor(
this,sFilter);
1776 catch (css::lang::WrappedTargetException & e)
1778 if (e.TargetException.isExtractableTo(
1792 ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
1796 Sequence< Sequence< PropertyValue > > aFilterSeq;
1800 if ( !sFilter.isEmpty() )
1815 #if OSL_DEBUG_LEVEL > 0
1816 OUString sCondition;
1821 pCondition = pWhereNode->
getChild(1);
1822 #if OSL_DEBUG_LEVEL > 0
1828 pCondition = pWhereNode->
getChild(1);
1829 #if OSL_DEBUG_LEVEL > 0
1835 pCondition = pWhereNode->
getChild(1);
1836 #if OSL_DEBUG_LEVEL > 0
1842 std::vector< std::vector < PropertyValue > > aFilters;
1848 aFilterSeq.realloc(aFilters.size());
1849 Sequence<PropertyValue>* pFilters = aFilterSeq.getArray();
1850 for (
auto const&
filter : aFilters)
1852 pFilters->realloc(
filter.size());
1853 PropertyValue* pFilter = pFilters->getArray();
1854 for (
auto const& elem :
filter)
1876 SAL_WARN(
"dbaccess",
"OSingleSelectQueryComposer::getKeyWord: Invalid enum value!" );
1913 SAL_WARN(
"dbaccess",
"Invalid enum value!");
1917 if ( _bWithKeyword && !sRet.isEmpty() )
1918 sRet = sKeyword + sRet;
constexpr OUStringLiteral COMMA
constexpr OUStringLiteral STR_ORDER_BY
constexpr OUStringLiteral STR_GROUP_BY
constexpr OUStringLiteral STR_OR
constexpr OUStringLiteral STR_LIKE
constexpr OUStringLiteral R_BRACKET
constexpr OUStringLiteral STR_WHERE
constexpr OUStringLiteral STR_HAVING
constexpr OUStringLiteral STR_SELECT
constexpr OUStringLiteral STR_FROM
constexpr OUStringLiteral STR_AND
constexpr OUStringLiteral L_BRACKET
::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)
static void absorptions(OSQLParseNode *&pSearchCondition)
bool parseNodeToExecutableStatement(OUString &_out_rString, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, OSQLParser &_rParser, css::sdbc::SQLException *_pErrorHolder) const
static void negateSearchCondition(OSQLParseNode *&pSearchCondition, bool bNegate=false)
static void disjunctiveNormalForm(OSQLParseNode *&pSearchCondition)
void parseNodeToStr(OUString &rString, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const IParseContext *pContext=nullptr, bool _bIntl=false, bool _bQuote=true) const
void parseNodeToPredicateStr(OUString &rString, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const css::lang::Locale &rIntl, OUString _sDec, const IParseContext *pContext=nullptr) const
OSQLParseNode * getChild(sal_uInt32 nPos) const
SQLNodeType getNodeType() const
const ::rtl::Reference< OSQLColumns > & getParameters() const
const OSQLParseNode * getSimpleGroupByTree() const
const ::rtl::Reference< OSQLColumns > & getSelectColumns() const
const OSQLTables & getTables() const
void getColumnRange(const OSQLParseNode *_pColumnRef, OUString &_rColumnName, OUString &_rTableRange) const
void setParseTree(const OSQLParseNode *pNewParseTree)
const ::rtl::Reference< OSQLColumns > & getGroupColumns() const
const OSQLParseNode * getParseTree() const
const OSQLParseNode * getSimpleHavingTree() const
const ::rtl::Reference< OSQLColumns > & getOrderColumns() const
const OSQLParseNode * getSimpleWhereTree() const
const OSQLParseNode * getWhereTree() const
const OSQLParseNode * getSimpleOrderTree() const
std::unique_ptr< OSQLParseNode > parseTree(OUString &rErrorMessage, const OUString &rStatement, bool bInternational=false)
static rtl::Reference< OParseColumn > createColumnForResultSet(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_rxResMetaData, const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxDBMetaData, sal_Int32 _nColumnPos, StringMap &_rColumns)
static ::rtl::Reference< OSQLColumns > createColumnsForResultSet(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_rxResMetaData, const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxDBMetaData, const css::uno::Reference< css::container::XNameAccess > &i_xQueryColumns)
std::map< OUString, int > StringMap
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual void disposing() override
static std::unique_ptr< OPrivateColumns > createWithIntrinsicNames(const ::rtl::Reference< ::connectivity::OSQLColumns > &_rColumns, bool _bCase, ::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex)
creates a columns instance as above, but taking the names from the columns itself
void setConditionByColumn(const css::uno::Reference< css::beans::XPropertySet > &column, bool andCriteria, std::function< bool(OSingleSelectQueryComposer *, const OUString &)> const &_aSetFunctor, sal_Int32 filterOperator)
OUString getTableAlias(const css::uno::Reference< css::beans::XPropertySet > &column) const
std::unique_ptr< OPrivateTables > m_pTables
sal_Int32 m_nBoolCompareMode
OUString impl_getColumnNameOrderBy_throw(const css::uno::Reference< css::beans::XPropertySet > &column)
return the name of the column in the query for ORDER BY clause.
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual OUString SAL_CALL getGroup() override
std::vector< std::unique_ptr< OPrivateColumns > > m_aColumnsCollection
bool implSetFilter(const OUString &_sFilter)
::connectivity::OSQLParser m_aSqlParser
OUString m_aPureSelectSQL
css::lang::Locale m_aLocale
OUString getStatementPart(TGetParseNode const &_aGetFunctor, ::connectivity::OSQLParseTreeIterator &_rIterator)
retrieves a particular part of a statement
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
::connectivity::OSQLParseTreeIterator m_aAdditiveIterator
css::uno::Reference< css::container::XNameAccess > m_xConnectionTables
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
OUString composeStatementFromParts(const std::vector< OUString > &_rParts)
composes a statement from m_aPureSelectSQL and the 4 usual clauses
virtual void SAL_CALL appendOrderByColumn(const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool ascending) override
::connectivity::OSQLParseTreeIterator m_aSqlIterator
virtual void SAL_CALL setElementaryQuery(const OUString &_rElementary) override
bool setANDCriteria(::connectivity::OSQLParseNode const *pCondition, ::connectivity::OSQLParseTreeIterator &_rIterator, std::vector< css::beans::PropertyValue > &rFilters, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
std::function< const ::connectivity::OSQLParseNode *(::connectivity::OSQLParseTreeIterator *)> TGetParseNode
bool setORCriteria(::connectivity::OSQLParseNode const *pCondition, ::connectivity::OSQLParseTreeIterator &_rIterator, std::vector< std::vector< css::beans::PropertyValue > > &rFilters, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
virtual void SAL_CALL setStructuredHavingClause(const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &filter) override
virtual OUString SAL_CALL getHavingClause() override
std::vector< std::unique_ptr< OPrivateTables > > m_aTablesCollection
virtual OUString SAL_CALL getFilter() override
virtual void SAL_CALL setOrder(const OUString &order) override
css::uno::Reference< css::sdbc::XConnection > m_xConnection
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables() override
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredFilter() override
virtual OUString SAL_CALL getOrder() override
bool setComparisonPredicate(::connectivity::OSQLParseNode const *pCondition, ::connectivity::OSQLParseTreeIterator const &_rIterator, std::vector< css::beans::PropertyValue > &rFilters, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
css::uno::Reference< css::container::XNameAccess > m_xConnectionQueries
void setQuery_Impl(const OUString &command)
virtual void SAL_CALL appendFilterByColumn(const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool andCriteria, sal_Int32 filterOperator) override
static void incSQLPart(SQLPart &e)
std::vector< OUString > m_aElementaryParts
virtual void SAL_CALL setFilter(const OUString &filter) override
css::uno::Reference< css::container::XIndexAccess > setCurrentColumns(EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns > &_rCols)
virtual void SAL_CALL setHavingClause(const OUString &filter) override
virtual void SAL_CALL setQuery(const OUString &command) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual OUString SAL_CALL getElementaryQuery() override
::svxform::OSystemParseContext m_aParseContext
virtual void SAL_CALL appendGroupByColumn(const css::uno::Reference< css::beans::XPropertySet > &column) override
virtual OUString SAL_CALL getQueryWithSubstitution() override
void clearCurrentCollections()
virtual void SAL_CALL setGroup(const OUString &group) override
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredHavingClause() override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getGroupColumns() override
virtual void SAL_CALL setCommand(const OUString &command, sal_Int32 CommandType) override
OUString getSQLPart(SQLPart _ePart, ::connectivity::OSQLParseTreeIterator &_rIterator, bool _bWithKeyword)
returns the part of the select statement
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > getStructuredCondition(TGetParseNode const &_aGetFunctor)
getStructuredCondition returns the structured condition for the where or having clause
bool setLikePredicate(::connectivity::OSQLParseNode const *pCondition, ::connectivity::OSQLParseTreeIterator const &_rIterator, std::vector< css::beans::PropertyValue > &rFilters, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
static OUString getKeyword(SQLPart _ePart)
retrieves the keyword for the given SQLPart
css::uno::Reference< css::uno::XComponentContext > m_aContext
void setSingleAdditiveClause(SQLPart _ePart, const OUString &_rClause)
sets a single "additive" clause, means a filter/groupby/having/order clause
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier
OUString impl_getColumnRealName_throw(const css::uno::Reference< css::beans::XPropertySet > &column, bool bGroupBy)
return the name of the column in the source table.
void clearColumns(const EColumnType _eType)
virtual OUString SAL_CALL getQuery() override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters() override
virtual ~OSingleSelectQueryComposer() override
void SAL_CALL disposing() override
bool implSetHavingClause(const OUString &_sFilter)
std::vector< std::unique_ptr< OPrivateColumns > > m_aCurrentColumns
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getOrderColumns() override
static OUString getColumnName(::connectivity::OSQLParseNode const *pColumnRef, ::connectivity::OSQLParseTreeIterator const &_rIterator)
virtual void SAL_CALL setStructuredFilter(const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &filter) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
static sal_Int32 getPredicateType(::connectivity::OSQLParseNode const *_pPredicate)
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual void SAL_CALL appendHavingClauseByColumn(const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool andCriteria, sal_Int32 filterOperator) override
virtual SVXCORE_DLLPUBLIC css::lang::Locale getPreferredLocale() const override
Reference< XComponentContext > m_aContext
#define DBG_UNHANDLED_EXCEPTION(...)
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
OUString getString(const Any &_rAny)
css::uno::Sequence< OUString > getSupportedServiceNames()
std::map< OUString, OSQLTable, comphelper::UStringMixLess > OSQLTables
void SAL_CALL throwException(Any const &exc)
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
Reference< XConnection > m_xConnection
#define SQL_ISRULE(pParseNode, eRule)
#define SQL_ISPUNCTUATION(pParseNode, aString)
#define SQL_ISTOKEN(pParseNode, token)
#define PROPERTY_ID_ORIGINAL
constexpr OUStringLiteral PROPERTY_COMMAND(u"Command")
constexpr OUStringLiteral PROPERTY_LABEL(u"Label")
constexpr OUStringLiteral PROPERTY_ORIGINAL(u"Original")
constexpr OUStringLiteral PROPERTY_SCHEMANAME(u"SchemaName")
constexpr OUStringLiteral PROPERTY_REALNAME(u"RealName")
constexpr OUStringLiteral SERVICE_NAME_SINGLESELECTQUERYCOMPOSER
constexpr OUStringLiteral PROPERTY_BOOLEANCOMPARISONMODE(u"BooleanComparisonMode")
constexpr OUStringLiteral PROPERTY_TABLENAME(u"TableName")
constexpr OUStringLiteral PROPERTY_ESCAPE_PROCESSING(u"EscapeProcessing")
constexpr OUStringLiteral SQLSTATE_GENERAL
constexpr OUStringLiteral PROPERTY_CATALOGNAME(u"CatalogName")
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_VALUE(u"Value")
bool isCaseSensitive() const
OUString getComposedAndClear()
void append(const OUString &lhs)
#define IMPLEMENT_FORWARD_XINTERFACE3(classname, refcountbase, baseclass2, baseclass3)