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 HashIndexReader<T, TKey1>
Reader for a single property hash index. Use this class to lookup a DatabaseObject using hash index.
Inheritance
System.Object
HashIndexReader<T, TKey1>
Namespace: VeloxDB.ObjectInterface
Assembly: vlxdb.dll
Syntax
public sealed class HashIndexReader<T, TKey1> : Object where T : DatabaseObject
Type Parameters
Name | Description |
---|---|
T | Type of DatabaseObject being looked up. |
TKey1 | Type of the key. |
Methods
GetObject(TKey1)
Gets an object by key.
Declaration
public T GetObject(TKey1 key1)
Parameters
Type | Name | Description |
---|---|---|
TKey1 | key1 | The key to lookup in the hash index. |
Returns
Type | Description |
---|---|
T | Requested object if found, otherwise |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | If HashIndexReader<T, TKey1> has been disposed. |
GetObjects(TKey1)
Gets all objects by key.
Declaration
public List<T> GetObjects(TKey1 key1)
Parameters
Type | Name | Description |
---|---|---|
TKey1 | key1 | The key to lookup in the hash index. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> | A List of objects that match the key. If no object matches, empty list is returned. |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | If HashIndexReader<T, TKey1> has been disposed. |