The PySide.QtSql.QSqlRelation class stores information about an SQL foreign key.
PySide.QtSql.QSqlRelation is a helper class for PySide.QtSql.QSqlRelationalTableModel . See QSqlRelationalTableModel.setRelation() and QSqlRelationalTableModel.relation() for details.
See also
PySide.QtSql.QSqlRelationalTableModel PySide.QtSql.QSqlRelationalDelegate Relational Table Model Example
Parameters: |
|
---|
Constructs an invalid PySide.QtSql.QSqlRelation object.
For such an object, the PySide.QtSql.QSqlRelation.tableName() , PySide.QtSql.QSqlRelation.indexColumn() , and PySide.QtSql.QSqlRelation.displayColumn() functions return an empty string.
See also
Constructs a PySide.QtSql.QSqlRelation object, where tableName is the SQL table name to which a foreign key refers, indexColumn is the foreign key, and displayColumn is the field that should be presented to the user.
Return type: | unicode |
---|
Returns the column from table PySide.QtSql.QSqlRelation.tableName() that should be presented to the user instead of a foreign key.
Return type: | unicode |
---|
Returns the index column from table PySide.QtSql.QSqlRelation.tableName() to which a foreign key refers.
Return type: | PySide.QtCore.bool |
---|
Returns true if the PySide.QtSql.QSqlRelation object is valid; otherwise returns false.
Return type: | unicode |
---|
Returns the name of the table to which a foreign key refers.