CQL Queries in Chess Assistant
Introduction
Chess Query Language (CQL) is an extremely powerful query language designed for searching chess databases. All the different types of searches that are possible in modern chess database systems can be done with CQL. That is, however, just a starting point for CQL which offers so much more power and types of searches that previously were impossible.
Chess Assistant, starting with version 8, offers all the power of CQL in an integrated environment. This implementation brings several advantages, including:
- CQL queries can be run on any type of database that Chess Assistant can handle, instead of only PGN databases.
- CQL queries are not bound to a specific database. Define the query once and then apply it to any selection of games (dataset) from any database.
- The result of a CQL query is displayed as a list of all the matching games with markers showing the exact position(s) that matched the query. Browsing through the resulting list of games will automatically display the first matching position in each game.
- When examining the matching positions a diagram with automatically generated graphical annotations highlights the features that match the query.
- Chess Assistant allows you to organize your whole collection of queries into a neat structure, so you can quickly find any query you may be looking for. Each query is identified by a description and you can even attach an illustrative chessboard diagram, which greatly facilitates the usage of this feature (see CQLQueryOrganization).
This tutorial will not teach you how to write CQL queries, and some familiarity with CQL is assumed, although most of the following text can be understood without previous CQL experience.
CQL search vs. Composite search
Chess Assistant allows CQL to be used in one of two ways:
- Creating and running CQL queries directly from textfiles (*.cql)
- Using Composite search
The first method will be described here, and can be useful for creating and running ad hoc queries. For most other uses Composite search is recommended, because of its flexibility and advantages in organizing and documenting collections of queries.
Using CQL search
In order to run a a CQL query in Chess Assistant follow these steps:
- Open an database and select a dataset to search.
- Select CQL search from the Search menu. This brings up the familiar Open dialog with a preset filetyp of CQL files (*.cql)
- Locate and select the query to be run and click on Open
While the query is running an progress dialog will be displayed showing the elapsed time and the estimated total time. The query can be cancelled at any time by clicking on
Cancel.
There are no comments on this page. [Add comment]