Table Of Contents

Previous topic

QSqlError

Next topic

QSqlDatabase

QSqlRelation

Synopsis

Functions

Detailed Description

class PySide.QtSql.QSqlRelation
class PySide.QtSql.QSqlRelation(QSqlRelation)
class PySide.QtSql.QSqlRelation(aTableName, indexCol, displayCol)
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.

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.

PySide.QtSql.QSqlRelation.displayColumn()
Return type:unicode

Returns the column from table PySide.QtSql.QSqlRelation.tableName() that should be presented to the user instead of a foreign key.

PySide.QtSql.QSqlRelation.indexColumn()
Return type:unicode

Returns the index column from table PySide.QtSql.QSqlRelation.tableName() to which a foreign key refers.

PySide.QtSql.QSqlRelation.isValid()
Return type:PySide.QtCore.bool

Returns true if the PySide.QtSql.QSqlRelation object is valid; otherwise returns false.

PySide.QtSql.QSqlRelation.tableName()
Return type:unicode

Returns the name of the table to which a foreign key refers.