LibreOffice Module dbaccess (master) 1
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
dbaccess::OSingleSelectQueryComposer Class Reference

#include <SingleSelectQueryComposer.hxx>

Inheritance diagram for dbaccess::OSingleSelectQueryComposer:
[legend]
Collaboration diagram for dbaccess::OSingleSelectQueryComposer:
[legend]

Public Member Functions

 OSingleSelectQueryComposer (const css::uno::Reference< css::container::XNameAccess > &_xTableSupplier, const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Reference< css::uno::XComponentContext > &_rContext)
 
void SAL_CALL disposing () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
 DECLARE_SERVICE_INFO ()
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const override
 
virtual OUString SAL_CALL getElementaryQuery () override
 
virtual void SAL_CALL setElementaryQuery (const OUString &_rElementary) override
 
virtual void SAL_CALL setFilter (const OUString &filter) override
 
virtual void SAL_CALL setStructuredFilter (const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &filter) override
 
virtual void SAL_CALL appendFilterByColumn (const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool andCriteria, sal_Int32 filterOperator) override
 
virtual void SAL_CALL appendGroupByColumn (const css::uno::Reference< css::beans::XPropertySet > &column) override
 
virtual void SAL_CALL setGroup (const OUString &group) override
 
virtual void SAL_CALL setHavingClause (const OUString &filter) override
 
virtual void SAL_CALL setStructuredHavingClause (const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &filter) override
 
virtual void SAL_CALL appendHavingClauseByColumn (const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool andCriteria, sal_Int32 filterOperator) override
 
virtual void SAL_CALL appendOrderByColumn (const css::uno::Reference< css::beans::XPropertySet > &column, sal_Bool ascending) override
 
virtual void SAL_CALL setOrder (const OUString &order) override
 
virtual OUString SAL_CALL getQuery () override
 
virtual void SAL_CALL setQuery (const OUString &command) override
 
virtual void SAL_CALL setCommand (const OUString &command, sal_Int32 CommandType) override
 
virtual OUString SAL_CALL getFilter () override
 
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredFilter () override
 
virtual OUString SAL_CALL getGroup () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getGroupColumns () override
 
virtual OUString SAL_CALL getHavingClause () override
 
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getStructuredHavingClause () override
 
virtual OUString SAL_CALL getOrder () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getOrderColumns () override
 
virtual OUString SAL_CALL getQueryWithSubstitution () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getParameters () override
 
- Public Member Functions inherited from comphelper::OMutexAndBroadcastHelper
 OMutexAndBroadcastHelper ()
 
::osl::Mutex & GetMutex ()
 
::cppu::OBroadcastHelperGetBroadcastHelper ()
 
const ::cppu::OBroadcastHelperGetBroadcastHelper () const
 
- Public Member Functions inherited from OSubComponent
 OSubComponent (::osl::Mutex &_rMutex, const css::uno::Reference< css::uno::XInterface > &_xParent)
 
virtual void SAL_CALL release () noexcept override
 
 operator css::uno::Reference< css::uno::XInterface > () const
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 
- Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OSingleSelectQueryComposer >
 OPropertyArrayUsageHelper ()
 
virtual ~OPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper ()
 
- Public Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

Protected Member Functions

virtual ~OSingleSelectQueryComposer () override
 
- Protected Member Functions inherited from OSubComponent
virtual ~OSubComponent () override
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
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)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const =0
 
- Protected Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
 ~ImplHelper5 () SAL_NOEXCEPT
 

Private Types

enum  SQLPart {
  Where = 0 ,
  Group ,
  Having ,
  Order ,
  SQLPartCount
}
 
enum  EColumnType {
  SelectColumns = 0 ,
  GroupByColumns = 1 ,
  OrderColumns = 2 ,
  ParameterColumns = 3
}
 
typedef std::function< const ::connectivity::OSQLParseNode *(::connectivity::OSQLParseTreeIterator *)> TGetParseNode
 

Private Member Functions

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
 
bool setANDCriteria (::connectivity::OSQLParseNode const *pCondition, ::connectivity::OSQLParseTreeIterator &_rIterator, std::vector< css::beans::PropertyValue > &rFilters, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const
 
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
 
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
 
OUString getTableAlias (const css::uno::Reference< css::beans::XPropertySet > &column) const
 
void clearCurrentCollections ()
 
void clearColumns (const EColumnType _eType)
 
OUString getStatementPart (TGetParseNode const &_aGetFunctor, ::connectivity::OSQLParseTreeIterator &_rIterator)
 retrieves a particular part of a statement More...
 
void setQuery_Impl (const OUString &command)
 
void setConditionByColumn (const css::uno::Reference< css::beans::XPropertySet > &column, bool andCriteria, std::function< bool(OSingleSelectQueryComposer *, const OUString &)> const &_aSetFunctor, sal_Int32 filterOperator)
 
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > getStructuredCondition (TGetParseNode const &_aGetFunctor)
 getStructuredCondition returns the structured condition for the where or having clause More...
 
css::uno::Reference< css::container::XIndexAccess > setCurrentColumns (EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns > &_rCols)
 
bool implSetFilter (const OUString &_sFilter)
 
bool implSetHavingClause (const OUString &_sFilter)
 
OUString getSQLPart (SQLPart _ePart, ::connectivity::OSQLParseTreeIterator &_rIterator, bool _bWithKeyword)
 returns the part of the select statement More...
 
void setSingleAdditiveClause (SQLPart _ePart, const OUString &_rClause)
 sets a single "additive" clause, means a filter/groupby/having/order clause More...
 
OUString composeStatementFromParts (const std::vector< OUString > &_rParts)
 composes a statement from m_aPureSelectSQL and the 4 usual clauses More...
 
OUString impl_getColumnRealName_throw (const css::uno::Reference< css::beans::XPropertySet > &column, bool bGroupBy)
 return the name of the column in the source table. More...
 
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. More...
 

Static Private Member Functions

static void incSQLPart (SQLPart &e)
 
static OUString getColumnName (::connectivity::OSQLParseNode const *pColumnRef, ::connectivity::OSQLParseTreeIterator const &_rIterator)
 
static sal_Int32 getPredicateType (::connectivity::OSQLParseNode const *_pPredicate)
 
static OUString getKeyword (SQLPart _ePart)
 retrieves the keyword for the given SQLPart More...
 

Private Attributes

::svxform::OSystemParseContext m_aParseContext
 
::connectivity::OSQLParser m_aSqlParser
 
::connectivity::OSQLParseTreeIterator m_aSqlIterator
 
::connectivity::OSQLParseTreeIterator m_aAdditiveIterator
 
std::vector< std::unique_ptr< OPrivateColumns > > m_aColumnsCollection
 
std::vector< std::unique_ptr< OPrivateTables > > m_aTablesCollection
 
std::vector< OUString > m_aElementaryParts
 
css::uno::Reference< css::sdbc::XConnection > m_xConnection
 
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
 
css::uno::Reference< css::container::XNameAccess > m_xConnectionTables
 
css::uno::Reference< css::container::XNameAccess > m_xConnectionQueries
 
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier
 
css::uno::Reference< css::uno::XComponentContext > m_aContext
 
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
 
std::vector< std::unique_ptr< OPrivateColumns > > m_aCurrentColumns
 
std::unique_ptr< OPrivateTablesm_pTables
 
OUString m_aPureSelectSQL
 
OUString m_sDecimalSep
 
OUString m_sCommand
 
css::lang::Locale m_aLocale
 
sal_Int32 m_nBoolCompareMode
 
sal_Int32 m_nCommandType
 
OUString m_sOriginal
 

Additional Inherited Members

- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Static Protected Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OSingleSelectQueryComposer >
static std::mutextheMutex ()
 
- Protected Attributes inherited from comphelper::OMutexAndBroadcastHelper
::osl::Mutex m_aMutex
 
::cppu::OBroadcastHelper m_aBHelper
 
- Protected Attributes inherited from OSubComponent
css::uno::Reference< css::uno::XInterface > m_xParent
 
- Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< OSingleSelectQueryComposer >
static sal_Int32 s_nRefCount
 
::cppu::IPropertyArrayHelpers_pProps
 

Detailed Description

Definition at line 53 of file SingleSelectQueryComposer.hxx.

Member Typedef Documentation

◆ TGetParseNode

Definition at line 77 of file SingleSelectQueryComposer.hxx.

Member Enumeration Documentation

◆ EColumnType

Enumerator
SelectColumns 
GroupByColumns 
OrderColumns 
ParameterColumns 

Definition at line 69 of file SingleSelectQueryComposer.hxx.

◆ SQLPart

Enumerator
Where 
Group 
Having 
Order 
SQLPartCount 

Definition at line 59 of file SingleSelectQueryComposer.hxx.

Constructor & Destructor Documentation

◆ ~OSingleSelectQueryComposer()

OSingleSelectQueryComposer::~OSingleSelectQueryComposer ( )
overrideprotectedvirtual

Definition at line 261 of file SingleSelectQueryComposer.cxx.

◆ OSingleSelectQueryComposer()

OSingleSelectQueryComposer::OSingleSelectQueryComposer ( const css::uno::Reference< css::container::XNameAccess > &  _xTableSupplier,
const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const css::uno::Reference< css::uno::XComponentContext > &  _rContext 
)

Member Function Documentation

◆ appendFilterByColumn()

void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn ( const css::uno::Reference< css::beans::XPropertySet > &  column,
sal_Bool  andCriteria,
sal_Int32  filterOperator 
)
overridevirtual

Definition at line 459 of file SingleSelectQueryComposer.cxx.

References implSetFilter(), and setConditionByColumn().

◆ appendGroupByColumn()

void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn ( const css::uno::Reference< css::beans::XPropertySet > &  column)
overridevirtual

◆ appendHavingClauseByColumn()

void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn ( const css::uno::Reference< css::beans::XPropertySet > &  column,
sal_Bool  andCriteria,
sal_Int32  filterOperator 
)
overridevirtual

Definition at line 453 of file SingleSelectQueryComposer.cxx.

References implSetHavingClause(), and setConditionByColumn().

◆ appendOrderByColumn()

void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn ( const css::uno::Reference< css::beans::XPropertySet > &  column,
sal_Bool  ascending 
)
overridevirtual

◆ clearColumns()

void OSingleSelectQueryComposer::clearColumns ( const EColumnType  _eType)
private

◆ clearCurrentCollections()

void OSingleSelectQueryComposer::clearCurrentCollections ( )
private

◆ composeStatementFromParts()

OUString OSingleSelectQueryComposer::composeStatementFromParts ( const std::vector< OUString > &  _rParts)
private

composes a statement from m_aPureSelectSQL and the 4 usual clauses

Definition at line 598 of file SingleSelectQueryComposer.cxx.

References getKeyword(), incSQLPart(), m_aPureSelectSQL, SQLPartCount, and Where.

Referenced by getElementaryQuery(), and setElementaryQuery().

◆ createArrayHelper()

cppu::IPropertyArrayHelper * OSingleSelectQueryComposer::createArrayHelper ( ) const
overridevirtual

◆ DECLARE_SERVICE_INFO()

dbaccess::OSingleSelectQueryComposer::DECLARE_SERVICE_INFO ( )

◆ disposing()

void SAL_CALL OSingleSelectQueryComposer::disposing ( )
override

◆ getColumnName()

OUString OSingleSelectQueryComposer::getColumnName ( ::connectivity::OSQLParseNode const *  pColumnRef,
::connectivity::OSQLParseTreeIterator const &  _rIterator 
)
staticprivate

◆ getColumns()

Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns ( )
overridevirtual

◆ getElementaryQuery()

OUString SAL_CALL OSingleSelectQueryComposer::getElementaryQuery ( )
overridevirtual

◆ getFilter()

OUString SAL_CALL OSingleSelectQueryComposer::getFilter ( )
overridevirtual

◆ getGroup()

OUString SAL_CALL OSingleSelectQueryComposer::getGroup ( )
overridevirtual

◆ getGroupColumns()

Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getGroupColumns ( )
overridevirtual

◆ getHavingClause()

OUString OSingleSelectQueryComposer::getHavingClause ( )
overridevirtual

◆ getImplementationId()

css::uno::Sequence< sal_Int8 > OSingleSelectQueryComposer::getImplementationId ( )
overridevirtual

◆ getInfoHelper()

cppu::IPropertyArrayHelper & OSingleSelectQueryComposer::getInfoHelper ( )
override

◆ getKeyword()

OUString OSingleSelectQueryComposer::getKeyword ( SQLPart  _ePart)
staticprivate

retrieves the keyword for the given SQLPart

Definition at line 1870 of file SingleSelectQueryComposer.cxx.

References Group, Having, Order, SAL_WARN, STR_GROUP_BY, STR_HAVING, STR_ORDER_BY, STR_WHERE, and Where.

Referenced by composeStatementFromParts(), getSQLPart(), and setSingleAdditiveClause().

◆ getOrder()

OUString SAL_CALL OSingleSelectQueryComposer::getOrder ( )
overridevirtual

◆ getOrderColumns()

Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns ( )
overridevirtual

◆ getParameters()

Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters ( )
overridevirtual

◆ getPredicateType()

sal_Int32 OSingleSelectQueryComposer::getPredicateType ( ::connectivity::OSQLParseNode const *  _pPredicate)
staticprivate

◆ getPropertySetInfo()

css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OSingleSelectQueryComposer::getPropertySetInfo ( )
overridevirtual

Definition at line 314 of file SingleSelectQueryComposer.cxx.

References getInfoHelper().

◆ getQuery()

OUString SAL_CALL OSingleSelectQueryComposer::getQuery ( )
overridevirtual

◆ getQueryWithSubstitution()

OUString SAL_CALL OSingleSelectQueryComposer::getQueryWithSubstitution ( )
overridevirtual

◆ getSQLPart()

OUString OSingleSelectQueryComposer::getSQLPart ( SQLPart  _ePart,
::connectivity::OSQLParseTreeIterator _rIterator,
bool  _bWithKeyword 
)
private

returns the part of the select statement

Parameters
_ePartWhich part should be returned.
_bWithKeywordIf <TRUE> the keyword will be added too. Otherwise not.
_rIteratorThe iterator to use.
Returns
The part of the select statement.

Definition at line 1894 of file SingleSelectQueryComposer.cxx.

References getKeyword(), connectivity::OSQLParseTreeIterator::getSimpleGroupByTree(), connectivity::OSQLParseTreeIterator::getSimpleHavingTree(), connectivity::OSQLParseTreeIterator::getSimpleOrderTree(), connectivity::OSQLParseTreeIterator::getSimpleWhereTree(), getStatementPart(), Group, Having, Order, SAL_WARN, and Where.

Referenced by getColumns(), getFilter(), getGroup(), getHavingClause(), getOrder(), setElementaryQuery(), and setSingleAdditiveClause().

◆ getStatementPart()

OUString OSingleSelectQueryComposer::getStatementPart ( TGetParseNode const &  _aGetFunctor,
::connectivity::OSQLParseTreeIterator _rIterator 
)
private

retrieves a particular part of a statement

Parameters
_rIteratorthe iterator to use.

Definition at line 1514 of file SingleSelectQueryComposer.cxx.

References m_xConnection, and connectivity::OSQLParseNode::parseNodeToStr().

Referenced by getQuery(), getSQLPart(), and getStructuredCondition().

◆ getStructuredCondition()

Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredCondition ( TGetParseNode const &  _aGetFunctor)
private

◆ getStructuredFilter()

Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredFilter ( )
overridevirtual

◆ getStructuredHavingClause()

Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredHavingClause ( )
overridevirtual

◆ getTableAlias()

OUString OSingleSelectQueryComposer::getTableAlias ( const css::uno::Reference< css::beans::XPropertySet > &  column) const
private

◆ getTables()

Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables ( )
overridevirtual

◆ getTypes()

css::uno::Sequence< css::uno::Type > OSingleSelectQueryComposer::getTypes ( )
overridevirtual

◆ impl_getColumnNameOrderBy_throw()

OUString OSingleSelectQueryComposer::impl_getColumnNameOrderBy_throw ( const css::uno::Reference< css::beans::XPropertySet > &  column)
private

return the name of the column in the query for ORDER BY clause.

That is, for (SELECT a AS b FROM t), it returns "b"

Throws exception if trying to use an unrelated column and the database does not support that.

Definition at line 535 of file SingleSelectQueryComposer.cxx.

References aName, Any, DBA_RES, getColumns(), impl_getColumnRealName_throw(), m_aCurrentColumns, m_xMetaData, PROPERTY_NAME(), SelectColumns, and SQLSTATE_GENERAL.

Referenced by appendOrderByColumn().

◆ impl_getColumnRealName_throw()

OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw ( const css::uno::Reference< css::beans::XPropertySet > &  column,
bool  bGroupBy 
)
private

return the name of the column in the source table.

That is, for (SELECT a AS b FROM t), it returns A or "t"."A", as appropriate.

Use e.g. for WHERE, GROUP BY and HAVING clauses.

Parameters
bGroupByfor GROUP BY clause? In that case, throw exception if trying to use an unrelated column and the database does not support that.

Definition at line 465 of file SingleSelectQueryComposer.cxx.

References aName, Any, DBA_RES, getColumns(), getTableAlias(), m_aCurrentColumns, m_xMetaData, PROPERTY_NAME(), PROPERTY_REALNAME(), PROPERTY_TABLENAME(), SelectColumns, SQLSTATE_GENERAL, and xColumn.

Referenced by appendGroupByColumn(), and impl_getColumnNameOrderBy_throw().

◆ implSetFilter()

bool dbaccess::OSingleSelectQueryComposer::implSetFilter ( const OUString &  _sFilter)
inlineprivate

Definition at line 155 of file SingleSelectQueryComposer.hxx.

References setFilter().

Referenced by appendFilterByColumn().

◆ implSetHavingClause()

bool dbaccess::OSingleSelectQueryComposer::implSetHavingClause ( const OUString &  _sFilter)
inlineprivate

Definition at line 156 of file SingleSelectQueryComposer.hxx.

References setHavingClause().

Referenced by appendHavingClauseByColumn().

◆ incSQLPart()

static void dbaccess::OSingleSelectQueryComposer::incSQLPart ( SQLPart e)
inlinestaticprivate

◆ setANDCriteria()

bool OSingleSelectQueryComposer::setANDCriteria ( ::connectivity::OSQLParseNode const *  pCondition,
::connectivity::OSQLParseTreeIterator _rIterator,
std::vector< css::beans::PropertyValue > &  rFilters,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
) const
private

◆ setCommand()

void SAL_CALL OSingleSelectQueryComposer::setCommand ( const OUString &  command,
sal_Int32  CommandType 
)
overridevirtual

◆ setComparisonPredicate()

bool OSingleSelectQueryComposer::setComparisonPredicate ( ::connectivity::OSQLParseNode const *  pCondition,
::connectivity::OSQLParseTreeIterator const &  _rIterator,
std::vector< css::beans::PropertyValue > &  rFilters,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
) const
private

◆ setConditionByColumn()

void OSingleSelectQueryComposer::setConditionByColumn ( const css::uno::Reference< css::beans::XPropertySet > &  column,
bool  andCriteria,
std::function< bool(OSingleSelectQueryComposer *, const OUString &)> const &  _aSetFunctor,
sal_Int32  filterOperator 
)
private

◆ setCurrentColumns()

Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns ( EColumnType  _eType,
const ::rtl::Reference< ::connectivity::OSQLColumns > &  _rCols 
)
private

◆ setElementaryQuery()

void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery ( const OUString &  _rElementary)
overridevirtual

◆ setFilter()

void SAL_CALL OSingleSelectQueryComposer::setFilter ( const OUString &  filter)
overridevirtual

Definition at line 727 of file SingleSelectQueryComposer.cxx.

References setSingleAdditiveClause(), and Where.

Referenced by implSetFilter(), and setStructuredFilter().

◆ setGroup()

void SAL_CALL OSingleSelectQueryComposer::setGroup ( const OUString &  group)
overridevirtual

Definition at line 737 of file SingleSelectQueryComposer.cxx.

References group, and setSingleAdditiveClause().

Referenced by appendGroupByColumn().

◆ setHavingClause()

void SAL_CALL OSingleSelectQueryComposer::setHavingClause ( const OUString &  filter)
overridevirtual

◆ setLikePredicate()

bool OSingleSelectQueryComposer::setLikePredicate ( ::connectivity::OSQLParseNode const *  pCondition,
::connectivity::OSQLParseTreeIterator const &  _rIterator,
std::vector< css::beans::PropertyValue > &  rFilters,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
) const
private

◆ setORCriteria()

bool OSingleSelectQueryComposer::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
private

◆ setOrder()

void SAL_CALL OSingleSelectQueryComposer::setOrder ( const OUString &  order)
overridevirtual

Definition at line 732 of file SingleSelectQueryComposer.cxx.

References setSingleAdditiveClause().

Referenced by appendOrderByColumn().

◆ setQuery()

void SAL_CALL OSingleSelectQueryComposer::setQuery ( const OUString &  command)
overridevirtual

◆ setQuery_Impl()

void OSingleSelectQueryComposer::setQuery_Impl ( const OUString &  command)
private

◆ setSingleAdditiveClause()

void OSingleSelectQueryComposer::setSingleAdditiveClause ( SQLPart  _ePart,
const OUString &  _rClause 
)
private

◆ setStructuredFilter()

void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter ( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &  filter)
overridevirtual

◆ setStructuredHavingClause()

void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause ( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &  filter)
overridevirtual

Member Data Documentation

◆ m_aAdditiveIterator

::connectivity::OSQLParseTreeIterator dbaccess::OSingleSelectQueryComposer::m_aAdditiveIterator
private

◆ m_aColumnsCollection

std::vector<std::unique_ptr<OPrivateColumns> > dbaccess::OSingleSelectQueryComposer::m_aColumnsCollection
private

Definition at line 83 of file SingleSelectQueryComposer.hxx.

Referenced by clearColumns(), and clearCurrentCollections().

◆ m_aContext

css::uno::Reference< css::uno::XComponentContext> dbaccess::OSingleSelectQueryComposer::m_aContext
private

◆ m_aCurrentColumns

std::vector<std::unique_ptr<OPrivateColumns> > dbaccess::OSingleSelectQueryComposer::m_aCurrentColumns
private

◆ m_aElementaryParts

std::vector< OUString > dbaccess::OSingleSelectQueryComposer::m_aElementaryParts
private

◆ m_aLocale

css::lang::Locale dbaccess::OSingleSelectQueryComposer::m_aLocale
private

◆ m_aParseContext

::svxform::OSystemParseContext dbaccess::OSingleSelectQueryComposer::m_aParseContext
private

◆ m_aPureSelectSQL

OUString dbaccess::OSingleSelectQueryComposer::m_aPureSelectSQL
private

◆ m_aSqlIterator

::connectivity::OSQLParseTreeIterator dbaccess::OSingleSelectQueryComposer::m_aSqlIterator
private

◆ m_aSqlParser

::connectivity::OSQLParser dbaccess::OSingleSelectQueryComposer::m_aSqlParser
private

◆ m_aTablesCollection

std::vector<std::unique_ptr<OPrivateTables> > dbaccess::OSingleSelectQueryComposer::m_aTablesCollection
private

Definition at line 85 of file SingleSelectQueryComposer.hxx.

Referenced by clearCurrentCollections().

◆ m_nBoolCompareMode

sal_Int32 dbaccess::OSingleSelectQueryComposer::m_nBoolCompareMode
private

◆ m_nCommandType

sal_Int32 dbaccess::OSingleSelectQueryComposer::m_nCommandType
private

Definition at line 105 of file SingleSelectQueryComposer.hxx.

Referenced by getColumns(), setCommand(), and setQuery().

◆ m_pTables

std::unique_ptr<OPrivateTables> dbaccess::OSingleSelectQueryComposer::m_pTables
private

Definition at line 98 of file SingleSelectQueryComposer.hxx.

Referenced by clearCurrentCollections(), getTableAlias(), and getTables().

◆ m_sCommand

OUString dbaccess::OSingleSelectQueryComposer::m_sCommand
private

Definition at line 102 of file SingleSelectQueryComposer.hxx.

Referenced by getColumns(), and setCommand().

◆ m_sDecimalSep

OUString dbaccess::OSingleSelectQueryComposer::m_sDecimalSep
private

◆ m_sOriginal

OUString dbaccess::OSingleSelectQueryComposer::m_sOriginal
private

Definition at line 108 of file SingleSelectQueryComposer.hxx.

Referenced by OSingleSelectQueryComposer(), setCommand(), and setQuery().

◆ m_xConnection

css::uno::Reference< css::sdbc::XConnection> dbaccess::OSingleSelectQueryComposer::m_xConnection
private

◆ m_xConnectionQueries

css::uno::Reference< css::container::XNameAccess> dbaccess::OSingleSelectQueryComposer::m_xConnectionQueries
private

◆ m_xConnectionTables

css::uno::Reference< css::container::XNameAccess> dbaccess::OSingleSelectQueryComposer::m_xConnectionTables
private

Definition at line 91 of file SingleSelectQueryComposer.hxx.

Referenced by disposing(), OSingleSelectQueryComposer(), and setCommand().

◆ m_xMetaData

css::uno::Reference< css::sdbc::XDatabaseMetaData> dbaccess::OSingleSelectQueryComposer::m_xMetaData
private

◆ m_xNumberFormatsSupplier

css::uno::Reference< css::util::XNumberFormatsSupplier > dbaccess::OSingleSelectQueryComposer::m_xNumberFormatsSupplier
private

◆ m_xTypeConverter

css::uno::Reference< css::script::XTypeConverter > dbaccess::OSingleSelectQueryComposer::m_xTypeConverter
private

Definition at line 95 of file SingleSelectQueryComposer.hxx.

Referenced by setConditionByColumn().


The documentation for this class was generated from the following files: