Click or drag to resize

DataSourceEnumerationQuery Class

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

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

The DataSourceEnumerationQuery type exposes the following members.

Properties
  NameDescription
Public propertyBatchSize
Amount documents per batch. The default value is 100.
Public propertyDataSourceName
The name of the data source
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 DataSourceEnumerationQuery 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.
Public methodToEnumerationDataSourceQuery
Top
Examples
var filter = FilterBuilder.Create().Eq("DepartmentId", ctx.Input.Id).Eq("Active", true).Build();
var query = DataSourceEnumerationQuery.For("Employee")
    .FilterBy(filter)
    .ProjectOn("FirstName", "LastName")
    .OrderBy("FirstName", true);
var result = ctx.Use<IDataApi>().Enumerate(query);
See Also