Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Fauna.Linq.QuerySource< T > Class Template Reference

An abstract class representing a QuerySource for LINQ-style queries. More...

Inheritance diagram for Fauna.Linq.QuerySource< T >:
Fauna.Linq.IQuerySource< T > Fauna.Linq.IQuerySource< T >

Public Member Functions

IAsyncEnumerable< Page< T > > PaginateAsync (QueryOptions? queryOptions=null, CancellationToken cancel=default)
 Executes a query with pagination.
 
IAsyncEnumerable< T > ToAsyncEnumerable (CancellationToken cancel=default)
 Executes a query asynchronously.
 
IEnumerable< T > ToEnumerable ()
 Executes a query.
 
IQuerySource< T > Distinct ()
 Obtains a distinct set of results. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > Order ()
 Applies default ordering to the query. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > OrderBy< K > (Expression< Func< T, K > > keySelector)
 Orders according to the selector. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > OrderByDescending< K > (Expression< Func< T, K > > keySelector)
 Orders by descending according to the selector. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > OrderDescending ()
 Orders by descending. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > Reverse ()
 Reverses the order of the results. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< R > Select< R > (Expression< Func< T, R > > selector)
 Applies a projection to the query. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > Skip (int count)
 Skips the first N elements of the results. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > Take (int count)
 Takes the first N elements of the results. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
IQuerySource< T > Where (Expression< Func< T, bool > > predicate)
 Applies the predicate to the query. This is evaluated server-side.
Returns
This IQuerySource<T> instance.

 
bool All (Expression< Func< T, bool > > predicate)
 Applies each predicate and executes the query. This is evaluated server-side.
Returns
True if every predicate evaluates to true. Otherwise, false.

 
Task< bool > AllAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies each predicate and executes the query asynchronously. This is evaluated server-side.
Returns
True if every predicate evaluate to true, otherwise false.

 
bool Any ()
 Determines if the result is not empty. This is evaluated server-side.
Returns
True if the result contains any elements, otherwise false.

 
Task< bool > AnyAsync (CancellationToken cancel=default)
 Determines if the result is not empty asynchronously. This is evaluated server-side.
Returns
True if the result contains any elements, otherwise false.

 
bool Any (Expression< Func< T, bool > > predicate)
 Applies each predicate and executes the query. This is evaluated server-side.
Returns
True if any predicate evaluates to true, otherwise false.

 
Task< bool > AnyAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies each predicate and executes the query asynchronously. This is evaluated server-side.
Returns
True if any predicate evaluates to true, otherwise false.

 
int Count ()
 Applies a count of the elements and executes the query. This is evaluated server-side.
Returns
The number of elements in the result.

 
Task< int > CountAsync (CancellationToken cancel=default)
 Applies a count of the elements and executes the query asynchronously. This is evaluated server-side.
Returns
The number of elements in the result.

 
int Count (Expression< Func< T, bool > > predicate)
 Applies the predicate, applies a count, and executes the query. This is evaluated server-side.
Returns
The number of elements in the result.

 
Task< int > CountAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, applies a count, and executes the query asynchronously. This is evaluated server-side.
Returns
The number of elements in the result.

 
First ()
 Executes the query and obtains the first element in the result. This is evaluated server-side.
Returns
The first element in the result.

 
Task< T > FirstAsync (CancellationToken cancel=default)
 Executes the query asynchronously and obtains the first element in the result. This is evaluated server-side.
Returns
The first element in the result.

 
First (Expression< Func< T, bool > > predicate)
 Applies the predicate, executes the query, and obtains the first element in the result. This is evaluated server-side.
Returns
The first element in the result.

 
Task< T > FirstAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, executes the query asynchronously, and obtains the first element in the result. This is evaluated server-side.
Returns
The first element in the result.

 
T? FirstOrDefault ()
 Executes the query and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The first element in the result or the default value, if there is no result.

 
Task< T?> FirstOrDefaultAsync (CancellationToken cancel=default)
 Executes the query asynchronously and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The first element in the result.

 
T? FirstOrDefault (Expression< Func< T, bool > > predicate)
 Applies the predicate, executes the query, and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The first element in the result.

 
Task< T?> FirstOrDefaultAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, executes the query asynchronously, and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The first element in the result.

 
Last ()
 Executes the query and obtains the last element in the result. This is evaluated server-side.
Returns
The last element in the result.

 
Task< T > LastAsync (CancellationToken cancel=default)
 Executes the query asynchronously and obtains the last element in the result. This is evaluated server-side.
Returns
The last element in the result.

 
Last (Expression< Func< T, bool > > predicate)
 Applies the predicate, executes the query, and obtains the last element in the result. This is evaluated server-side.
Returns
The last element in the result.

 
Task< T > LastAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, executes the query asynchronously, and obtains the last element in the result. This is evaluated server-side.
Returns
The last element in the result.

 
T? LastOrDefault ()
 Executes the query and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The last element in the result or the default value, if there is no result.

 
Task< T?> LastOrDefaultAsync (CancellationToken cancel=default)
 Executes the query asynchronously and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The last element in the result or the default value, if there is no result.

 
T? LastOrDefault (Expression< Func< T, bool > > predicate)
 Applies the predicate, executes the query and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The last element in the result or the default value, if there is no result.

 
Task< T?> LastOrDefaultAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, executes the query asynchronously and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.
Returns
The last element in the result or the default value, if there is no result.

 
long LongCount ()
 Applies a count of the elements and executes the query. This is evaluated server-side.
Returns
The number of elements in the result.

 
Task< long > LongCountAsync (CancellationToken cancel=default)
 Applies a count of the elements and executes the query asynchronously. This is evaluated server-side.
Returns
The number of elements in the result.

 
long LongCount (Expression< Func< T, bool > > predicate)
 Applies the predicate, applies a count, and executes the query. This is evaluated server-side.
Returns
The number of elements in the result.

 
Task< long > LongCountAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate, applies a count, and executes the query asynchronously. This is evaluated server-side.
Returns
The number of elements in the result.

 
Max ()
 Executes a query and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.
Returns
The maximum T .

 
Task< T > MaxAsync (CancellationToken cancel=default)
 Executes a query asynchronously and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.
Returns
The maximum T .

 
Max< R > (Expression< Func< T, R > > selector)
 Applies a selector, executes a query, and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.
Returns
The maximum T .

 
Task< R > MaxAsync< R > (Expression< Func< T, R > > selector, CancellationToken cancel=default)
 Applies a selector, executes a query asynchronously, and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.
Returns
The maximum T .

 
Min ()
 Executes a query and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.
Returns
The minimum T .

 
Task< T > MinAsync (CancellationToken cancel=default)
 Executes a query asynchronously and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.
Returns
The minimum T .

 
Min< R > (Expression< Func< T, R > > selector)
 Applies the selector, executes the query, and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.
Returns
The minimum T .

 
Task< R > MinAsync< R > (Expression< Func< T, R > > selector, CancellationToken cancel=default)
 Applies the selector, executes the query asynchronously, and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.
Returns
The minimum T .

 
double Average (Expression< Func< T, double > > selector)
 Calculates the mean average of values returned by a provided selector. This is evaluated server-side.
Returns
The mean average of selected values.

 
Task< double > AverageAsync (Expression< Func< T, double > > selector, CancellationToken cancel=default)
 Asynchronously calculates the mean average of values returned by a provided selector. This is evaluated server-side.
Returns
The mean average of selected values.

 
Single ()
 Executes the query. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.
Returns
The query result.

 
Task< T > SingleAsync (CancellationToken cancel=default)
 Executes the query asynchronously. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.
Returns
The query result.

 
Single (Expression< Func< T, bool > > predicate)
 Applies the predicate and executes the query. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.
Returns
The query result.

 
Task< T > SingleAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate and executes the query asynchronously. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.
Returns
The query result.

 
SingleOrDefault ()
 Executes the query. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.
Returns
The query result or default.

 
Task< T > SingleOrDefaultAsync (CancellationToken cancel=default)
 Executes the query asynchronously. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.
Returns
The query result or default.

 
SingleOrDefault (Expression< Func< T, bool > > predicate)
 Applies the predicate and executes the query. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.
Returns
The query result or default.

 
Task< T > SingleOrDefaultAsync (Expression< Func< T, bool > > predicate, CancellationToken cancel=default)
 Applies the predicate and executes the query asynchronously. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.
Returns
The query result or default.

 
int Sum (Expression< Func< T, int > > selector)
 Calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
Task< int > SumAsync (Expression< Func< T, int > > selector, CancellationToken cancel=default)
 Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
long Sum (Expression< Func< T, long > > selector)
 Calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
Task< long > SumAsync (Expression< Func< T, long > > selector, CancellationToken cancel=default)
 Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
double Sum (Expression< Func< T, double > > selector)
 Calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
Task< double > SumAsync (Expression< Func< T, double > > selector, CancellationToken cancel=default)
 Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.
Returns
The sum of selected values.

 
List< T > ToList ()
 Executes the query synchronously and converts the results to a List<T>.
 
async Task< List< T > > ToListAsync (CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a List<T>.
 
T[] ToArray ()
 Executes the query synchronously and converts the results to a T:T[].
 
async Task< T[]> ToArrayAsync (CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a T:T[].
 
HashSet< T > ToHashSet ()
 Executes the query synchronously and converts the results to a HashSet<T>.
 
Task< HashSet< T > > ToHashSetAsync (CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a HashSet<T>.
 
HashSet< T > ToHashSet (IEqualityComparer< T >? comparer)
 Executes the query synchronously and converts the results to a HashSet<T> using a comparer.
 
async Task< HashSet< T > > ToHashSetAsync (IEqualityComparer< T >? comparer, CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a HashSet<T>.
 
Dictionary< K, V > ToDictionary< K, V > (Func< T, K > getKey, Func< T, V > getValue)
 Executes the query synchronously and converts the results to a Dictionary<K,V>.
 
Task< Dictionary< K, V > > ToDictionaryAsync< K, V > (Func< T, K > getKey, Func< T, V > getValue, CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a Dictionary<K,V>.
 
Dictionary< K, V > ToDictionary< K, V > (Func< T, K > getKey, Func< T, V > getValue, IEqualityComparer< K >? comparer)
 Executes the query synchronously and converts the results to a Dictionary<K,V>.
 
async Task< Dictionary< K, V > > ToDictionaryAsync< K, V > (Func< T, K > getKey, Func< T, V > getValue, IEqualityComparer< K >? comparer, CancellationToken cancel=default)
 Executes the query asynchronously and converts the results to a Dictionary<K,V>.
 

Detailed Description

An abstract class representing a QuerySource for LINQ-style queries.

Represents a Fauna query with a LINQ-style API.

Template Parameters
TThe type returned by the query when evaluated.

Definition at line 9 of file QuerySourceToCollections.cs.

Member Function Documentation

◆ All()

bool Fauna.Linq.QuerySource< T >.All ( Expression< Func< T, bool > >  predicate)

Applies each predicate and executes the query. This is evaluated server-side.

Returns
True if every predicate evaluates to true. Otherwise, false.

Implements Fauna.Linq.IQuerySource< T >.

◆ AllAsync()

Task< bool > Fauna.Linq.QuerySource< T >.AllAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies each predicate and executes the query asynchronously. This is evaluated server-side.

Returns
True if every predicate evaluate to true, otherwise false.

Implements Fauna.Linq.IQuerySource< T >.

◆ Any() [1/2]

bool Fauna.Linq.QuerySource< T >.Any ( )

Determines if the result is not empty. This is evaluated server-side.

Returns
True if the result contains any elements, otherwise false.

Implements Fauna.Linq.IQuerySource< T >.

◆ Any() [2/2]

bool Fauna.Linq.QuerySource< T >.Any ( Expression< Func< T, bool > >  predicate)

Applies each predicate and executes the query. This is evaluated server-side.

Returns
True if any predicate evaluates to true, otherwise false.

Implements Fauna.Linq.IQuerySource< T >.

◆ AnyAsync() [1/2]

Task< bool > Fauna.Linq.QuerySource< T >.AnyAsync ( CancellationToken  cancel = default)

Determines if the result is not empty asynchronously. This is evaluated server-side.

Returns
True if the result contains any elements, otherwise false.

Implements Fauna.Linq.IQuerySource< T >.

◆ AnyAsync() [2/2]

Task< bool > Fauna.Linq.QuerySource< T >.AnyAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies each predicate and executes the query asynchronously. This is evaluated server-side.

Returns
True if any predicate evaluates to true, otherwise false.

Implements Fauna.Linq.IQuerySource< T >.

◆ Average()

double Fauna.Linq.QuerySource< T >.Average ( Expression< Func< T, double > >  selector)

Calculates the mean average of values returned by a provided selector. This is evaluated server-side.

Returns
The mean average of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ AverageAsync()

Task< double > Fauna.Linq.QuerySource< T >.AverageAsync ( Expression< Func< T, double > >  selector,
CancellationToken  cancel = default 
)

Asynchronously calculates the mean average of values returned by a provided selector. This is evaluated server-side.

Returns
The mean average of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ Count() [1/2]

int Fauna.Linq.QuerySource< T >.Count ( )

Applies a count of the elements and executes the query. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Count() [2/2]

int Fauna.Linq.QuerySource< T >.Count ( Expression< Func< T, bool > >  predicate)

Applies the predicate, applies a count, and executes the query. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ CountAsync() [1/2]

Task< int > Fauna.Linq.QuerySource< T >.CountAsync ( CancellationToken  cancel = default)

Applies a count of the elements and executes the query asynchronously. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ CountAsync() [2/2]

Task< int > Fauna.Linq.QuerySource< T >.CountAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, applies a count, and executes the query asynchronously. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Distinct()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Distinct ( )

Obtains a distinct set of results. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 21 of file QuerySourceDsl.cs.

◆ First() [1/2]

T Fauna.Linq.QuerySource< T >.First ( )

Executes the query and obtains the first element in the result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ First() [2/2]

T Fauna.Linq.QuerySource< T >.First ( Expression< Func< T, bool > >  predicate)

Applies the predicate, executes the query, and obtains the first element in the result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstAsync() [1/2]

Task< T > Fauna.Linq.QuerySource< T >.FirstAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and obtains the first element in the result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstAsync() [2/2]

Task< T > Fauna.Linq.QuerySource< T >.FirstAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, executes the query asynchronously, and obtains the first element in the result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstOrDefault() [1/2]

T? Fauna.Linq.QuerySource< T >.FirstOrDefault ( )

Executes the query and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The first element in the result or the default value, if there is no result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstOrDefault() [2/2]

T? Fauna.Linq.QuerySource< T >.FirstOrDefault ( Expression< Func< T, bool > >  predicate)

Applies the predicate, executes the query, and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstOrDefaultAsync() [1/2]

Task< T?> Fauna.Linq.QuerySource< T >.FirstOrDefaultAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ FirstOrDefaultAsync() [2/2]

Task< T?> Fauna.Linq.QuerySource< T >.FirstOrDefaultAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, executes the query asynchronously, and obtains the first element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The first element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Last() [1/2]

T Fauna.Linq.QuerySource< T >.Last ( )

Executes the query and obtains the last element in the result. This is evaluated server-side.

Returns
The last element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Last() [2/2]

T Fauna.Linq.QuerySource< T >.Last ( Expression< Func< T, bool > >  predicate)

Applies the predicate, executes the query, and obtains the last element in the result. This is evaluated server-side.

Returns
The last element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastAsync() [1/2]

Task< T > Fauna.Linq.QuerySource< T >.LastAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and obtains the last element in the result. This is evaluated server-side.

Returns
The last element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastAsync() [2/2]

Task< T > Fauna.Linq.QuerySource< T >.LastAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, executes the query asynchronously, and obtains the last element in the result. This is evaluated server-side.

Returns
The last element in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastOrDefault() [1/2]

T? Fauna.Linq.QuerySource< T >.LastOrDefault ( )

Executes the query and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The last element in the result or the default value, if there is no result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastOrDefault() [2/2]

T? Fauna.Linq.QuerySource< T >.LastOrDefault ( Expression< Func< T, bool > >  predicate)

Applies the predicate, executes the query and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The last element in the result or the default value, if there is no result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastOrDefaultAsync() [1/2]

Task< T?> Fauna.Linq.QuerySource< T >.LastOrDefaultAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The last element in the result or the default value, if there is no result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LastOrDefaultAsync() [2/2]

Task< T?> Fauna.Linq.QuerySource< T >.LastOrDefaultAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, executes the query asynchronously and obtains the last element in the result or the default value, if there is no result. This is evaluated server-side.

Returns
The last element in the result or the default value, if there is no result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LongCount() [1/2]

long Fauna.Linq.QuerySource< T >.LongCount ( )

Applies a count of the elements and executes the query. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LongCount() [2/2]

long Fauna.Linq.QuerySource< T >.LongCount ( Expression< Func< T, bool > >  predicate)

Applies the predicate, applies a count, and executes the query. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LongCountAsync() [1/2]

Task< long > Fauna.Linq.QuerySource< T >.LongCountAsync ( CancellationToken  cancel = default)

Applies a count of the elements and executes the query asynchronously. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ LongCountAsync() [2/2]

Task< long > Fauna.Linq.QuerySource< T >.LongCountAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate, applies a count, and executes the query asynchronously. This is evaluated server-side.

Returns
The number of elements in the result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Max()

T Fauna.Linq.QuerySource< T >.Max ( )

Executes a query and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.

Returns
The maximum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ Max< R >()

R Fauna.Linq.QuerySource< T >.Max< R > ( Expression< Func< T, R > >  selector)

Applies a selector, executes a query, and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.

Returns
The maximum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ MaxAsync()

Task< T > Fauna.Linq.QuerySource< T >.MaxAsync ( CancellationToken  cancel = default)

Executes a query asynchronously and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.

Returns
The maximum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ MaxAsync< R >()

Task< R > Fauna.Linq.QuerySource< T >.MaxAsync< R > ( Expression< Func< T, R > >  selector,
CancellationToken  cancel = default 
)

Applies a selector, executes a query asynchronously, and returns the maximum value in the result set. This is evaluated server-side. (a, b) => if (a >= b) a else b.

Returns
The maximum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ Min()

T Fauna.Linq.QuerySource< T >.Min ( )

Executes a query and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.

Returns
The minimum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ Min< R >()

R Fauna.Linq.QuerySource< T >.Min< R > ( Expression< Func< T, R > >  selector)

Applies the selector, executes the query, and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.

Returns
The minimum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ MinAsync()

Task< T > Fauna.Linq.QuerySource< T >.MinAsync ( CancellationToken  cancel = default)

Executes a query asynchronously and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.

Returns
The minimum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ MinAsync< R >()

Task< R > Fauna.Linq.QuerySource< T >.MinAsync< R > ( Expression< Func< T, R > >  selector,
CancellationToken  cancel = default 
)

Applies the selector, executes the query asynchronously, and returns the minimum value in the result set. This is evaluated server-side. (a, b) => if (a <= b) a else b.

Returns
The minimum T .

Implements Fauna.Linq.IQuerySource< T >.

◆ Order()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Order ( )

Applies default ordering to the query. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 28 of file QuerySourceDsl.cs.

◆ OrderBy< K >()

IQuerySource< T > Fauna.Linq.QuerySource< T >.OrderBy< K > ( Expression< Func< T, K > >  keySelector)

Orders according to the selector. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 35 of file QuerySourceDsl.cs.

◆ OrderByDescending< K >()

IQuerySource< T > Fauna.Linq.QuerySource< T >.OrderByDescending< K > ( Expression< Func< T, K > >  keySelector)

Orders by descending according to the selector. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 42 of file QuerySourceDsl.cs.

◆ OrderDescending()

IQuerySource< T > Fauna.Linq.QuerySource< T >.OrderDescending ( )

Orders by descending. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 49 of file QuerySourceDsl.cs.

◆ PaginateAsync()

IAsyncEnumerable< Page< T > > Fauna.Linq.QuerySource< T >.PaginateAsync ( QueryOptions queryOptions = null,
CancellationToken  cancel = default 
)

Executes a query with pagination.

Parameters
queryOptionsQuery options.
cancelA cancellation token.
Returns
An async enumerable for page results.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 47 of file QuerySource.cs.

◆ Reverse()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Reverse ( )

Reverses the order of the results. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

◆ Select< R >()

IQuerySource< R > Fauna.Linq.QuerySource< T >.Select< R > ( Expression< Func< T, R > >  selector)

Applies a projection to the query. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 60 of file QuerySourceDsl.cs.

◆ Single() [1/2]

T Fauna.Linq.QuerySource< T >.Single ( )

Executes the query. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.

Returns
The query result.

Implements Fauna.Linq.IQuerySource< T >.

◆ Single() [2/2]

T Fauna.Linq.QuerySource< T >.Single ( Expression< Func< T, bool > >  predicate)

Applies the predicate and executes the query. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.

Returns
The query result.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleAsync() [1/2]

Task< T > Fauna.Linq.QuerySource< T >.SingleAsync ( CancellationToken  cancel = default)

Executes the query asynchronously. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.

Returns
The query result.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleAsync() [2/2]

Task< T > Fauna.Linq.QuerySource< T >.SingleAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate and executes the query asynchronously. If the result is a single element, returns it. Otherwise, throws an exception. This is evaluated server-side.

Returns
The query result.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleOrDefault() [1/2]

T Fauna.Linq.QuerySource< T >.SingleOrDefault ( )

Executes the query. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.

Returns
The query result or default.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleOrDefault() [2/2]

T Fauna.Linq.QuerySource< T >.SingleOrDefault ( Expression< Func< T, bool > >  predicate)

Applies the predicate and executes the query. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.

Returns
The query result or default.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleOrDefaultAsync() [1/2]

Task< T > Fauna.Linq.QuerySource< T >.SingleOrDefaultAsync ( CancellationToken  cancel = default)

Executes the query asynchronously. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.

Returns
The query result or default.

Implements Fauna.Linq.IQuerySource< T >.

◆ SingleOrDefaultAsync() [2/2]

Task< T > Fauna.Linq.QuerySource< T >.SingleOrDefaultAsync ( Expression< Func< T, bool > >  predicate,
CancellationToken  cancel = default 
)

Applies the predicate and executes the query asynchronously. If the result is a single element, returns it. Otherwise, returns the default. This is evaluated server-side.

Returns
The query result or default.

Implements Fauna.Linq.IQuerySource< T >.

◆ Skip()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Skip ( int  count)

Skips the first N elements of the results. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

◆ Sum() [1/3]

double Fauna.Linq.QuerySource< T >.Sum ( Expression< Func< T, double > >  selector)

Calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ Sum() [2/3]

int Fauna.Linq.QuerySource< T >.Sum ( Expression< Func< T, int > >  selector)

Calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ Sum() [3/3]

long Fauna.Linq.QuerySource< T >.Sum ( Expression< Func< T, long > >  selector)

Calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ SumAsync() [1/3]

Task< double > Fauna.Linq.QuerySource< T >.SumAsync ( Expression< Func< T, double > >  selector,
CancellationToken  cancel = default 
)

Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ SumAsync() [2/3]

Task< int > Fauna.Linq.QuerySource< T >.SumAsync ( Expression< Func< T, int > >  selector,
CancellationToken  cancel = default 
)

Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ SumAsync() [3/3]

Task< long > Fauna.Linq.QuerySource< T >.SumAsync ( Expression< Func< T, long > >  selector,
CancellationToken  cancel = default 
)

Asynchronously calculates the sum of values returned by a provided selector. This is evaluated server-side.

Returns
The sum of selected values.

Implements Fauna.Linq.IQuerySource< T >.

◆ Take()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Take ( int  count)

Takes the first N elements of the results. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToArray()

T[] Fauna.Linq.QuerySource< T >.ToArray ( )

Executes the query synchronously and converts the results to a T:T[].

Returns
The query result as T:T[].

Implements Fauna.Linq.IQuerySource< T >.

◆ ToArrayAsync()

async Task< T[]> Fauna.Linq.QuerySource< T >.ToArrayAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and converts the results to a T:T[].

Returns
The query result as an awaitable Task of T:T[].

Implements Fauna.Linq.IQuerySource< T >.

◆ ToAsyncEnumerable()

IAsyncEnumerable< T > Fauna.Linq.QuerySource< T >.ToAsyncEnumerable ( CancellationToken  cancel = default)

Executes a query asynchronously.

Parameters
cancelA cancellation token.
Returns
A enumerable of results.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToDictionary< K, V >() [1/2]

Dictionary< K, V > Fauna.Linq.QuerySource< T >.ToDictionary< K, V > ( Func< T, K >  getKey,
Func< T, V >  getValue 
)

Executes the query synchronously and converts the results to a Dictionary<K,V>.

Parameters
getKeyA function used to obtain a key.
getValueA function used to obtain a value.
Template Parameters
KThe key type of the dictionary.
VThe value type of the dictionary.
Returns
The query result as a Dictionary<K,V>.

Implements Fauna.Linq.IQuerySource< T >.

Type Constraints
K :notnull 
K :ToDictionary 
K :getKey 
K :getValue 
K :null 

◆ ToDictionary< K, V >() [2/2]

Dictionary< K, V > Fauna.Linq.QuerySource< T >.ToDictionary< K, V > ( Func< T, K >  getKey,
Func< T, V >  getValue,
IEqualityComparer< K >?  comparer 
)

Executes the query synchronously and converts the results to a Dictionary<K,V>.

Parameters
getKeyA function used to obtain a key.
getValueA function used to obtain a value.
comparerA comparer used to compare keys.
Template Parameters
KThe key type of the dictionary.
VThe value type of the dictionary.
Returns
The query result as a Dictionary<K,V>.

Implements Fauna.Linq.IQuerySource< T >.

Type Constraints
K :notnull 
K :ToEnumerable() 
K :ToDictionary 
K :getKey 
K :getValue 
K :comparer 

◆ ToDictionaryAsync< K, V >() [1/2]

Task< Dictionary< K, V > > Fauna.Linq.QuerySource< T >.ToDictionaryAsync< K, V > ( Func< T, K >  getKey,
Func< T, V >  getValue,
CancellationToken  cancel = default 
)

Executes the query asynchronously and converts the results to a Dictionary<K,V>.

Parameters
getKeyA function used to obtain a key.
getValueA function used to obtain a value.
cancelA cancellation token.
Template Parameters
KThe key type of the dictionary.
VThe value type of the dictionary.
Returns
The query result as an awaitable Task of Dictionary<K,V>.

Implements Fauna.Linq.IQuerySource< T >.

Type Constraints
K :notnull 
K :ToDictionaryAsync 
K :getKey 
K :getValue 
K :null 
K :cancel 

◆ ToDictionaryAsync< K, V >() [2/2]

async Task< Dictionary< K, V > > Fauna.Linq.QuerySource< T >.ToDictionaryAsync< K, V > ( Func< T, K >  getKey,
Func< T, V >  getValue,
IEqualityComparer< K >?  comparer,
CancellationToken  cancel = default 
)

Executes the query asynchronously and converts the results to a Dictionary<K,V>.

Parameters
getKeyA function used to obtain a key.
getValueA function used to obtain a value.
comparerA comparer used to compare keys.
cancelA cancellation token.
Template Parameters
KThe key type of the dictionary.
VThe value type of the dictionary.
Returns
The query result as an awaitable Task of Dictionary<K,V>.

Implements Fauna.Linq.IQuerySource< T >.

Type Constraints
K :notnull 

Definition at line 119 of file QuerySourceToCollections.cs.

◆ ToEnumerable()

IEnumerable< T > Fauna.Linq.QuerySource< T >.ToEnumerable ( )

Executes a query.

Returns
A enumerable of results.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToHashSet() [1/2]

HashSet< T > Fauna.Linq.QuerySource< T >.ToHashSet ( )

Executes the query synchronously and converts the results to a HashSet<T>.

Returns
The query result as a HashSet<T>.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToHashSet() [2/2]

HashSet< T > Fauna.Linq.QuerySource< T >.ToHashSet ( IEqualityComparer< T >?  comparer)

Executes the query synchronously and converts the results to a HashSet<T> using a comparer.

Parameters
comparerThe comparer to use.
Returns
The query result as a HashSet<T>.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToHashSetAsync() [1/2]

Task< HashSet< T > > Fauna.Linq.QuerySource< T >.ToHashSetAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and converts the results to a HashSet<T>.

Returns
The query result as an awaitable Task of HashSet<T>.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToHashSetAsync() [2/2]

async Task< HashSet< T > > Fauna.Linq.QuerySource< T >.ToHashSetAsync ( IEqualityComparer< T >?  comparer,
CancellationToken  cancel = default 
)

Executes the query asynchronously and converts the results to a HashSet<T>.

Parameters
comparerThe comparer to use.
cancelA cancellation token.
Returns
The query result as an awaitable Task of HashSet<T>.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 67 of file QuerySourceToCollections.cs.

◆ ToList()

List< T > Fauna.Linq.QuerySource< T >.ToList ( )

Executes the query synchronously and converts the results to a List<T>.

Returns
The query result as a List<T>.

Implements Fauna.Linq.IQuerySource< T >.

◆ ToListAsync()

async Task< List< T > > Fauna.Linq.QuerySource< T >.ToListAsync ( CancellationToken  cancel = default)

Executes the query asynchronously and converts the results to a List<T>.

Returns
The query result as an awaitable Task of List<T>.

Implements Fauna.Linq.IQuerySource< T >.

Definition at line 21 of file QuerySourceToCollections.cs.

◆ Where()

IQuerySource< T > Fauna.Linq.QuerySource< T >.Where ( Expression< Func< T, bool > >  predicate)

Applies the predicate to the query. This is evaluated server-side.

Returns
This IQuerySource<T> instance.

Implements Fauna.Linq.IQuerySource< T >.


The documentation for this class was generated from the following files: