Table of Contents

Class NavigationQueryBuilder<TSource, TTarget>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Fluent builder for a navigation (foreign-key join) view: tracks TSource entities whose FK-referenced TTarget satisfies the accumulated predicates. Call Where(Expression<Func<TSource, TTarget, bool>>) one or more times, then ToView(int, string, int, string) to materialize a live NavigationView<TSource, TTarget>.

public class NavigationQueryBuilder<TSource, TTarget> where TSource : unmanaged where TTarget : unmanaged

Type Parameters

TSource

Source component holding the foreign-key field.

TTarget

Target component referenced by the foreign key.

Inheritance
NavigationQueryBuilder<TSource, TTarget>
Inherited Members

Methods

ToView(int, string, int, string)

Builds and registers a live NavigationView<TSource, TTarget> from the accumulated predicates, populates its initial entity set, and returns it. At least one target predicate is required so target-side changes stay tracked.

public ViewBase ToView(int bufferCapacity = 4096, string callerFile = null, int callerLine = 0, string callerMethod = null)

Parameters

bufferCapacity int

Delta ring-buffer capacity for the view (power of two).

callerFile string

Automatically captured source file of the call site; do not pass explicitly.

callerLine int

Automatically captured source line of the call site; do not pass explicitly.

callerMethod string

Automatically captured calling member name; do not pass explicitly.

Returns

ViewBase

The registered navigation view, populated with the current matching source entities.

Exceptions

InvalidOperationException

No predicate was specified, no target predicate was specified, a referenced component is unregistered, or the FK field is missing / not marked [ForeignKey] / lacks an [Index(AllowMultiple = true)].

Where(Expression<Func<TSource, TTarget, bool>>)

Adds a predicate over source and target fields. The expression may reference both TSource and TTarget fields; each comparison is routed to the matching component's predicate set.

public NavigationQueryBuilder<TSource, TTarget> Where(Expression<Func<TSource, TTarget, bool>> predicate)

Parameters

predicate Expression<Func<TSource, TTarget, bool>>

Boolean expression over a source and a target component instance.

Returns

NavigationQueryBuilder<TSource, TTarget>

This builder, for chaining.