Using OPather To Help Write Queries
For those of you who have installed WinFS and had a chance to write some code against the WinFS API you have probably noticed the use of this query language called OPath. OPath is the WinFS API’s object query language that has been designed to allow developers to express rich queries against the API's client-side object structures. The OPath language is used in multiple places on StorageSearcher to specify queries, among other places in the API (such as when creating StorageViews).
My name is Luiz Miranda and as one of the test developers in charge of testing OPath I found myself having to construct lots of queries. While typing a query, a small mistake such as a typo, a syntax error, or an extra parenthesis in my OPath query string could cause a runtime error. Also I found I had to write a test app just to play with a query scenario and see what results would be returned. This is why OPather was born.
When I created the tool I wanted a GUI interface where I could quickly set my target object and start writing my query and know right away of any mistakes in my query string. To do this with OPather is a snap. Open the tool, select the target object type you want to start querying against, then start writing your OPath query. There is even an Intellisense-like feature to help guide you through simple queries. Combined with other features that grew from feedback such as binding results to a DataGrid, constructing StorageViews, and ability to Dump all Code for written query, this tool can certainly help beginners and advanced users who intend to write an App that queries against the WinFS Store.
The tool is available in the “unsupported tools” directory on the WinFS Beta 1 CD and includes a simple help file to get you started. Check it out and post some feedback on what you think.
Author: Luiz Miranda