CHANGES: remove dead link to now-removed cola.compat.hashlib
[git-cola.git] / qtpy / QtSql.py
blob5f7395b8429de0e26571818f3795bc03a47fba51
1 # -----------------------------------------------------------------------------
2 # Copyright © 2009- The Spyder Development Team
4 # Licensed under the terms of the MIT License
5 # (see LICENSE.txt for details)
6 # -----------------------------------------------------------------------------
8 """Provides QtSql classes and functions."""
10 from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2
12 if PYQT5:
13 from PyQt5.QtSql import *
14 elif PYQT6:
15 from PyQt6.QtSql import *
16 QSqlDatabase.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
17 QSqlQuery.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
18 QSqlResult.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
19 elif PYSIDE6:
20 from PySide6.QtSql import *
21 # Map DeprecationWarning methods
22 QSqlDatabase.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
23 QSqlQuery.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
24 QSqlResult.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
25 elif PYSIDE2:
26 from PySide2.QtSql import *