13#ifndef GDALRELATIONSHIP_H_INCLUDED
14#define GDALRELATIONSHIP_H_INCLUDED
41 std::string m_osName{};
42 std::string m_osLeftTableName{};
43 std::string m_osRightTableName{};
46 std::string m_osMappingTableName{};
47 std::vector<std::string> m_osListLeftTableFields{};
48 std::vector<std::string> m_osListRightTableFields{};
49 std::vector<std::string> m_osListLeftMappingTableFields{};
50 std::vector<std::string> m_osListRightMappingTableFields{};
52 std::string m_osForwardPathLabel{};
53 std::string m_osBackwardPathLabel{};
54 std::string m_osRelatedTableType{};
67 const std::string &osLeftTableName,
68 const std::string &osRightTableName,
71 : m_osName(osName), m_osLeftTableName(osLeftTableName),
72 m_osRightTableName(osRightTableName), m_eCardinality(eCardinality)
85 return m_eCardinality;
95 return m_osLeftTableName;
105 m_osLeftTableName = osName;
116 return m_osRightTableName;
127 m_osRightTableName = osName;
136 return m_osMappingTableName;
145 m_osMappingTableName = osName;
156 return m_osListLeftTableFields;
167 return m_osListRightTableFields;
178 m_osListLeftTableFields = osListFields;
189 m_osListRightTableFields = osListFields;
200 return m_osListLeftMappingTableFields;
211 return m_osListRightMappingTableFields;
222 m_osListLeftMappingTableFields = osListFields;
234 m_osListRightMappingTableFields = osListFields;
272 return m_osForwardPathLabel;
292 m_osForwardPathLabel = osLabel;
312 return m_osBackwardPathLabel;
332 m_osBackwardPathLabel = osLabel;
347 return m_osRelatedTableType;
362 m_osRelatedTableType = osType;
Definition of a table relationship.
Definition gdal_relationship.h:38
const std::string & GetName() const
Get the name of the relationship.
Definition gdal_relationship.h:77
const std::vector< std::string > & GetLeftMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the left ...
Definition gdal_relationship.h:198
void SetType(GDALRelationshipType eType)
Sets the type of the relationship.
Definition gdal_relationship.h:250
void SetLeftMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the left...
Definition gdal_relationship.h:220
void SetMappingTableName(const std::string &osName)
Sets the name of the mapping table for many-to-many relationships.
Definition gdal_relationship.h:143
static GDALRelationshipH ToHandle(GDALRelationship *poRelationship)
Convert a GDALRelationship* to a GDALRelationshipH.
Definition gdal_relationship.h:367
const std::string & GetForwardPathLabel() const
Get the label of the forward path for the relationship.
Definition gdal_relationship.h:270
const std::string & GetLeftTableName() const
Get the name of the left (or base/origin) table in the relationship.
Definition gdal_relationship.h:93
void SetLeftTableName(const std::string &osName)
Sets the name of the left (or base/origin) table in the relationship.
Definition gdal_relationship.h:103
const std::string & GetBackwardPathLabel() const
Get the label of the backward path for the relationship.
Definition gdal_relationship.h:310
const std::string & GetRelatedTableType() const
Get the type string of the related table.
Definition gdal_relationship.h:345
const std::string & GetMappingTableName() const
Get the name of the mapping table for many-to-many relationships.
Definition gdal_relationship.h:134
void SetLeftTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the left table in the relationship.
Definition gdal_relationship.h:176
GDALRelationshipCardinality GetCardinality() const
Get the cardinality of the relationship.
Definition gdal_relationship.h:83
void SetRightTableFields(const std::vector< std::string > &osListFields)
Sets the names of the participating fields from the right table in the relationship.
Definition gdal_relationship.h:187
void SetForwardPathLabel(const std::string &osLabel)
Sets the label of the forward path for the relationship.
Definition gdal_relationship.h:290
void SetBackwardPathLabel(const std::string &osLabel)
Sets the label of the backward path for the relationship.
Definition gdal_relationship.h:330
const std::vector< std::string > & GetRightTableFields() const
Get the names of the participating fields from the right table in the relationship.
Definition gdal_relationship.h:165
void SetRightMappingTableFields(const std::vector< std::string > &osListFields)
Sets the names of the mapping table fields which correspond to the participating fields from the righ...
Definition gdal_relationship.h:232
static GDALRelationship * FromHandle(GDALRelationshipH hRelationship)
Convert a GDALRelationshipH to a GDALRelationship*.
Definition gdal_relationship.h:374
const std::vector< std::string > & GetRightMappingTableFields() const
Get the names of the mapping table fields which correspond to the participating fields from the right...
Definition gdal_relationship.h:209
GDALRelationship(const std::string &osName, const std::string &osLeftTableName, const std::string &osRightTableName, GDALRelationshipCardinality eCardinality=GDALRelationshipCardinality::GRC_ONE_TO_MANY)
Constructor for a relationship between two tables.
Definition gdal_relationship.h:66
GDALRelationshipType GetType() const
Get the type of the relationship.
Definition gdal_relationship.h:241
void SetRightTableName(const std::string &osName)
Sets the name of the right (or related/destination) table in the relationship.
Definition gdal_relationship.h:125
const std::vector< std::string > & GetLeftTableFields() const
Get the names of the participating fields from the left table in the relationship.
Definition gdal_relationship.h:154
const std::string & GetRightTableName() const
Get the name of the right (or related/destination) table in the relationship.
Definition gdal_relationship.h:114
void SetRelatedTableType(const std::string &osType)
Sets the type string of the related table.
Definition gdal_relationship.h:360
Core portability definitions for CPL.
Public (C callable) GDAL entry points.
GDALRelationshipCardinality
Cardinality of relationship.
Definition gdal.h:2481
@ GRC_ONE_TO_MANY
One-to-many.
Definition gdal.h:2485
GDALRelationshipType
Type of relationship.
Definition gdal.h:2497
@ GRT_ASSOCIATION
Association relationship.
Definition gdal.h:2501
void * GDALRelationshipH
Opaque type used for the C bindings of the C++ GDALRelationship class.
Definition gdal_fwd.h:66