Skip to main content

RtEntityQueryOptions

Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories.Query

Represents query options for runtime queries.

public record RtEntityQueryOptions : FieldFilterCriteria, IEquatable<FieldFilterCriteria>, IEquatable<RtEntityQueryOptions>

Inheritance Object → FieldFilterCriteria → RtEntityQueryOptions
Implements IEquatable<FieldFilterCriteria>, IEquatable<RtEntityQueryOptions>

Properties​

Language​

The language to use for text search. This text has to be the two-letter ISO language name.

public string Language { get; private set; }

Property Value​

String

GlobalFilter​

Represents global filter settings for the query.

public GlobalRtEntityFilter GlobalFilter { get; private set; }

Property Value​

GlobalRtEntityFilter

TextSearchFilter​

Represents full text search function for configured attributes (dependent of data source type)

public TextSearchFilter TextSearchFilter { get; private set; }

Property Value​

TextSearchFilter

AttributeSearchFilter​

Represents text search function for specific attributes.

public AttributeSearchFilter AttributeSearchFilter { get; private set; }

Property Value​

AttributeSearchFilter

FieldAggregation​

Represents aggregation input for grouping by specific attributes.

public FieldAggregationInput FieldAggregation { get; private set; }

Property Value​

FieldAggregationInput

ResultAggregation​

Represents aggregation input for the result.

public AggregationInput ResultAggregation { get; private set; }

Property Value​

AggregationInput

SortOrders​

Represents sort order for specific attributes.

public ICollection<SortOrderItem> SortOrders { get; private set; }

Property Value​

ICollection<SortOrderItem>

GeospatialFilters​

Represents geospatial filter for specific attributes.

public ICollection<GeospatialFilter> GeospatialFilters { get; internal set; }

Property Value​

ICollection<GeospatialFilter>

Controls how navigation properties affect the result set. Default is NavigationFilterMode.Filter which filters out entities without associations.

public NavigationFilterMode NavigationFilterMode { get; private set; }

Property Value​

NavigationFilterMode

DisableCaching​

When set to true, the query result cache is bypassed for this query. This is useful for pipeline queries where underlying data may have changed between executions.

public bool DisableCaching { get; private set; }

Property Value​

Boolean

Operator​

Gets the logical operator for combining field filters

public LogicalOperators Operator { get; }

Property Value​

LogicalOperators

FieldFilters​

Represents field filters for specific attributes with different comparison operators.

public ICollection<FieldFilter> FieldFilters { get; }

Property Value​

ICollection<FieldFilter>

NestedFilters​

Gets the list of nested filters for complex logical operations

public List<FieldFilterCriteria> NestedFilters { get; }

Property Value​

List<FieldFilterCriteria>

Methods​

Create(LogicalOperators, String)​

Creates a new instance of RtEntityQueryOptions.

public static RtEntityQueryOptions Create(LogicalOperators logicalOperator, string language)

Parameters​

logicalOperator LogicalOperators
The logical operator to use for combining field filters

language String
The language to use for text search. This text has to be the two-letter ISO language name.

Returns​

RtEntityQueryOptions

UseLanguage(String)​

Uses the given language for text search.

public RtEntityQueryOptions UseLanguage(string language)

Parameters​

language String
The language to use for text search. This text has to be the two letter ISO language name.

Returns​

RtEntityQueryOptions

SortOrder(String, SortOrders)​

Adds a sort order to the query.

public RtEntityQueryOptions SortOrder(string attributePath, SortOrders sortOrder)

Parameters​

attributePath String
Path of attribute to sort

sortOrder SortOrders
Sort order

Returns​

RtEntityQueryOptions

Global(Boolean)​

Defines global filter settings for runtime entity queries

public RtEntityQueryOptions Global(bool includeArchived)

Parameters​

includeArchived Boolean
When true, archived entities are returned by the data operation, otherwise not

Returns​

RtEntityQueryOptions

TextSearch(Object)​

Sets the text search filter.

public RtEntityQueryOptions TextSearch(object searchTerm)

Parameters​

searchTerm Object
Search term for full text search.

Returns​

RtEntityQueryOptions

AttributeSearch(IEnumerable<String>, Object)​

Sets the attribute search filter.

public RtEntityQueryOptions AttributeSearch(IEnumerable<string> attributePaths, object searchTerm)

Parameters​

attributePaths IEnumerable<String>
List of attribute paths for full text search

searchTerm Object
Search term for full text search.

Returns​

RtEntityQueryOptions

AggregateFieldGroupBy(String[])​

Groups by the given attribute paths.

public FieldAggregationInput AggregateFieldGroupBy(String[] attributePaths)

Parameters​

attributePaths String[]
Attribute paths to group by.

Returns​

FieldAggregationInput

AggregateResult()​

Aggregates the result

public AggregationInput AggregateResult()

Returns​

AggregationInput

NearGeospatialFilter(String, Point, Nullable<Double>, Nullable<Double>)​

Adds a field filter to the query.

public RtEntityQueryOptions NearGeospatialFilter(string attributeName, Point point, Nullable<double> minDistance, Nullable<double> maxDistance)

Parameters​

attributeName String
Name of attribute

point Point
Point to search for

minDistance Nullable<Double>
The minimum distance from the center point that the documents can be.

maxDistance Nullable<Double>
The maximum distance from the center point that the documents can be.

Returns​

RtEntityQueryOptions

UseNavigationFilterMode(NavigationFilterMode)​

Sets the navigation filter mode. NavigationFilterMode.Filter: entities without associations are filtered out (pre-pagination). NavigationFilterMode.Include: entities without associations are kept with null values; navigation lookups run post-pagination for better performance on large result sets.

public RtEntityQueryOptions UseNavigationFilterMode(NavigationFilterMode mode)

Parameters​

mode NavigationFilterMode
The navigation filter mode to use.

Returns​

RtEntityQueryOptions

WithCachingDisabled()​

Disables the query result cache for this query.

public RtEntityQueryOptions WithCachingDisabled()

Returns​

RtEntityQueryOptions