|
| 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.
|
|
const std::string & | GetName () const |
| Get the name of the relationship.
|
|
GDALRelationshipCardinality | GetCardinality () const |
| Get the cardinality of the relationship.
|
|
const std::string & | GetLeftTableName () const |
| Get the name of the left (or base/origin) table in the relationship.
|
|
const std::string & | GetRightTableName () const |
| Get the name of the right (or related/destination) table in the relationship.
|
|
const std::string & | GetMappingTableName () const |
| Get the name of the mapping table for many-to-many relationships.
|
|
void | SetMappingTableName (const std::string &osName) |
| Sets the name of the mapping table for many-to-many relationships.
|
|
const std::vector< std::string > & | GetLeftTableFields () const |
| Get the names of the participating fields from the left table in the relationship.
|
|
const std::vector< std::string > & | GetRightTableFields () const |
| Get the names of the participating fields from the right table in the relationship.
|
|
void | SetLeftTableFields (const std::vector< std::string > &osListFields) |
| Sets the names of the participating fields from the left table in the relationship.
|
|
void | SetRightTableFields (const std::vector< std::string > &osListFields) |
| Sets the names of the participating fields from the right table in the relationship.
|
|
const std::vector< std::string > & | GetLeftMappingTableFields () const |
| Get the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.
|
|
const std::vector< std::string > & | GetRightMappingTableFields () const |
| Get the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
|
|
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 table in the relationship.
|
|
void | SetRightMappingTableFields (const std::vector< std::string > &osListFields) |
| Sets the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
|
|
GDALRelationshipType | GetType () const |
| Get the type of the relationship.
|
|
void | SetType (GDALRelationshipType eType) |
| Sets the type of the relationship.
|
|
const std::string & | GetForwardPathLabel () const |
| Get the label of the forward path for the relationship.
|
|
void | SetForwardPathLabel (const std::string &osLabel) |
| Sets the label of the forward path for the relationship.
|
|
const std::string & | GetBackwardPathLabel () const |
| Get the label of the backward path for the relationship.
|
|
void | SetBackwardPathLabel (const std::string &osLabel) |
| Sets the label of the backward path for the relationship.
|
|
const std::string & | GetRelatedTableType () const |
| Get the type string of the related table.
|
|
void | SetRelatedTableType (const std::string &osType) |
| Sets the type string of the related table.
|
|
Definition of a table relationship.
GDALRelationship describes the relationship between two tables, including properties such as the cardinality of the relationship and the participating tables.
Not all relationship properties are supported by all data formats.
- Since
- GDAL 3.6
const std::string & GDALRelationship::GetBackwardPathLabel |
( |
| ) |
const |
|
inline |
Get the label of the backward path for the relationship.
The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.
E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located
within building 15a".
- See also
- SetBackwardPathLabel()
-
GetForwardPathLabel()
const std::string & GDALRelationship::GetForwardPathLabel |
( |
| ) |
const |
|
inline |
Get the label of the forward path for the relationship.
The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.
E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located
within building 15a".
- See also
- SetForwardPathLabel()
-
GetBackwardPathLabel()
const std::string & GDALRelationship::GetRelatedTableType |
( |
| ) |
const |
|
inline |
Get the type string of the related table.
This a free-form string representing the type of related features, where the exact interpretation is format dependent. For instance, table types from GeoPackage relationships will directly reflect the categories from the GeoPackage related tables extension (i.e. "media", "simple
attributes", "features", "attributes" and "tiles").
- See also
- SetRelatedTableType()
void GDALRelationship::SetBackwardPathLabel |
( |
const std::string & |
osLabel | ) |
|
|
inline |
Sets the label of the backward path for the relationship.
The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.
E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located
within building 15a".
- See also
- GetBackwardPathLabel()
-
SetForwardPathLabel()
void GDALRelationship::SetForwardPathLabel |
( |
const std::string & |
osLabel | ) |
|
|
inline |
Sets the label of the forward path for the relationship.
The forward and backward path labels are free-form, user-friendly strings which can be used to generate descriptions of the relationship between features from the right and left tables.
E.g. when the left table contains buildings and the right table contains furniture, the forward path label could be "contains" and the backward path label could be "is located within". A client could then generate a user friendly description string such as "fire hose 1234 is located
within building 15a".
- See also
- GetForwardPathLabel()
-
SetBackwardPathLabel()
void GDALRelationship::SetRelatedTableType |
( |
const std::string & |
osType | ) |
|
|
inline |
Sets the type string of the related table.
This a free-form string representing the type of related features, where the exact interpretation is format dependent. For instance, table types from GeoPackage relationships will directly reflect the categories from the GeoPackage related tables extension (i.e. "media", "simple
attributes", "features", "attributes" and "tiles").
- See also
- GetRelatedTableType()