Search Results for

    Show / Hide Table of Contents
    note

    VeloxDB is still in beta and APIs are subject to change. We are in the process of completing the documentation, so some sections may be incomplete or empty at this time.

    Class SortedIndexReader<T, TKey1, TKey2, TKey3>

    Reader for sorted index with three properties as a key. Use this class to lookup a DatabaseObject using sorted index.

    Inheritance
    object
    SortedIndexReader<T, TKey1, TKey2, TKey3>
    Inherited Members
    object.GetType()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: VeloxDB.ObjectInterface
    Assembly: vlxdb.dll
    Syntax
    public sealed class SortedIndexReader<T, TKey1, TKey2, TKey3> where T : DatabaseObject
    Type Parameters
    Name Description
    T

    Type of DatabaseObject being looked up.

    TKey1

    Type of the first key property.

    TKey2

    Type of the second key property.

    TKey3

    Type of the third key property.

    Methods

    GetAfter(TKey1, ScanDirection)

    Searches the sorted index using the condition key1 > keyProperty1. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfter(TKey1 key1, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetAfter(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition (key1, key2) > (keyProperty1, keyProperty2). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfter(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetAfter(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition (key1, key2, key3) > (keyProperty1, keyProperty2, keyProperty3). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfter(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetAfterOrEqual(TKey1, ScanDirection)

    Searches the sorted index using the condition key1 >= keyProperty1. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfterOrEqual(TKey1 key1, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetAfterOrEqual(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition (key1, key2) >= (keyProperty1, keyProperty2). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfterOrEqual(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetAfterOrEqual(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition (key1, key2, key3) >= (keyProperty1, keyProperty2, keyProperty3). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetAfterOrEqual(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBefore(TKey1, ScanDirection)

    Searches the sorted index using the condition key1 < keyProperty1. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBefore(TKey1 key1, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBefore(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition (key1, key2) < (keyProperty1, keyProperty2). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBefore(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBefore(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition (key1, key2, key3) < (keyProperty1, keyProperty2, keyProperty3). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBefore(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBeforeOrEqual(TKey1, ScanDirection)

    Searches the sorted index using the condition key1 <= keyProperty1. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBeforeOrEqual(TKey1 key1, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBeforeOrEqual(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition (key1, key2) <= (keyProperty1, keyProperty2). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBeforeOrEqual(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetBeforeOrEqual(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition (key1, key2, key3) <= (keyProperty1, keyProperty2, keyProperty3). Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetBeforeOrEqual(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetEntireRange(ScanDirection)

    Returns all the objects in the index.

    Declaration
    public IEnumerable<T> GetEntireRange(ScanDirection scanDirection)
    Parameters
    Type Name Description
    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetEqual(TKey1, ScanDirection)

    Searches the sorted index using the condition key1 = keyProperty1.

    Declaration
    public IEnumerable<T> GetEqual(TKey1 key1, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetEqual(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition key1 = keyProperty1 AND key2 == keyProperty2.

    Declaration
    public IEnumerable<T> GetEqual(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetEqual(TKey1, TKey2, TKey3)

    Searches the sorted index using the condition key1 = keyProperty1 AND key2 == keyProperty2 AND key3 == keyProperty3. This method returns at most a single object with a given key and is ideal for querying unique indexes.

    Declaration
    public T GetEqual(TKey1 key1, TKey2 key2, TKey3 key3)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    Returns
    Type Description
    T

    An object with a given key, if one exists, null otherwise.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetEqual(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition key1 = keyProperty1 AND key2 == keyProperty2 AND key3 == keyProperty3.

    Declaration
    public IEnumerable<T> GetEqual(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialAfter(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 > keyProperty2. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialAfter(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialAfter(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 == keyProperty2 AND key3 > keyProperty3. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialAfter(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialAfterOrEqual(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 >= keyProperty2. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialAfterOrEqual(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialAfterOrEqual(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 == keyProperty2 AND key3 >= keyProperty3. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialAfterOrEqual(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialBefore(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 < keyProperty2. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialBefore(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialBefore(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 == keyProperty2 AND key3 < keyProperty3. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialBefore(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialBeforeOrEqual(TKey1, TKey2, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 <= keyProperty2. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialBeforeOrEqual(TKey1 key1, TKey2 key2, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetPartialBeforeOrEqual(TKey1, TKey2, TKey3, ScanDirection)

    Searches the sorted index using the condition key1 == keyProperty1 AND key2 == keyProperty2 AND key3 <= keyProperty3. Keep in mind that signs < and > are relative to the sorting order of the property in the index, meaning before and after in the sort order.

    Declaration
    public IEnumerable<T> GetPartialBeforeOrEqual(TKey1 key1, TKey2 key2, TKey3 key3, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 key1

    The value of the first key property.

    TKey2 key2

    The value of the second key property.

    TKey3 key3

    The value of the third key property.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetRange(TKey1, bool, TKey1, bool, ScanDirection)

    Returns all the objects in the index that belong to the given interval.

    Declaration
    public IEnumerable<T> GetRange(TKey1 startKey1, bool isStartOpen, TKey1 endKey1, bool isEndOpen, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 startKey1

    The value of the first key property for the range start.

    bool isStartOpen

    Indicates whether the start side of the interval is open or closed.

    TKey1 endKey1

    The value of the first key property for the range end.

    bool isEndOpen

    Indicates whether the end side of the interval is open or closed.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetRange(TKey1, TKey2, bool, TKey1, TKey2, bool, ScanDirection)

    Returns all the objects in the index that belong to the given interval.

    Declaration
    public IEnumerable<T> GetRange(TKey1 startKey1, TKey2 startKey2, bool isStartOpen, TKey1 endKey1, TKey2 endKey2, bool isEndOpen, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 startKey1

    The value of the first key property for the range start.

    TKey2 startKey2

    The value of the second key property for the range start.

    bool isStartOpen

    Indicates whether the start side of the interval is open or closed.

    TKey1 endKey1

    The value of the first key property for the range end.

    TKey2 endKey2

    The value of the second key property for the range end.

    bool isEndOpen

    Indicates whether the end side of the interval is open or closed.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    GetRange(TKey1, TKey2, TKey3, bool, TKey1, TKey2, TKey3, bool, ScanDirection)

    Returns all the objects in the index that belong to the given interval.

    Declaration
    public IEnumerable<T> GetRange(TKey1 startKey1, TKey2 startKey2, TKey3 startKey3, bool isStartOpen, TKey1 endKey1, TKey2 endKey2, TKey3 endKey3, bool isEndOpen, ScanDirection scanDirection)
    Parameters
    Type Name Description
    TKey1 startKey1

    The value of the first key property for the range start.

    TKey2 startKey2

    The value of the second key property for the range start.

    TKey3 startKey3

    The value of the third key property for the range start.

    bool isStartOpen

    Indicates whether the start side of the interval is open or closed.

    TKey1 endKey1

    The value of the first key property for the range end.

    TKey2 endKey2

    The value of the second key property for the range end.

    TKey3 endKey3

    The value of the third key property for the range end.

    bool isEndOpen

    Indicates whether the end side of the interval is open or closed.

    ScanDirection scanDirection

    Indicates a direction in which to scan the index.

    Returns
    Type Description
    IEnumerable<T>

    All objects from the index that satisfy the required condition.

    Exceptions
    Type Condition
    ObjectDisposedException

    If ObjectModel has been disposed.

    See Also

    VeloxDB The definitive guide: Sorted indexes
    SortedIndexAttribute
    GetSortedIndex<T, TKey1, TKey2, TKey3>(string)
    In this article
    © 2025 Copyright: VeloxDB