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().

Definition

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
public class DataSourceEnumerationQuery
Inheritance
Object    DataSourceEnumerationQuery

Example

C#
                    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);
                  

Properties

BatchSize Amount documents per batch. The default value is 100.
CustomCollation This parameter specifies the custom collation for the query.
DataSourceName The name of the data source
DataSourceParameters The Parameters that passed to the data source query.
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 DataSourceEnumerationQuery 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.
SetParameter Add a parameter into the parameters of the query.
SetParameters Set parameters for the query.
ToEnumerationDataSourceQuery  
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.

See Also