Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#3139 closed patch (fixed)

[Patch] Custom query for the spatialite provider

Reported by: brushtyler Owned by: esseffe
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Data Provider Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

This patch enhances the spatialite provider capabilities allowing users to load a spatialite layer using a custom query (as the one previously developed for the postgres provider).

Attachments (1)

patch_for_ticket_3139.diff (14.2 KB ) - added by brushtyler 14 years ago.
patch

Download all attachments as: .zip

Change History (7)

by brushtyler, 14 years ago

Attachment: patch_for_ticket_3139.diff added

patch

comment:1 by brushtyler, 14 years ago

Owner: changed from nobody to esseffe

comment:2 by esseffe, 14 years ago

Resolution: fixed
Status: newclosed

I've applied the patch suggested by brushtyler Committed in r.14435

comment:3 by lmotta, 13 years ago

Milestone: Version 1.6.0Version 1.7.0
Must Fix for Release: NoYes
Priority: critical: causes crash or data corruptionminor: annoyance
Resolution: fixed
Status: closedreopened
Version: Trunk

When in select statement have only the pkuid's column, the attributes's table didn't showed the values of pkuid. Obs: The identify is OK. The problem is the table of layer Otherwise (have others columns) all attributes showed in table

Example with error(only pkuid): sql = "select t.id as pkuid,t.the_geom as geometry from test t limit 10" uri = QgsDataSourceURI() uri.setDatabase('/home/lmotta/bd_gis/spatialite/gis.sqlite') uri.setDataSource(, '(%s)' % sql, 'geometry', , 'pkuid') qgis.utils.iface.addVectorLayer(uri.uri(), "Select", 'spatialite')

Example correct (more columns): sql = "select t.id as pkuid, t.name, t.the_geom as geometry from test t limit 10" ...

comment:4 by brushtyler, 13 years ago

The one you talk about it's a bug. Why did you re-open a closed patch ticket about a different problem?

Indeed the patch improved QGis adding a missing feature. You should open a proper ticket, a bug ticket.

in reply to:  4 comment:5 by brushtyler, 13 years ago

Resolution: fixed
Status: reopenedclosed

Replying to brushtyler:

Replying to lmotta:

When in select statement have only the pkuid's column, the attributes's table didn't showed the values of pkuid.

Why did you re-open a closed patch ticket about a different problem? You should open a proper ticket, a bug ticket.

I close this ticket. See #3356, the ticket related to the bug you had reported.

comment:6 by lmotta, 13 years ago

Sorry reopen this ticket and thanks, twice, explained how make ticket about bug in this feature and make the fix the ticket 3356

Note: See TracTickets for help on using tickets.