LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbtools::StatementComposer Class Reference

a class which is able to compose queries (SELECT statements) from a command and a command type More...

#include <statementcomposer.hxx>

Public Member Functions

 StatementComposer (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const OUString &_rCommand, const sal_Int32 _nCommandType, const bool _bEscapeProcessing)
 constructs an instance More...
 
 ~StatementComposer ()
 
void setDisposeComposer (bool _bDoDispose)
 controls whether or not the instance disposes its XSingleSelectQueryComposer upon destruction More...
 
void setFilter (const OUString &_rFilter)
 
void setHavingClause (const OUString &_rHavingClause)
 
void setOrder (const OUString &_rOrder)
 
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > const & getComposer ()
 returns the composer which has been fed with the current settings More...
 
OUString getQuery ()
 returns the composer statement More...
 

Private Member Functions

 StatementComposer (const StatementComposer &)=delete
 
StatementComposeroperator= (const StatementComposer &)=delete
 
 StatementComposer ()=delete
 

Private Attributes

::std::unique_ptr< StatementComposer_Datam_pData
 

Detailed Description

a class which is able to compose queries (SELECT statements) from a command and a command type

Definition at line 42 of file statementcomposer.hxx.

Constructor & Destructor Documentation

◆ StatementComposer() [1/3]

dbtools::StatementComposer::StatementComposer ( const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const OUString &  _rCommand,
const sal_Int32  _nCommandType,
const bool  _bEscapeProcessing 
)

constructs an instance

Parameters
_rxConnectionthe connection to work with. Must not be <NULL>.

◆ ~StatementComposer()

dbtools::StatementComposer::~StatementComposer ( )

Definition at line 247 of file statementcomposer.cxx.

References m_pData.

◆ StatementComposer() [2/3]

dbtools::StatementComposer::StatementComposer ( const StatementComposer )
privatedelete

◆ StatementComposer() [3/3]

dbtools::StatementComposer::StatementComposer ( )
privatedelete

Member Function Documentation

◆ getComposer()

Reference< XSingleSelectQueryComposer > const & dbtools::StatementComposer::getComposer ( )

returns the composer which has been fed with the current settings

Exceptions
css::sdbc::SQLExceptionif such an exception occurs while creating the composer

Definition at line 280 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

◆ getQuery()

OUString dbtools::StatementComposer::getQuery ( )

returns the composer statement

Effectively, this is equivalent to calling getComposer, and asking the composer for its Query attribute.

Exceptions
css::sdbc::SQLExceptionif such an exception occurs while creating the composer

Definition at line 287 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

◆ operator=()

StatementComposer & dbtools::StatementComposer::operator= ( const StatementComposer )
privatedelete

◆ setDisposeComposer()

void dbtools::StatementComposer::setDisposeComposer ( bool  _bDoDispose)

controls whether or not the instance disposes its XSingleSelectQueryComposer upon destruction

Unless you explicitly call this method with the parameter being <TRUE>, the XSingleSelectQueryComposer will be disposed when the StatementComposer instance is destroyed.

Definition at line 253 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

◆ setFilter()

void dbtools::StatementComposer::setFilter ( const OUString &  _rFilter)

Definition at line 259 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

◆ setHavingClause()

void dbtools::StatementComposer::setHavingClause ( const OUString &  _rHavingClause)

Definition at line 266 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

◆ setOrder()

void dbtools::StatementComposer::setOrder ( const OUString &  _rOrder)

Definition at line 273 of file statementcomposer.cxx.

References m_pData.

Referenced by dbtools::getComposedRowSetStatement().

Member Data Documentation

◆ m_pData

::std::unique_ptr< StatementComposer_Data > dbtools::StatementComposer::m_pData
private

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