te::da::Insert Class Referenceabstract

The Insert object can add the return of a select object. More...

#include <Insert.h>

Inheritance diagram for te::da::Insert:
te::da::Query te::common::BaseVisitable< QueryVisitor >

Public Types

typedef void ReturnType
 
typedef QueryVisitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 
Queryclone () const
 It creates a new copy of this Insert. More...
 
DataSetNamegetDataSetName () const
 It returns the associated DataSetName. More...
 
FieldsgetFields () const
 It returns the associated fields. More...
 
SelectgetSelect () const
 It returns the associated select. More...
 
TE_DEFINE_VISITABLE Insert (DataSetName *d, Fields *f, Select *s)
 Constructor. More...
 
 Insert (const DataSetName &d, const Fields &f, const Select &s)
 Constructor. More...
 
 Insert (DataSetName *d, Select *s)
 Constructor. More...
 
 Insert (const DataSetName &d, const Select &s)
 Constructor. More...
 
 Insert (const Insert &rhs)
 Copy constructor. More...
 
Insertoperator= (const Insert &rhs)
 
void setDataSetName (DataSetName *d)
 It sets the DataSetName associated to this object. More...
 
void setFields (Fields *f)
 It sets the Fields associated to this object. More...
 
void setSelect (Select *s)
 It sets the select associated to this object. More...
 
 ~Insert ()
 Destructor. More...
 

Private Attributes

std::unique_ptr< DataSetNamem_dsName
 The associated DataSetName. More...
 
std::unique_ptr< Fieldsm_fields
 The associated Fields. More...
 
std::unique_ptr< Selectm_select
 The associated Select. More...
 

Detailed Description

The Insert object can add the return of a select object.

See also
Select, Field, Fields, DataSet, DataSetName

Definition at line 50 of file Insert.h.

Member Typedef Documentation

typedef void te::common::BaseVisitable< QueryVisitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

te::da::Insert::Insert ( DataSetName d,
Fields f,
Select s 
)

Constructor.

Parameters
dThe name of the dataset to insert data.
fVector with the fields to set data by select.
sThe real SubSelect to be associated to this object.
Note
The Insert will take the ownership of the Select.

Definition at line 29 of file Insert.cpp.

Referenced by clone().

te::da::Insert::Insert ( const DataSetName d,
const Fields f,
const Select s 
)

Constructor.

Parameters
dThe name of the dataset to insert data.
fVector with the fields to set data by select.
sThe real SubSelect to be associated to this object.

Definition at line 36 of file Insert.cpp.

References m_fields.

te::da::Insert::Insert ( DataSetName d,
Select s 
)

Constructor.

Parameters
dThe name of the dataset to insert data.
sThe real SubSelect to be associated to this object.
Note
The Insert will take the ownership of the Select.

Definition at line 44 of file Insert.cpp.

te::da::Insert::Insert ( const DataSetName d,
const Select s 
)

Constructor.

Parameters
dThe name of the dataset to insert data.
sThe real SubSelect to be associated to this object.

Definition at line 50 of file Insert.cpp.

te::da::Insert::Insert ( const Insert rhs)

Copy constructor.

Definition at line 56 of file Insert.cpp.

References m_dsName, m_fields, m_select, and ~Insert().

te::da::Insert::~Insert ( )
default

Destructor.

Referenced by Insert().

Member Function Documentation

virtual ReturnType te::common::BaseVisitable< QueryVisitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.
te::da::Query * te::da::Insert::clone ( ) const
virtual

It creates a new copy of this Insert.

Implements te::da::Query.

Definition at line 78 of file Insert.cpp.

References Insert().

te::da::DataSetName * te::da::Insert::getDataSetName ( ) const

It returns the associated DataSetName.

Returns
The associated DataSetName.

Definition at line 83 of file Insert.cpp.

References m_dsName.

Referenced by te::da::SQLVisitor::visit().

te::da::Fields * te::da::Insert::getFields ( ) const

It returns the associated fields.

Returns
The associated fields.

Definition at line 93 of file Insert.cpp.

References m_fields.

Referenced by te::da::SQLVisitor::visit().

te::da::Select * te::da::Insert::getSelect ( ) const

It returns the associated select.

Returns
The associated select.

Definition at line 103 of file Insert.cpp.

References m_select.

Referenced by te::da::SQLVisitor::visit().

te::da::Insert & te::da::Insert::operator= ( const Insert rhs)

Assignment operator.

Definition at line 66 of file Insert.cpp.

References m_dsName, m_fields, and m_select.

void te::da::Insert::setDataSetName ( DataSetName d)

It sets the DataSetName associated to this object.

Parameters
dThe Table to be associated to the Insert object.
Note
The Insert will take the ownership of the FromItem.

Definition at line 88 of file Insert.cpp.

References m_dsName.

void te::da::Insert::setFields ( Fields f)

It sets the Fields associated to this object.

Parameters
fFields to be associated to the Insert object.
Note
The Insert will take the ownership of the Fields.

Definition at line 98 of file Insert.cpp.

References m_fields.

void te::da::Insert::setSelect ( Select s)

It sets the select associated to this object.

Parameters
sThe Select to be associated to the Insert object.
Note
The Insert will take the ownership of the Select.

Definition at line 108 of file Insert.cpp.

References m_select.

Member Data Documentation

std::unique_ptr<DataSetName> te::da::Insert::m_dsName
private

The associated DataSetName.

Definition at line 156 of file Insert.h.

Referenced by getDataSetName(), Insert(), operator=(), and setDataSetName().

std::unique_ptr<Fields> te::da::Insert::m_fields
private

The associated Fields.

Definition at line 157 of file Insert.h.

Referenced by getFields(), Insert(), operator=(), and setFields().

std::unique_ptr<Select> te::da::Insert::m_select
private

The associated Select.

Definition at line 158 of file Insert.h.

Referenced by getSelect(), Insert(), operator=(), and setSelect().


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