21#include <com/sun/star/sdb/XParametersSupplier.hpp>
22#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
23#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
24#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/script/XTypeConverter.hpp>
38 class XNumberFormatsSupplier;
39 class XNumberFormatter;
45 css::sdb::XParametersSupplier,
46 css::sdbcx::XColumnsSupplier,
47 css::sdbcx::XTablesSupplier,
82 std::vector<std::unique_ptr<OPrivateColumns>>
84 std::vector<std::unique_ptr<OPrivateTables>>
90 css::uno::Reference< css::sdbc::XDatabaseMetaData>
m_xMetaData;
94 css::uno::Reference< css::uno::XComponentContext>
m_aContext;
113 std::vector< std::vector < css::beans::PropertyValue > >& rFilters,
const css::uno::Reference< css::util::XNumberFormatter > & xFormatter)
const;
115 std::vector < css::beans::PropertyValue > & rFilters,
const css::uno::Reference< css::util::XNumberFormatter > & xFormatter)
const;
117 std::vector < css::beans::PropertyValue > & rFilters,
const css::uno::Reference< css::util::XNumberFormatter > & xFormatter)
const;
119 std::vector < css::beans::PropertyValue > & rFilters,
const css::uno::Reference< css::util::XNumberFormatter > & xFormatter)
const;
122 OUString
getTableAlias(
const css::uno::Reference< css::beans::XPropertySet >& column )
const;
139 ,sal_Int32 filterOperator);
148 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >
151 css::uno::Reference< css::container::XIndexAccess >
206 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
207 const css::uno::Reference< css::uno::XComponentContext>& _rContext);
212 virtual css::uno::Sequence<css::uno::Type> SAL_CALL
getTypes()
override;
231 virtual
void SAL_CALL
appendFilterByColumn( const css::
uno::Reference< css::beans::XPropertySet >& column,
sal_Bool andCriteria,sal_Int32 filterOperator ) override;
232 virtual
void SAL_CALL
appendGroupByColumn( const css::
uno::Reference< css::beans::XPropertySet >& column ) override;
233 virtual
void SAL_CALL
setGroup( const OUString& group ) override;
238 virtual
void SAL_CALL
setOrder( const OUString& order ) override;
241 virtual OUString SAL_CALL
getQuery( ) override;
242 virtual
void SAL_CALL
setQuery( const OUString& command ) override;
243 virtual
void SAL_CALL
setCommand( const OUString& command,sal_Int32 CommandType ) override;
244 virtual OUString SAL_CALL
getFilter( ) override;
246 virtual OUString SAL_CALL
getGroup( ) override;
247 virtual css::
uno::Reference< css::container::XIndexAccess > SAL_CALL
getGroupColumns( ) override;
250 virtual OUString SAL_CALL
getOrder( ) override;
251 virtual css::
uno::Reference< css::container::XIndexAccess > SAL_CALL
getOrderColumns( ) override;
255 virtual css::
uno::Reference< css::container::XNameAccess > SAL_CALL
getColumns( ) override;
257 virtual css::
uno::Reference< css::container::XNameAccess > SAL_CALL
getTables( ) override;
259 virtual css::
uno::Reference< css::container::XIndexAccess > SAL_CALL
getParameters( ) override;
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
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)
::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
::cppu::ImplHelper5< css::sdb::XSingleSelectQueryComposer, css::sdb::XParametersSupplier, css::sdbcx::XColumnsSupplier, css::sdbcx::XTablesSupplier, css::lang::XServiceInfo > OSingleSelectQueryComposer_BASE
#define DECLARE_XINTERFACE()