Feature request #1999
Use QtSql for database access instead of native sqlite calls
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||12059|
Using the native sqlite approach (e.g. in QgsCoordinateReferenceSystem) requires including redundant source code withing our code base since Qt already provides an sqlite access layer. In addition in comparison to QtSql, the sqlite native code is verbose and inconsistent with the general Qt4 based approach we take in our coding. Lastly, it should be noted that at some stage in the future we may wish to use other database backends to store application data. For example, enterprise users may wish to store these data in a centralised PostgreSQL database. Using the QtSql module would make moving to such an environment trivial.
I am attaching a first stab at moving sqlite code to QtSql. Note this code is not production ready and coverage through the code base is not yet complete. As such this patch has not yet been applied to trunk until it is ready for prime time.
#6 Updated by Jürgen Fischer over 5 years ago
Sandro Santilli wrote:
Is this now implemented ? I'm asking as my "make check" fails due to not finding QtSql...
No, but the auth system and in turn it's tests are using QtSql. Install python-qt4-sql (and possibly libqca2-plugin-ossl is also missing on your machine).