Feature request #1999

Use QtSql for database access instead of native sqlite calls

Added by Tim Sutton over 7 years ago. Updated over 1 year ago.

Status:Open Start Date:
Priority:Low Due date:
Assigned to:Tim Sutton % Done:

0%

Category:Projection Support
Target version:Future Release - Nice to have
Platform:All Resolution:
Platform version: Pull Request or Patch supplied:No
Status info:0 Tag:

Description

Rationale:

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.

qgis_qtsqlite_patch_v1.diff (21.6 kB) Tim Sutton, 10/11/2009 01:23 pm

History

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Alister Hood about 5 years ago

  • Pull Request or Patch supplied set to No

Shouldn't target version on this be at least 1.8, probably 2.0?

Updated by Alister Hood about 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Sorry, 1.8 has already branched, hasn't it?

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by Sandro Santilli over 1 year ago

Is this now implemented ? I'm asking as my "make check" fails due to not finding QtSql...

Updated by Jürgen Fischer over 1 year 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).

Also available in: Atom