"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

Generated by BaiJiFeiLong@gmail.com

Licence: GPLv3
"""
"""
This file contains the exact signatures for all functions in module
PySide6.QtSql, except for defaults which are replaced by "...".
"""
from typing import overload
import PySide6.QtCore
import PySide6.QtWidgets
import PySide6.QtSql

bytes = str


class QSqlRelation(object):
    """
    https://doc.qt.io/qt-6/qsqlrelation.html

    **Detailed Description**

    QSqlRelation is a helper class for **QSqlRelationalTableModel** . See
    **QSqlRelationalTableModel::setRelation** () and
    **QSqlRelationalTableModel::relation** () for details.

    **See also** **QSqlRelationalTableModel** , **QSqlRelationalDelegate** , and
    **Relational Table Model Example** .
    """

    @overload
    def __init__(self) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#QSqlRelation

        **QSqlRelation::QSqlRelation()**

        Constructs an invalid QSqlRelation object.

        For such an object, the **tableName** (), **indexColumn** (), and
        **displayColumn** () functions return an empty string.

        **See also** **isValid** ().
        """
        ...

    @overload
    def __init__(self, QSqlRelation: PySide6.QtSql.QSqlRelation) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#QSqlRelation-1

        **QSqlRelation::QSqlRelation(const QString & tableName , const QString &
        indexColumn , const QString & displayColumn )**

        Constructs a 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.

        **See also** **tableName** (), **indexColumn** (), and **displayColumn**
        ().
        """
        ...

    @overload
    def __init__(self, aTableName: str, indexCol: str, displayCol: str) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#QSqlRelation

        **QSqlRelation::QSqlRelation()**

        Constructs an invalid QSqlRelation object.

        For such an object, the **tableName** (), **indexColumn** (), and
        **displayColumn** () functions return an empty string.

        **See also** **isValid** ().
        """
        ...

    @staticmethod
    def __copy__() -> None:
        ...

    def displayColumn(self) -> str:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#displayColumn

        **QString QSqlRelation::displayColumn() const**

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

    def indexColumn(self) -> str:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#indexColumn

        **QString QSqlRelation::indexColumn() const**

        Returns the index column from table **tableName** () to which a foreign
        key refers.
        """
        ...

    def isValid(self) -> bool:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#isValid

        **bool QSqlRelation::isValid() const**

        Returns `true` if the **QSqlRelation**  object is valid; otherwise
        returns `false`.
        """
        ...

    def swap(self, other: PySide6.QtSql.QSqlRelation) -> None:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#swap

        **void QSqlRelation::swap(QSqlRelation & other )**

        Swaps `this` with **other**.
        """
        ...

    def tableName(self) -> str:
        """
        https://doc.qt.io/qt-6/qsqlrelation.html#tableName

        **QString QSqlRelation::tableName() const**

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