Search Results for

    Show / Hide Table of Contents

    Class CacheLinqExtensions

    Extensions methods for ICache<TK, TV>.

    Inheritance
    object
    CacheLinqExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Apache.Ignite.Linq
    Assembly: Apache.Ignite.Linq.dll
    Syntax
    public static class CacheLinqExtensions

    Methods

    AsCacheQueryable<TKey, TValue>(ICache<TKey, TValue>)

    Gets an IQueryable<T> instance over this cache.

    Resulting query will be translated to cache SQL query and executed over the cache instance via Query(SqlFieldsQuery).

    Result of this method (and subsequent query) can be cast to ICacheQueryable for introspection, or converted with ToCacheQueryable<T>(IQueryable<T>) extension method.
    Declaration
    public static IQueryable<ICacheEntry<TKey, TValue>> AsCacheQueryable<TKey, TValue>(this ICache<TKey, TValue> cache)
    Parameters
    Type Name Description
    ICache<TKey, TValue> cache

    The cache.

    Returns
    Type Description
    IQueryable<ICacheEntry<TKey, TValue>>

    IQueryable<T> instance over this cache.

    Type Parameters
    Name Description
    TKey

    The type of the key.

    TValue

    The type of the value.

    AsCacheQueryable<TKey, TValue>(ICache<TKey, TValue>, QueryOptions)

    Gets an IQueryable<T> instance over this cache.

    Resulting query will be translated to cache SQL query and executed over the cache instance via Query(SqlFieldsQuery). depending on requested result.

    Result of this method (and subsequent query) can be cast to ICacheQueryable for introspection.
    Declaration
    [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "False positive")]
    public static IQueryable<ICacheEntry<TKey, TValue>> AsCacheQueryable<TKey, TValue>(this ICache<TKey, TValue> cache, QueryOptions queryOptions)
    Parameters
    Type Name Description
    ICache<TKey, TValue> cache

    The cache.

    QueryOptions queryOptions

    The query options.

    Returns
    Type Description
    IQueryable<ICacheEntry<TKey, TValue>>

    IQueryable<T> instance over this cache.

    Type Parameters
    Name Description
    TKey

    The type of the key.

    TValue

    The type of the value.

    AsCacheQueryable<TKey, TValue>(ICache<TKey, TValue>, bool)

    Gets an IQueryable<T> instance over this cache.

    Resulting query will be translated to cache SQL query and executed over the cache instance via Query(SqlFieldsQuery). depending on requested result.

    Result of this method (and subsequent query) can be cast to ICacheQueryable for introspection.
    Declaration
    public static IQueryable<ICacheEntry<TKey, TValue>> AsCacheQueryable<TKey, TValue>(this ICache<TKey, TValue> cache, bool local)
    Parameters
    Type Name Description
    ICache<TKey, TValue> cache

    The cache.

    bool local

    Local flag. When set query will be executed only on local node, so only local entries will be returned as query result.

    Returns
    Type Description
    IQueryable<ICacheEntry<TKey, TValue>>

    IQueryable<T> instance over this cache.

    Type Parameters
    Name Description
    TKey

    The type of the key.

    TValue

    The type of the value.

    AsCacheQueryable<TKey, TValue>(ICache<TKey, TValue>, bool, string)

    Gets an IQueryable<T> instance over this cache.

    Resulting query will be translated to cache SQL query and executed over the cache instance via Query(SqlFieldsQuery). depending on requested result.

    Result of this method (and subsequent query) can be cast to ICacheQueryable for introspection.
    Declaration
    public static IQueryable<ICacheEntry<TKey, TValue>> AsCacheQueryable<TKey, TValue>(this ICache<TKey, TValue> cache, bool local, string tableName)
    Parameters
    Type Name Description
    ICache<TKey, TValue> cache

    The cache.

    bool local

    Local flag. When set query will be executed only on local node, so only local entries will be returned as query result.

    string tableName

    Name of the table.

    Table name is equal to short class name of a cache value. When a cache has only one type of values, or only one QueryEntity defined, table name will be inferred and can be omitted.
    Returns
    Type Description
    IQueryable<ICacheEntry<TKey, TValue>>

    IQueryable<T> instance over this cache.

    Type Parameters
    Name Description
    TKey

    The type of the key.

    TValue

    The type of the value.

    RemoveAll<TKey, TValue>(IQueryable<ICacheEntry<TKey, TValue>>)

    Removes all rows that are matched by the specified query.

    This method results in "DELETE FROM" distributed SQL query, performing bulk delete (as opposed to fetching all rows locally).
    Declaration
    [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "Validation is present.")]
    public static int RemoveAll<TKey, TValue>(this IQueryable<ICacheEntry<TKey, TValue>> query)
    Parameters
    Type Name Description
    IQueryable<ICacheEntry<TKey, TValue>> query

    The query.

    Returns
    Type Description
    int

    Affected row count.

    Type Parameters
    Name Description
    TKey

    Key type.

    TValue

    Value type.

    RemoveAll<TKey, TValue>(IQueryable<ICacheEntry<TKey, TValue>>, Expression<Func<ICacheEntry<TKey, TValue>, bool>>)

    Deletes all rows that are matched by the specified query.

    This method results in "DELETE FROM" distributed SQL query, performing bulk delete (as opposed to fetching all rows locally).
    Declaration
    [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Only specified type of predicate is valid.")]
    [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "Validation is present.")]
    public static int RemoveAll<TKey, TValue>(this IQueryable<ICacheEntry<TKey, TValue>> query, Expression<Func<ICacheEntry<TKey, TValue>, bool>> predicate)
    Parameters
    Type Name Description
    IQueryable<ICacheEntry<TKey, TValue>> query

    The query.

    Expression<Func<ICacheEntry<TKey, TValue>, bool>> predicate

    The predicate.

    Returns
    Type Description
    int

    Affected row count.

    Type Parameters
    Name Description
    TKey

    Key type.

    TValue

    Value type.

    ToCacheQueryable<T>(IQueryable<T>)

    Casts this query to ICacheQueryable.

    Declaration
    public static ICacheQueryable ToCacheQueryable<T>(this IQueryable<T> query)
    Parameters
    Type Name Description
    IQueryable<T> query
    Returns
    Type Description
    ICacheQueryable
    Type Parameters
    Name Description
    T

    UpdateAll<TKey, TValue>(IQueryable<ICacheEntry<TKey, TValue>>, Expression<Func<IUpdateDescriptor<TKey, TValue>, IUpdateDescriptor<TKey, TValue>>>)

    Updates all rows that are matched by the specified query.

    This method results in "UPDATE" distributed SQL query, performing bulk update (as opposed to fetching all rows locally).
    Declaration
    [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "False positive")]
    public static int UpdateAll<TKey, TValue>(this IQueryable<ICacheEntry<TKey, TValue>> query, Expression<Func<IUpdateDescriptor<TKey, TValue>, IUpdateDescriptor<TKey, TValue>>> updateDescription)
    Parameters
    Type Name Description
    IQueryable<ICacheEntry<TKey, TValue>> query

    The query.

    Expression<Func<IUpdateDescriptor<TKey, TValue>, IUpdateDescriptor<TKey, TValue>>> updateDescription

    The update description.

    Returns
    Type Description
    int

    Affected row count.

    Type Parameters
    Name Description
    TKey

    Key type.

    TValue

    Value type.

    In this article
    Back to top © 2015 - 2019 The Apache Software Foundation