Feature request #1999

Use QtSql for database access instead of native sqlite calls

Added by Tim Sutton about 8 years ago. Updated 7 months ago.

Status:Open
Priority:Low
Assignee:Tim Sutton
Category:Projection Support
Pull Request or Patch supplied:No Resolution:
Easy fix?:No

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 Magnifier (21.6 KB) Tim Sutton, 10/11/2009 01:23 PM

History

#1 Updated by Giovanni Manghi almost 6 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Alister Hood almost 6 years ago

  • Pull Request or Patch supplied set to No

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

#3 Updated by Alister Hood almost 6 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

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

#4 Updated by Pirmin Kalberer about 5 years ago

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

#5 Updated by Sandro Santilli about 2 years ago

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

#6 Updated by Jürgen Fischer about 2 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).

#7 Updated by Giovanni Manghi 7 months ago

  • Easy fix? set to No

Also available in: Atom PDF