Query against a Geodatabase object

2738
3
08-23-2015 05:37 AM
Highlighted
New Contributor III

We are rewriting some existing ArcObject code for ArcGIS Pro. We have now some code which uses a IQueryDef to run some select statement against a IWorkspace object.

The code looks something link this:

var queryDef = workspace.CreateQueryDef();

queryDef.Tables = "mytable";

queryDef.SubFields = "name, value1, value2";

queryDef.WhereClause = "refId in (1,2,3)";

queryDef.PostfixClause = " order by value1";

var cursor = queryDef.Evaluate();

I was now wondering, how we can achive the same with the ArcGIS Pro SDK.

Thanks, Chris

Reply
0 Kudos
3 Replies
Highlighted
New Contributor II

Hi Christoph,

We do not have support for QueryDefs yet. But the above can be achieved using the QueryFilter and Search on the corresponding table (as long as Joins or Aggregates are not involved).

Please see ProConcepts Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub for an example.

Thanks,

Sree

Highlighted
New Contributor III

Hi Sree,

thanks for the info. I'll "solve" the problem temporarily with the QueryFilter.

Do you know, by when you think the support for QueryDefs will come?

Thanks,

Chris

Reply
0 Kudos
Highlighted
New Contributor II

Hi Chris,

We have it in our backlog as one of the high(er) priority items and looking to include it in a future release.

This might not be too helpful, but there it is.

Thanks,

Sree