Data Enumeration Query 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().
Definition
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
public class DataEnumerationQuery- Inheritance
- Object DataEnumerationQuery
Example
C#
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);
Properties
| BatchSize | Amount documents per batch. The default value is 100. |
| CustomCollation | This parameter specifies the custom collation for the query. |
| DataClassName | The name of the data class |
| Filter | The filter object that is built using FilterBuilder. |
| GeoSpatialStages | |
| HintIndexName | The hint index name specified for the query. |
| ProjectedFields | The list of fields returned to Client. By default, Casewhere will return all. |
| SortedFields | List of sorted fields. |
Methods
| FilterBy(DynamicFilter) | Set query filter. For chaining purpose. |
| FilterBy(Object) | Set query filter. For chaining purpose. |
| For | The static For method use to create a new instance of DataEnumerationQuery type. |
| GeoNear | Create a geospatial queries that find documents near a specific location, taking distance constraints into account. |
| GeoNearSphere | Create a geospatial query for finding documents near a specific geographic location, emphasizing spherical calculations. |
| Near | Create a geospatial queries that find documents near a specific location, taking distance constraints into account. |
| NearSphere | Create a geospatial query for finding documents near a specific geographic location, emphasizing spherical calculations. |
| OrderBy | Set query sorting. For chaining purpose. |
| ProjectOn | Set query projection. For chaining purpose. |
| SetBatchSize | Set batch size to the existing query. |
| SetHintIndex | Specify a hint index name for this query. |
| ToEnumerationDataObjectQuery | |
| WithCustomCollation | Specify a custom collation for this query. If not specified, the data source's collation will be used, if not specified too, the default collation will be used. |