Package org.apache.calcite.linq4j
Interface QueryableFactory<T>
-
- Type Parameters:
T- Element type
- All Known Implementing Classes:
QueryableRecorder
public interface QueryableFactory<T>Factory for buildingQueryableobjects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Taggregate(Queryable<T> source, FunctionExpression<Function2<T,T,T>> selector)Applies an accumulator function over a sequence.<TAccumulate>
TAccumulateaggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)Applies an accumulator function over a sequence.<TAccumulate,TResult>
TResultaggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)Applies an accumulator function over a sequence.booleanall(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Determines whether all the elements of a sequence satisfy a condition.booleanany(Queryable<T> source)Determines whether a sequence contains any elements.booleanany(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Determines whether any element of a sequence satisfies a condition.BigDecimalaverageBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.doubleaverageDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.floataverageFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)Computes the average of a sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.intaverageInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)Computes the average of a sequence of int values that is obtained by invoking a projection function on each element of the input sequence.longaverageLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)Computes the average of a sequence of long values that is obtained by invoking a projection function on each element of the input sequence.BigDecimalaverageNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)Computes the average of a sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.DoubleaverageNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)Computes the average of a sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.FloataverageNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)Computes the average of a sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.IntegeraverageNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)Computes the average of a sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.LongaverageNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)Computes the average of a sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.<T2> Queryable<T2>cast(Queryable<T> source, Class<T2> clazz)Queryable<T>concat(Queryable<T> source, Enumerable<T> source2)Concatenates two sequences.booleancontains(Queryable<T> source, T element)Determines whether a sequence contains a specified element by using the default equality comparer.booleancontains(Queryable<T> source, T element, EqualityComparer<T> comparer)Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>.intcount(Queryable<T> source)Returns the number of elements in a sequence.intcount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the number of elements in the specified sequence that satisfies a condition.Queryable<T>defaultIfEmpty(Queryable<T> source)Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.Queryable<T>defaultIfEmpty(Queryable<T> source, T value)Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.Queryable<T>distinct(Queryable<T> source)Returns distinct elements from a sequence by using the default equality comparer to compare values.Queryable<T>distinct(Queryable<T> source, EqualityComparer<T> comparer)Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>to compare values.TelementAt(Queryable<T> source, int index)Returns the element at a specified index in a sequence.TelementAtOrDefault(Queryable<T> source, int index)Returns the element at a specified index in a sequence or a default value if the index is out of range.Queryable<T>except(Queryable<T> source, Enumerable<T> enumerable)Produces the set difference of two sequences by using the default equality comparer to compare values.Queryable<T>except(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)Produces the set difference of two sequences by using the specifiedEqualityComparer<T>to compare values.Tfirst(Queryable<T> source)Returns the first element of a sequence.Tfirst(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the first element of a sequence that satisfies a specified condition.TfirstOrDefault(Queryable<T> source)Returns the first element of a sequence, or a default value if the sequence contains no elements.TfirstOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.<TKey> Queryable<Grouping<TKey,T>>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)Groups the elements of a sequence according to a specified key selector function.<TKey> Queryable<Grouping<TKey,T>>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.<TKey,TElement>
Queryable<Grouping<TKey,TElement>>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector)Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.<TKey,TElement>
Queryable<Grouping<TKey,TElement>>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)Groups the elements of a sequence and projects the elements for each group by using a specified function.<TKey,TElement,TResult>
Queryable<TResult>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.<TKey,TElement,TResult>
Queryable<TResult>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector, EqualityComparer<TKey> comparer)Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.<TKey,TResult>
Queryable<TResult>groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector)Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.<TKey,TResult>
Queryable<TResult>groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector, EqualityComparer<TKey> comparer)Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.<TInner,TKey,TResult>
Queryable<TResult>groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector)Correlates the elements of two sequences based on key equality and groups the results.<TInner,TKey,TResult>
Queryable<TResult>groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector, EqualityComparer<TKey> comparer)Correlates the elements of two sequences based on key equality and groups the results.Queryable<T>intersect(Queryable<T> source, Enumerable<T> enumerable)Produces the set intersection of two sequences by using the default equality comparer to compare values.Queryable<T>intersect(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)Produces the set intersection of two sequences by using the specified EqualityComparer to compare values.<TInner,TKey,TResult>
Queryable<TResult>join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector)Correlates the elements of two sequences based on matching keys.<TInner,TKey,TResult>
Queryable<TResult>join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector, EqualityComparer<TKey> comparer)Correlates the elements of two sequences based on matching keys.Tlast(Queryable<T> source)Returns the last element in a sequence.Tlast(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the last element of a sequence that satisfies a specified condition.TlastOrDefault(Queryable<T> source)Returns the last element in a sequence, or a default value if the sequence contains no elements.TlastOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.longlongCount(Queryable<T> source)Returns an long that represents the total number of elements in a sequence.longlongCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns an long that represents the number of elements in a sequence that satisfy a condition.Tmax(Queryable<T> source)Returns the maximum value in a genericIQueryable<T>.<TResult extends Comparable<TResult>>
TResultmax(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)Invokes a projection function on each element of a genericIQueryable<T>and returns the maximum resulting value.Tmin(Queryable<T> source)Returns the minimum value in a genericIQueryable<T>.<TResult extends Comparable<TResult>>
TResultmin(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)Invokes a projection function on each element of a genericIQueryable<T>and returns the minimum resulting value.<TResult> Queryable<TResult>ofType(Queryable<T> source, Class<TResult> clazz)Filters the elements of an IQueryable based on a specified type.<TKey extends Comparable>
OrderedQueryable<T>orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)Sorts the elements of a sequence in ascending order according to a key.<TKey> OrderedQueryable<T>orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)Sorts the elements of a sequence in ascending order by using a specified comparer.<TKey extends Comparable>
OrderedQueryable<T>orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)Sorts the elements of a sequence in descending order according to a key.<TKey> OrderedQueryable<T>orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)Sorts the elements of a sequence in descending order by using a specified comparer.Queryable<T>reverse(Queryable<T> source)Inverts the order of the elements in a sequence.<TResult> Queryable<TResult>select(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)Projects each element of a sequence into a new form.<TResult> Queryable<TResult>selectMany(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TResult>>> selector)Projects each element of a sequence to anEnumerable<T>and combines the resulting sequences into one sequence.<TCollection,TResult>
Queryable<TResult>selectMany(Queryable<T> source, FunctionExpression<Function2<T,Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)Projects each element of a sequence to anEnumerable<T>that incorporates the index of the source element that produced it.<TCollection,TResult>
Queryable<TResult>selectManyN(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)Projects each element of a sequence to anEnumerable<T>and invokes a result selector function on each element therein.<TResult> Queryable<TResult>selectManyN(Queryable<T> source, FunctionExpression<Function2<T,Integer,Enumerable<TResult>>> selector)Projects each element of a sequence to anEnumerable<T>and combines the resulting sequences into one sequence.<TResult> Queryable<TResult>selectN(Queryable<T> source, FunctionExpression<Function2<T,Integer,TResult>> selector)Projects each element of a sequence into a new form by incorporating the element's index.booleansequenceEqual(Queryable<T> source, Enumerable<T> enumerable)Determines whether two sequences are equal by using the default equality comparer to compare elements.booleansequenceEqual(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)Determines whether two sequences are equal by using a specified EqualityComparer to compare elements.Tsingle(Queryable<T> source)Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.Tsingle(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.TsingleOrDefault(Queryable<T> source)Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.TsingleOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.Queryable<T>skip(Queryable<T> source, int count)Bypasses a specified number of elements in a sequence and then returns the remaining elements.Queryable<T>skipWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.Queryable<T>skipWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,Integer>> predicate)Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.BigDecimalsumBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.doublesumDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.floatsumFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)Computes the sum of the sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.intsumInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.longsumLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.BigDecimalsumNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)Computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.DoublesumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.FloatsumNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)Computes the sum of the sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.IntegersumNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)Computes the sum of the sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.LongsumNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)Computes the sum of the sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.Queryable<T>take(Queryable<T> source, int count)Returns a specified number of contiguous elements from the start of a sequence.Queryable<T>takeWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)Returns elements from a sequence as long as a specified condition is true.Queryable<T>takeWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,Integer>> predicate)Returns elements from a sequence as long as a specified condition is true.<TKey extends Comparable<TKey>>
OrderedQueryable<T>thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)<TKey> OrderedQueryable<T>thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)<TKey extends Comparable<TKey>>
OrderedQueryable<T>thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)<TKey> OrderedQueryable<T>thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)Queryable<T>union(Queryable<T> source, Enumerable<T> source1)Produces the set union of two sequences by using the default equality comparer.Queryable<T>union(Queryable<T> source, Enumerable<T> source1, EqualityComparer<T> comparer)Produces the set union of two sequences by using a specifiedEqualityComparer<T>.Queryable<T>where(Queryable<T> source, FunctionExpression<? extends Predicate1<T>> predicate)Filters a sequence of values based on a predicate.Queryable<T>whereN(Queryable<T> source, FunctionExpression<? extends Predicate2<T,Integer>> predicate)Filters a sequence of values based on a predicate.<T1,TResult>
Queryable<TResult>zip(Queryable<T> source, Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)Merges two sequences by using the specified predicate function.
-
-
-
Method Detail
-
aggregate
T aggregate(Queryable<T> source, FunctionExpression<Function2<T,T,T>> selector)
Applies an accumulator function over a sequence.
-
aggregate
<TAccumulate> TAccumulate aggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
-
aggregate
<TAccumulate,TResult> TResult aggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.
-
all
boolean all(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Determines whether all the elements of a sequence satisfy a condition.
-
any
boolean any(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Determines whether any element of a sequence satisfies a condition.
-
averageBigDecimal
BigDecimal averageBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)
Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.
-
averageNullableBigDecimal
BigDecimal averageNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Computes the average of a sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.
-
averageDouble
double averageDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)
Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.
-
averageNullableDouble
Double averageNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)
Computes the average of a sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.
-
averageInteger
int averageInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)
Computes the average of a sequence of int values that is obtained by invoking a projection function on each element of the input sequence.
-
averageNullableInteger
Integer averageNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)
Computes the average of a sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.
-
averageFloat
float averageFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)
Computes the average of a sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.
-
averageNullableFloat
Float averageNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)
Computes the average of a sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.
-
averageLong
long averageLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)
Computes the average of a sequence of long values that is obtained by invoking a projection function on each element of the input sequence.
-
averageNullableLong
Long averageNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)
Computes the average of a sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.
-
contains
boolean contains(Queryable<T> source, T element)
Determines whether a sequence contains a specified element by using the default equality comparer.
-
contains
boolean contains(Queryable<T> source, T element, EqualityComparer<T> comparer)
Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>.
-
count
int count(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the number of elements in the specified sequence that satisfies a condition.
-
defaultIfEmpty
Queryable<T> defaultIfEmpty(Queryable<T> source)
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.
-
defaultIfEmpty
Queryable<T> defaultIfEmpty(Queryable<T> source, T value)
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.
-
distinct
Queryable<T> distinct(Queryable<T> source)
Returns distinct elements from a sequence by using the default equality comparer to compare values.
-
distinct
Queryable<T> distinct(Queryable<T> source, EqualityComparer<T> comparer)
Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>to compare values.
-
elementAt
T elementAt(Queryable<T> source, int index)
Returns the element at a specified index in a sequence.
-
elementAtOrDefault
T elementAtOrDefault(Queryable<T> source, int index)
Returns the element at a specified index in a sequence or a default value if the index is out of range.
-
except
Queryable<T> except(Queryable<T> source, Enumerable<T> enumerable)
Produces the set difference of two sequences by using the default equality comparer to compare values. (Defined by Queryable.)
-
except
Queryable<T> except(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)
Produces the set difference of two sequences by using the specifiedEqualityComparer<T>to compare values.
-
first
T first(Queryable<T> source)
Returns the first element of a sequence. (Defined by Queryable.)
-
first
T first(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the first element of a sequence that satisfies a specified condition.
-
firstOrDefault
T firstOrDefault(Queryable<T> source)
Returns the first element of a sequence, or a default value if the sequence contains no elements.
-
firstOrDefault
T firstOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.
-
groupBy
<TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Groups the elements of a sequence according to a specified key selector function.
-
groupBy
<TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.
-
groupBy
<TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector)
Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
-
groupBy
<TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence and projects the elements for each group by using a specified function. Key values are compared by using a specified comparer.
-
groupByK
<TKey,TResult> Queryable<TResult> groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector)
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.
-
groupByK
<TKey,TResult> Queryable<TResult> groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer.
-
groupBy
<TKey,TElement,TResult> Queryable<TResult> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.
-
groupBy
<TKey,TElement,TResult> Queryable<TResult> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer and the elements of each group are projected by using a specified function.
-
groupJoin
<TInner,TKey,TResult> Queryable<TResult> groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector)
Correlates the elements of two sequences based on key equality and groups the results. The default equality comparer is used to compare keys.
-
groupJoin
<TInner,TKey,TResult> Queryable<TResult> groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on key equality and groups the results. A specified EqualityComparer is used to compare keys.
-
intersect
Queryable<T> intersect(Queryable<T> source, Enumerable<T> enumerable)
Produces the set intersection of two sequences by using the default equality comparer to compare values. (Defined by Queryable.)
-
intersect
Queryable<T> intersect(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)
Produces the set intersection of two sequences by using the specified EqualityComparer to compare values.
-
join
<TInner,TKey,TResult> Queryable<TResult> join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector)
Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.
-
join
<TInner,TKey,TResult> Queryable<TResult> join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on matching keys. A specified EqualityComparer is used to compare keys.
-
last
T last(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the last element of a sequence that satisfies a specified condition.
-
lastOrDefault
T lastOrDefault(Queryable<T> source)
Returns the last element in a sequence, or a default value if the sequence contains no elements.
-
lastOrDefault
T lastOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
-
longCount
long longCount(Queryable<T> source)
Returns an long that represents the total number of elements in a sequence.
-
longCount
long longCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns an long that represents the number of elements in a sequence that satisfy a condition.
-
max
<TResult extends Comparable<TResult>> TResult max(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<T>and returns the maximum resulting value.
-
min
<TResult extends Comparable<TResult>> TResult min(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<T>and returns the minimum resulting value.
-
ofType
<TResult> Queryable<TResult> ofType(Queryable<T> source, Class<TResult> clazz)
Filters the elements of an IQueryable based on a specified type.
-
orderBy
<TKey extends Comparable> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Sorts the elements of a sequence in ascending order according to a key.
-
orderBy
<TKey> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
Sorts the elements of a sequence in ascending order by using a specified comparer.
-
orderByDescending
<TKey extends Comparable> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Sorts the elements of a sequence in descending order according to a key.
-
orderByDescending
<TKey> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
Sorts the elements of a sequence in descending order by using a specified comparer.
-
select
<TResult> Queryable<TResult> select(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Projects each element of a sequence into a new form.
-
selectN
<TResult> Queryable<TResult> selectN(Queryable<T> source, FunctionExpression<Function2<T,Integer,TResult>> selector)
Projects each element of a sequence into a new form by incorporating the element's index.
-
selectMany
<TResult> Queryable<TResult> selectMany(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TResult>>> selector)
Projects each element of a sequence to anEnumerable<T>and combines the resulting sequences into one sequence.
-
selectManyN
<TResult> Queryable<TResult> selectManyN(Queryable<T> source, FunctionExpression<Function2<T,Integer,Enumerable<TResult>>> selector)
Projects each element of a sequence to anEnumerable<T>and combines the resulting sequences into one sequence. The index of each source element is used in the projected form of that element.
-
selectMany
<TCollection,TResult> Queryable<TResult> selectMany(Queryable<T> source, FunctionExpression<Function2<T,Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to anEnumerable<T>that incorporates the index of the source element that produced it. A result selector function is invoked on each element of each intermediate sequence, and the resulting values are combined into a single, one-dimensional sequence and returned.
-
selectManyN
<TCollection,TResult> Queryable<TResult> selectManyN(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to anEnumerable<T>and invokes a result selector function on each element therein. The resulting values from each intermediate sequence are combined into a single, one-dimensional sequence and returned.
-
sequenceEqual
boolean sequenceEqual(Queryable<T> source, Enumerable<T> enumerable)
Determines whether two sequences are equal by using the default equality comparer to compare elements.
-
sequenceEqual
boolean sequenceEqual(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> comparer)
Determines whether two sequences are equal by using a specified EqualityComparer to compare elements.
-
single
T single(Queryable<T> source)
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
-
single
T single(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.
-
singleOrDefault
T singleOrDefault(Queryable<T> source)
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
-
singleOrDefault
T singleOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
-
skip
Queryable<T> skip(Queryable<T> source, int count)
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
-
skipWhile
Queryable<T> skipWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
-
skipWhileN
Queryable<T> skipWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,Integer>> predicate)
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.
-
sumBigDecimal
BigDecimal sumBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)
Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.
-
sumNullableBigDecimal
BigDecimal sumNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.
-
sumDouble
double sumDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)
Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.
-
sumNullableDouble
Double sumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)
Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.
-
sumInteger
int sumInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)
Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.
-
sumNullableInteger
Integer sumNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)
Computes the sum of the sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.
-
sumLong
long sumLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)
Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.
-
sumNullableLong
Long sumNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)
Computes the sum of the sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.
-
sumFloat
float sumFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)
Computes the sum of the sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.
-
sumNullableFloat
Float sumNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)
Computes the sum of the sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.
-
take
Queryable<T> take(Queryable<T> source, int count)
Returns a specified number of contiguous elements from the start of a sequence.
-
takeWhile
Queryable<T> takeWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns elements from a sequence as long as a specified condition is true.
-
takeWhileN
Queryable<T> takeWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,Integer>> predicate)
Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function.
-
thenBy
<TKey extends Comparable<TKey>> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
-
thenBy
<TKey> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
-
thenByDescending
<TKey extends Comparable<TKey>> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
-
thenByDescending
<TKey> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
-
union
Queryable<T> union(Queryable<T> source, Enumerable<T> source1)
Produces the set union of two sequences by using the default equality comparer.
-
union
Queryable<T> union(Queryable<T> source, Enumerable<T> source1, EqualityComparer<T> comparer)
Produces the set union of two sequences by using a specifiedEqualityComparer<T>.
-
where
Queryable<T> where(Queryable<T> source, FunctionExpression<? extends Predicate1<T>> predicate)
Filters a sequence of values based on a predicate.
-
whereN
Queryable<T> whereN(Queryable<T> source, FunctionExpression<? extends Predicate2<T,Integer>> predicate)
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
-
zip
<T1,TResult> Queryable<TResult> zip(Queryable<T> source, Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Merges two sequences by using the specified predicate function.
-
-