GDAL
|
Definition of a table relationship. More...
#include <gdal_priv.h>
Public Member Functions | |
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. More... | |
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. More... | |
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. More... | |
void | SetMappingTableName (const std::string &osName) |
Sets the name of the mapping table for many-to-many relationships. More... | |
const std::vector< std::string > & | GetLeftTableFields () const |
Get the names of the participating fields from the left table in the relationship. More... | |
const std::vector< std::string > & | GetRightTableFields () const |
Get the names of the participating fields from the right table in the relationship. More... | |
void | SetLeftTableFields (const std::vector< std::string > &osListFields) |
Sets the names of the participating fields from the left table in the relationship. More... | |
void | SetRightTableFields (const std::vector< std::string > &osListFields) |
Sets the names of the participating fields from the right table in the relationship. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
GDALRelationshipType | GetType () const |
Get the type of the relationship. More... | |
void | SetType (GDALRelationshipType eType) |
Sets the type of the relationship. More... | |
const std::string & | GetForwardPathLabel () const |
Get the label of the forward path for the relationship. More... | |
void | SetForwardPathLabel (const std::string &osLabel) |
Sets the label of the forward path for the relationship. More... | |
const std::string & | GetBackwardPathLabel () const |
Get the label of the backward path for the relationship. More... | |
void | SetBackwardPathLabel (const std::string &osLabel) |
Sets the label of the backward path for the relationship. More... | |
const std::string & | GetRelatedTableType () const |
Get the type string of the related table. More... | |
void | SetRelatedTableType (const std::string &osType) |
Sets the type string of the related table. More... | |
Static Public Member Functions | |
static GDALRelationshipH | ToHandle (GDALRelationship *poRelationship) |
Convert a GDALRelationship* to a GDALRelationshipH. | |
static GDALRelationship * | FromHandle (GDALRelationshipH hRelationship) |
Convert a GDALRelationshipH to a GDALRelationship*. | |
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.
|
inline |
Constructor for a relationship between two tables.
osName | relationship name |
osLeftTableName | left table name |
osRightTableName | right table name |
eCardinality | cardinality of relationship |
|
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".
|
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".
|
inline |
Get the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.
|
inline |
Get the names of the participating fields from the left table in the relationship.
|
inline |
Get the name of the left (or base/origin) table in the relationship.
|
inline |
Get the name of the mapping table for many-to-many relationships.
|
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").
|
inline |
Get the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
|
inline |
Get the names of the participating fields from the right table in the relationship.
|
inline |
Get the type of the relationship.
|
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".
|
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".
|
inline |
Sets the names of the mapping table fields which correspond to the participating fields from the left table in the relationship.
|
inline |
Sets the names of the participating fields from the left table in the relationship.
|
inline |
Sets the name of the mapping table for many-to-many relationships.
|
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").
|
inline |
Sets the names of the mapping table fields which correspond to the participating fields from the right table in the relationship.
|
inline |
Sets the names of the participating fields from the right table in the relationship.
|
inline |
Sets the type of the relationship.