mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Add some clarifications to QgsRelation api
This commit is contained in:
parent
e9d3a3aca4
commit
d823be1ede
@ -57,14 +57,14 @@ class QgsRelation
|
||||
void setRelationName( const QString& name );
|
||||
|
||||
/**
|
||||
* Set the referencing layer id. This layer will be searched in the registry.
|
||||
* Set the referencing (child) layer id. This layer will be searched in the registry.
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void setReferencingLayer( const QString& id );
|
||||
|
||||
/**
|
||||
* Set the referenced layer id. This layer will be searched in the registry.
|
||||
* Set the referenced (parent) layer id. This layer will be searched in the registry.
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@ -72,17 +72,17 @@ class QgsRelation
|
||||
|
||||
/**
|
||||
* Add a field pairs which is part of this relation
|
||||
* The first element of each pair are the field names fo the foreign key.
|
||||
* The first element of each pair are the field names of the foreign key.
|
||||
* The second element of each pair are the field names of the matching primary key.
|
||||
*
|
||||
* @param referencingField The field name on the referencing layer (FK)
|
||||
* @param referencedField The field name on the referenced layer (PK)
|
||||
* @param referencingField The field name on the referencing (child) layer (FK)
|
||||
* @param referencedField The field name on the referenced (parent) layer (PK)
|
||||
*/
|
||||
void addFieldPair( const QString& referencingField, const QString& referencedField );
|
||||
|
||||
/**
|
||||
* Add a field pairs which is part of this relation
|
||||
* The first element of each pair are the field names fo the foreign key.
|
||||
* The first element of each pair are the field names of the foreign key.
|
||||
* The second element of each pair are the field names of the matching primary key.
|
||||
*
|
||||
* @param fieldPair A pair of two strings
|
||||
@ -206,7 +206,7 @@ class QgsRelation
|
||||
|
||||
/**
|
||||
* Returns a list of attributes used to form the referenced fields
|
||||
* (most likely primary key) on the referenced layer.
|
||||
* (most likely primary key) on the referenced (parent) layer.
|
||||
*
|
||||
* @return A list of attributes
|
||||
*/
|
||||
@ -214,7 +214,7 @@ class QgsRelation
|
||||
|
||||
/**
|
||||
* Returns a list of attributes used to form the referencing fields
|
||||
* (foreign key) on the referencing layer.
|
||||
* (foreign key) on the referencing (child) layer.
|
||||
*
|
||||
* @return A list of attributes
|
||||
*/
|
||||
|
@ -31,8 +31,8 @@ class CORE_EXPORT QgsRelation
|
||||
/**
|
||||
* Defines a relation between matching fields of the two involved tables of a relation.
|
||||
* Often, a relation is only defined by just one FieldPair with the name of the foreign key
|
||||
* column of the referencing table as first element and the name of the primary key column
|
||||
* of the referenced table as the second element.
|
||||
* column of the referencing (child) table as first element and the name of the primary key column
|
||||
* of the referenced (parent) table as the second element.
|
||||
* @note not available in Python bindings
|
||||
*/
|
||||
class FieldPair : public QPair< QString, QString >
|
||||
@ -46,9 +46,9 @@ class CORE_EXPORT QgsRelation
|
||||
FieldPair( const QString& referencingField, const QString& referencedField )
|
||||
: QPair< QString, QString >( referencingField, referencedField ) {}
|
||||
|
||||
//! Get the name of the referencing field
|
||||
//! Get the name of the referencing (child) field
|
||||
QString referencingField() const { return first; }
|
||||
//! Get the name of the referenced field
|
||||
//! Get the name of the referenced (parent) field
|
||||
QString referencedField() const { return second; }
|
||||
};
|
||||
|
||||
@ -89,14 +89,14 @@ class CORE_EXPORT QgsRelation
|
||||
void setRelationName( const QString& name );
|
||||
|
||||
/**
|
||||
* Set the referencing layer id. This layer will be searched in the registry.
|
||||
* Set the referencing (child) layer id. This layer will be searched in the registry.
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void setReferencingLayer( const QString& id );
|
||||
|
||||
/**
|
||||
* Set the referenced layer id. This layer will be searched in the registry.
|
||||
* Set the referenced (parent) layer id. This layer will be searched in the registry.
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@ -104,17 +104,17 @@ class CORE_EXPORT QgsRelation
|
||||
|
||||
/**
|
||||
* Add a field pairs which is part of this relation
|
||||
* The first element of each pair are the field names fo the foreign key.
|
||||
* The first element of each pair are the field names of the foreign key.
|
||||
* The second element of each pair are the field names of the matching primary key.
|
||||
*
|
||||
* @param referencingField The field name on the referencing layer (FK)
|
||||
* @param referencedField The field name on the referenced layer (PK)
|
||||
* @param referencingField The field name on the referencing (child) layer (FK)
|
||||
* @param referencedField The field name on the referenced (parent) layer (PK)
|
||||
*/
|
||||
void addFieldPair( const QString& referencingField, const QString& referencedField );
|
||||
|
||||
/**
|
||||
* Add a field pairs which is part of this relation
|
||||
* The first element of each pair are the field names fo the foreign key.
|
||||
* The first element of each pair are the field names of the foreign key.
|
||||
* The second element of each pair are the field names of the matching primary key.
|
||||
*
|
||||
* @param fieldPair A pair of two strings
|
||||
@ -221,7 +221,7 @@ class CORE_EXPORT QgsRelation
|
||||
|
||||
/**
|
||||
* Returns the field pairs which form this relation
|
||||
* The first element of each pair are the field names fo the foreign key.
|
||||
* The first element of each pair are the field names of the foreign key.
|
||||
* The second element of each pair are the field names of the matching primary key.
|
||||
*
|
||||
* @return The fields forming the relation
|
||||
@ -230,7 +230,7 @@ class CORE_EXPORT QgsRelation
|
||||
|
||||
/**
|
||||
* Returns a list of attributes used to form the referenced fields
|
||||
* (most likely primary key) on the referenced layer.
|
||||
* (most likely primary key) on the referenced (parent) layer.
|
||||
*
|
||||
* @return A list of attributes
|
||||
*/
|
||||
@ -238,7 +238,7 @@ class CORE_EXPORT QgsRelation
|
||||
|
||||
/**
|
||||
* Returns a list of attributes used to form the referencing fields
|
||||
* (foreign key) on the referencing layer.
|
||||
* (foreign key) on the referencing (child) layer.
|
||||
*
|
||||
* @return A list of attributes
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user