A query definition is a defined way of getting information out of the system. The definition identifies the aggregate against which it will run, the return data type it will supply and any additional parameters to the query.

A query definition class is derived from the interface IQueryDefinition.

Naming convention
Add "Get" to the name of the Projections and, if additional restrictions apply then add them to the name. For example a query to get the "AccountBalance" projection as at a given date in time could be called "GetAccountBalanceAsOfDate".

Query Input Parameter Types
There are basically four different types of input parameter that can be passed to a query:
  • Aggregate Identifier parameters identify which aggregate instances' event stream the query is to run against. These are provided by the Identity Group class.
  • As of restrictions parameters restrict the start and end of the range of the event stream the query will run against.
  • Event filter modification parameters alter which events the projection underlying the query runs against - either completely excluding an event or conditionally excluding it.
  • Property transform modification parameters affect the transform that occurs when an event is handled.

Last edited Oct 27, 2015 at 7:59 AM by Merrion, version 3