[Qgis-developer] Querying PG database in current transaction group
regis.haubourg at gmail.com
Thu Nov 24 02:23:33 PST 2016
thanks Matthias, this is Huge! No more fake tables :) And go for a sweet
API inside the DB.. so coool.
2016-11-24 11:20 GMT+01:00 Matthias Kuhn <matthias at opengis.ch>:
> Hi Régis,
> Nice to see interest in TG rising :)
> transaction = layer.dataProvider().transaction()
> transaction.executeSql('EXECUTE qgis.rocks()')
> On 11/24/2016 11:00 AM, Régis Haubourg wrote:
> > Hi dev's,
> > We currently use a lot transaction groups (the thing hidden in project
> > properties) , so that triggers do their job on the fly and all layers
> > are refreshed together on each edit action, without having to manually
> > save edits and refresh maps.
> > This works very well, but sometimes we want to trigger procedures on
> > DB's side and we are forced to some hack by adding attribute tables and
> > inserting fake feature in it to trigger what we need (such as disconnect
> > objets, cut features, refresh some views, ..)
> > Is there a way to access the current transaction group from a layer in a
> > python layer action so that we could avoid using those fake tables? I
> > would like to simply reuse the current postgres connection to do some
> > "select my_special_function([my _args]); "
> > If we have a way to do that, that would allow QGIS to be a client for
> > in-DB service-oriented architectures.
> > Thanks for your lights !
> > All the best,
> > Régis
> > regis.haubourg at oslandia.com <mailto:regis.haubourg at oslandia.com>
> >  http://qgis.org/en/site/forusers/visualchangelog214/#
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer