Click or drag to resize

DataEnumerationQuery Class

The DataEnumerationQuery contains Filter, ProjectedFields, SortedFields, DataClassName, BatchSize data. These info used to build query directly to database. The one create by a static method DataEnumerationQuery.For().
Inheritance Hierarchy
SystemObject
  Casewhere.Runtime.DSL.ApiDataEnumerationQuery

Namespace:  Casewhere.Runtime.DSL.Api
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
public class DataEnumerationQuery

The DataEnumerationQuery type exposes the following members.

Properties
  NameDescription
Public propertyBatchSize
Amount documents per batch. The default value is 100.
Public propertyDataClassName
The name of the data class
Public propertyFilter
The filter object that is built using FilterBuilder.
Public propertyProjectedFields
The list of fields returned to Client. By default, Casewhere will return all.
Public propertySortedFields
List of sorted fields.
Top
Methods
  NameDescription
Public methodFilterBy(DynamicFilter)
Set query filter. For chaining purpose.
Public methodFilterBy(Object)
Set query filter. For chaining purpose.
Public methodStatic memberFor
The static For method use to create a new instance of DataEnumerationQuery type.
Public methodOrderBy
Set query sorting. For chaining purpose.
Public methodProjectOn
Set query projection. For chaining purpose.
Public methodSetBatchSize
Set batch size to the existing query.
Top
Examples
var filter = FilterBuilder.Create().Eq("DepartmentId", ctx.Input.Id).Eq("Active", true).Build();
var query = DataEnumerationQuery.For("Employee")
    .FilterBy(filter)
    .ProjectOn("FirstName", "LastName")
    .OrderBy("FirstName", true);
var result = ctx.Use<IDataApi>().Enumerate(query);
See Also