[Qgis-developer] Query Set using SetSubstring does not return record

maaza mekuria sailmcm at yahoo.com
Wed Jun 8 14:30:48 EDT 2011


I have a following question that is important for my understanding, and I would like to know what is the relationship between the data provider and the layer and if I set the setSubsetString in the provider of a layer does it propagate to the layer if I query the selection on the layer? As part of the inheritance rules, does the layer push down the selection to the provider or are they dynamically aware of selections between them.

Thank you,

Maaza 

--- On Wed, 6/8/11, maaza mekuria <sailmcm at yahoo.com> wrote:

> From: maaza mekuria <sailmcm at yahoo.com>
> Subject: [Qgis-developer] Query Set using SetSubstring does not return record
> To: "QGIS Developer" <qgis-developer at lists.osgeo.org>
> Date: Wednesday, June 8, 2011, 2:25 PM
>        
> 
>             
> I have a subsetstring query applied in code to the layer
> data. Yet I find that it does not return any records that it
> should have
>  located.
> 
> 
> The code is pasted below, the setSubsetString passes and
> yet the selected feature count is 0. What am I missing
> here?
> 
>                //Query the edge table edge field
> to find the two vertices 
>                strQryEdge = "EDGEID=" +
> fld0.toString() + ""; 
>                if
> (inEdgeVectorProvider->supportsSubsetString()) 
>                {
>                 
>  blnQryCur=inEdgeVectorLayer->setSubsetString(strQryEdge);
>                   if (blnQryCur) 
>                   {
>  
>                      lstEdgeFeats =
> inEdgeVectorLayer->selectedFeatures();
>                      txtStream << "
> Recount - "<<lstEdgeFeats.count()<<endl;
>                   } // if network source query
> returns edge result
>                } // if edge provider supports
> query subst
> 
> 
> Thank you,
> 
> Maaza
> 
> 


More information about the Qgis-developer mailing list