2using System.Diagnostics.CodeAnalysis;
6public abstract class QuerySource : IQuerySource
9 internal DataContext Ctx {
get;
private protected set; }
11 internal Pipeline Pipeline {
get;
private protected set; }
18 internal void SetQuery<TElem>(
Query query)
20 Pipeline =
new Pipeline(
PipelineMode.Query, query, typeof(TElem),
false,
null,
null);
24public partial class QuerySource<T> : QuerySource, IQuerySource<T>
34 internal QuerySource() { }
38 var pe = Pipeline.GetExec(Ctx);
39 return pe.PagedResult<T>(queryOptions, cancel);
45 public IEnumerable<T>
ToEnumerable() =>
new QuerySourceEnumerable(
this);
IEnumerable< T > ToEnumerable()
IAsyncEnumerable< Page< T > > PaginateAsync(QueryOptions? queryOptions=null, CancellationToken cancel=default)
IAsyncEnumerable< T > ToAsyncEnumerable(CancellationToken cancel=default)
Represents the abstract base class for constructing FQL queries.
Represents the options for customizing Fauna queries.