Click or drag to resize

DataSourceApiQuery Class

Represents the ActualData Object query which is performed on Casewhere DataSource.
Inheritance Hierarchy

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

The DataSourceApiQuery type exposes the following members.

Properties
  NameDescription
Public propertyDataSourceName
The ActualData Source name.
Public propertyFilter
The filter object that is built using FilterBuilder.
(Inherited from DataApiQuery.)
Public propertyIncludeTotal
Determines whether Casewhere returns the total number of ActualData Objects.
(Inherited from DataApiQuery.)
Public propertyProjectedFields
The list of fields returned to Client. By default, Casewhere will return all.
(Inherited from DataApiQuery.)
Public propertySearchLimit
When the limit is set, Casewhere will only process the search result within that limit, even when more data is found. If the limit is not set, Casewhere will use the SearchLimit configured in the web.config. This limit is applied for full-text search only.
(Inherited from DataApiQuery.)
Public propertySkip
Bypasses a specified number of elements in a sequence and then returns the remaining elements. By default, Casewhere will skip none.
(Inherited from DataApiQuery.)
Public propertySortedFields
List of sort fields.
(Inherited from DataApiQuery.)
Public propertyTake
Determines the number of ActualData Objects returned. By default, Casewhere will take all.
(Inherited from DataApiQuery.)
Top
Methods
  NameDescription
Public methodFilterBy(DynamicFilter)
Set query filter. For chaining purpose.
Public methodFilterBy(Object)
Set query filter. For chaining purpose.
Public methodStatic memberFor
Creates the query object.
Public methodIncludeTotalItems
Determines whether Casewhere returns the total number of ActualData Objects. For chaining purpose.
Public methodOrderBy
Set query sorting. For chaining purpose.
Public methodPaging
Set query paging. For chaining purpose.
Public methodProjectOn
Set query projection. For chaining purpose.
Public methodToRuntimeQuery
Convert DataSourceApiQuery to PagedDataSourceQuery. Ensure ProjectedFields has Id.
Top
Examples
var filter = FilterBuilder.Create().Eq("DepartmentId", ctx.Input.Id).Eq("Active", true).Build();
var query = DataSourceApiQuery.For("EmployeeWithDepartments")
    .FilterBy(filter)
    .ProjectOn("Username", "Department")
    .OrderBy("Firstname", true)
    .Paging(0, 10);
var result = ctx.Use<IDataApi>().Search(query);
See Also