It describes an index associated to a DataSetType.
More...
#include <Index.h>
It describes an index associated to a DataSetType.
- See also
- DataSetType, PrimaryKey, ForeignKey, CheckConstraint, UniqueKey
Definition at line 52 of file Index.h.
◆ Index() [1/3]
te::da::Index::Index |
( |
DataSetType * |
parent = 0 , |
|
|
unsigned int |
id = 0 |
|
) |
| |
Constructor.
- Parameters
-
dt | The DataSetType associated to this index. |
id | The index identifier. |
- Postcondition
- If dt is provided, the index will belong to the given DataSetType.
-
By default the index type is BTreeType.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
◆ Index() [2/3]
Constructor.
- Parameters
-
name | The index name. |
t | The index type. |
dt | The DataSetType associated to this index. |
id | The index identifier. |
- Postcondition
- If dt is provided, the index will belong to the given DataSetType.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
◆ Index() [3/3]
te::da::Index::Index |
( |
const Index & |
rhs | ) |
|
Copy constructor.
The new object will not have an associated DataSetType.
- Parameters
-
rhs | Right-hand-side instance. |
◆ ~Index()
te::da::Index::~Index |
( |
| ) |
|
◆ add()
It adds the property to the list of properties of the index.
- Parameters
-
p | The property that will take part of the index. |
Definition at line 168 of file Index.h.
References te::dt::Property::clone().
◆ clone()
Index * te::da::Index::clone |
( |
| ) |
const |
It returns a clone of the object.
The new object will not have an associated schema.
- Returns
- A clone of the object.
◆ getDataSetType()
◆ getId()
unsigned int te::da::Index::getId |
( |
| ) |
const |
|
inline |
It returns the index identifier.
- Returns
- A number that identifies the index.
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
Definition at line 117 of file Index.h.
◆ getIndexType()
IndexType te::da::Index::getIndexType |
( |
| ) |
const |
|
inline |
It gets the index type.
- Returns
- The index type.
Definition at line 147 of file Index.h.
◆ getName()
const std::string & te::da::Index::getName |
( |
| ) |
const |
|
inline |
It returns the index name.
- Returns
- The index name.
Definition at line 133 of file Index.h.
◆ getProperties()
const std::vector< te::dt::Property * > & te::da::Index::getProperties |
( |
| ) |
const |
|
inline |
It returns the properties that take part of the index.
- Returns
- The properties that take part of the index.
Definition at line 161 of file Index.h.
◆ has()
bool te::da::Index::has |
( |
const std::string & |
propertyName | ) |
|
It verifies if Property is associated to the index.
- Parameters
-
propertyName | The Property name to be verified. |
- Returns
- True if Property is associated to the index, false otherwise.
◆ operator=()
Index & te::da::Index::operator= |
( |
const Index & |
rhs | ) |
|
Assignment operator.
The new object will not have an assigned DataSetType.
- Parameters
-
rhs | Right-hand-side instance. |
- Returns
- A reference to this.
◆ replace()
void te::da::Index::replace |
( |
const std::string & |
propName, |
|
|
const te::dt::Property * |
pp |
|
) |
| |
It changes the reference to property p to pp.
- Parameters
-
propName | A property name that takes part of the index. |
pp | The property that will take p place. |
- Note
- If the property p is not in the idx attribute list this method does nothing.
◆ setDataSetType()
It sets the DataSetType associated to the index.
- Parameters
-
- Warning
- Take care when calling this method. If the index belongs to a DataSetType, remember to detach it from the DataSetType before calling this method.
Definition at line 185 of file Index.h.
◆ setId()
void te::da::Index::setId |
( |
unsigned int |
id | ) |
|
|
inline |
It sets the DataSetType identifier.
- Parameters
-
- Warning
- The identifier value (id) may be used by data source implementations. So, don't rely on its value!
Definition at line 126 of file Index.h.
◆ setIndexType()
void te::da::Index::setIndexType |
( |
IndexType |
t | ) |
|
|
inline |
It sets the index type.
- Parameters
-
Definition at line 154 of file Index.h.
◆ setName()
void te::da::Index::setName |
( |
const std::string & |
name | ) |
|
|
inline |
It sets the index name.
- Parameters
-
Definition at line 140 of file Index.h.
◆ m_dt
◆ m_id
unsigned int te::da::Index::m_id |
|
private |
An identification number for the index.
Definition at line 217 of file Index.h.
◆ m_name
std::string te::da::Index::m_name |
|
private |
The index name.
Definition at line 220 of file Index.h.
◆ m_properties
The list of properties that form the index.
Definition at line 221 of file Index.h.
◆ m_type
The index type.
Definition at line 218 of file Index.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/dataaccess/dataset/Index.h