IdbIndex Class
An index handle (https://w3c.github.io/IndexedDB/#idbindex).
public sealed class IdbIndexProperties
| Name | Description |
|---|---|
| KeyPath | Gets the key path of the index: a string or an array of strings (the same array each time). |
| MultiEntry | Gets whether an array key adds a record per item. |
| Name | Gets or sets the name of the index (it can only be changed in an upgrade transaction). |
| ObjectStore | Gets the object store handle of the index. |
| Unique | Gets whether the keys of the index are unique. |
KeyPath
IdbIndex.csGets the key path of the index: a string or an array of strings (the same array each time).
public object? KeyPath { get; }MultiEntry
IdbIndex.csGets whether an array key adds a record per item.
public bool MultiEntry { get; }Name
IdbIndex.csGets or sets the name of the index (it can only be changed in an upgrade transaction).
public string Name { get; set; }ObjectStore
IdbIndex.csGets the object store handle of the index.
public IdbObjectStore ObjectStore { get; }Unique
IdbIndex.csGets whether the keys of the index are unique.
public bool Unique { get; }Methods
| Name | Description |
|---|---|
| Count(object?) | Counts the index records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-count). |
| Get(object?) | Retrieves the value of the record referenced by the first index record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-get). |
| GetAll(object?, uint?) | Retrieves the values of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getall). |
| GetAllKeys(object?, uint?) | Retrieves the primary keys of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getallkeys). |
| GetAllRecords(IdbGetAllOptions?) | Retrieves the keys, the primary keys and the values of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getallrecords). |
| GetKey(object?) | Retrieves the primary key of the first index record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-getkey). |
| OpenCursor(object?, IdbCursorDirection) | Opens a cursor over the index records (https://w3c.github.io/IndexedDB/#dom-idbindex-opencursor). |
| OpenKeyCursor(object?, IdbCursorDirection) | Opens a cursor over the keys of the index records (https://w3c.github.io/IndexedDB/#dom-idbindex-openkeycursor). |
Count(object?)
IdbIndex.csCounts the index records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-count).
public IdbRequest Count(object? query = null)Get(object?)
IdbIndex.csRetrieves the value of the record referenced by the first index record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-get).
public IdbRequest Get(object? query)GetAll(object?, uint?)
IdbIndex.csRetrieves the values of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getall).
public IdbRequest GetAll(object? queryOrOptions = null, uint? count = null)Parameters
Returns
See also
GetAllKeys(object?, uint?)
IdbIndex.csRetrieves the primary keys of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getallkeys).
public IdbRequest GetAllKeys(object? queryOrOptions = null, uint? count = null)Parameters
Returns
See also
GetAllRecords(IdbGetAllOptions?)
IdbIndex.csRetrieves the keys, the primary keys and the values of the records (https://w3c.github.io/IndexedDB/#dom-idbindex-getallrecords).
public IdbRequest GetAllRecords(IdbGetAllOptions? options = null)GetKey(object?)
IdbIndex.csRetrieves the primary key of the first index record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbindex-getkey).
public IdbRequest GetKey(object? query)OpenCursor(object?, IdbCursorDirection)
IdbIndex.csOpens a cursor over the index records (https://w3c.github.io/IndexedDB/#dom-idbindex-opencursor).
public IdbRequest OpenCursor(object? query = null, IdbCursorDirection direction = IdbCursorDirection.Next)OpenKeyCursor(object?, IdbCursorDirection)
IdbIndex.csOpens a cursor over the keys of the index records (https://w3c.github.io/IndexedDB/#dom-idbindex-openkeycursor).
public IdbRequest OpenKeyCursor(object? query = null, IdbCursorDirection direction = IdbCursorDirection.Next)