Fauna v10 .NET/C# Driver 1.0.0
 
Loading...
Searching...
No Matches
Pipeline.cs
Go to the documentation of this file.
1using System.Linq.Expressions;
3
4namespace Fauna.Linq;
5
9public enum PipelineMode
10{
14 Query,
18 Project,
22 SetLoad,
26 Scalar,
27}
28
29internal readonly record struct Pipeline(
30 PipelineMode Mode,
32 Type ElemType,
33 bool ElemNullable,
34 ISerializer? ElemSerializer,
35 LambdaExpression? ProjectExpr)
36{
37 public IPipelineExecutor GetExec(DataContext ctx)
38 {
39 var ser = ElemSerializer ??
40 (ElemNullable ?
41 Serializer.GenerateNullable(ctx.MappingCtx, ElemType) :
42 Serializer.Generate(ctx.MappingCtx, ElemType));
43
44 var proj = ProjectExpr?.Compile();
45
46 return IPipelineExecutor.Create(ctx, Query, ser, proj, Mode);
47 }
48}
Represents the abstract base class for constructing FQL queries.
Definition Query.cs:11
A generic interface that defines serialize and deserialize behavior for a specific type,...
PipelineMode
The mode of the query pipeline.
Definition Pipeline.cs:10
@ Query
When a "pure" query, no local processing is required except deserialization.
@ Project
When elements have local projection.
@ SetLoad
When post-processing on the loaded set is required.
@ Scalar
When there is a final, non-enum result, no more transformations are allowed.