• PySide 模块
  • PySide.QtSql
  • 内容表

    上一话题

    QSqlError

    下一话题

    QSqlDatabase

    QSqlRelation

    详细描述

    class PySide.QtSql. QSqlRelation
    class PySide.QtSql. QSqlRelation ( QSqlRelation )
    class PySide.QtSql. QSqlRelation ( aTableName , indexCol , displayCol )
    参数:

    Constructs an invalid PySide.QtSql.QSqlRelation 对象。

    For such an object, the PySide.QtSql.QSqlRelation.tableName() , PySide.QtSql.QSqlRelation.indexColumn() ,和 PySide.QtSql.QSqlRelation.displayColumn() functions return an empty string.

    构造 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 ( )
    返回类型: 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 ( )
    返回类型: unicode

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

    PySide.QtSql.QSqlRelation. isValid ( )
    返回类型: PySide.QtCore.bool

    返回 true 若 PySide.QtSql.QSqlRelation object is valid; otherwise returns false.

    PySide.QtSql.QSqlRelation. tableName ( )
    返回类型: unicode

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