settings: use fsync / fdatasync on Linux to sync contents
[git-cola.git] / qtpy / QtSql.py
blob76a63760fe74124ada0bd09f13b1bba36796cdfc
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, PYSIDE2, PYSIDE6
12 if PYQT5:
13 from PyQt5.QtSql import *
14 elif PYQT6:
15 from PyQt6.QtSql import *
17 QSqlDatabase.exec_ = lambda self, *args, **kwargs: self.exec(
18 *args,
19 **kwargs,
21 QSqlQuery.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
22 QSqlResult.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
23 elif PYSIDE6:
24 from PySide6.QtSql import *
26 # Map DeprecationWarning methods
27 QSqlDatabase.exec_ = lambda self, *args, **kwargs: self.exec(
28 *args,
29 **kwargs,
31 QSqlQuery.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
32 QSqlResult.exec_ = lambda self, *args, **kwargs: self.exec(*args, **kwargs)
33 elif PYSIDE2:
34 from PySide2.QtSql import *