IdbObjectStore Class
An object store handle (https://w3c.github.io/IndexedDB/#idbobjectstore).
public sealed class IdbObjectStoreProperties
| Name | Description |
|---|---|
| AutoIncrement | Gets whether the object store has a key generator. |
| IndexNames | Gets the sorted names of the indexes of the object store. |
| KeyPath | Gets the key path of the object store: a string, an array of strings (the same array each time), or null. |
| Name | Gets or sets the name of the object store (it can only be changed in an upgrade transaction). |
| Transaction | Gets the transaction of the handle. |
AutoIncrement
IdbObjectStore.csGets whether the object store has a key generator.
public bool AutoIncrement { get; }IndexNames
IdbObjectStore.csGets the sorted names of the indexes of the object store.
public DomStringList IndexNames { get; }KeyPath
IdbObjectStore.csGets the key path of the object store: a string, an array of strings (the same array each time), or null.
public object? KeyPath { get; }Gets or sets the name of the object store (it can only be changed in an upgrade transaction).
public string Name { get; set; }Transaction
IdbObjectStore.csGets the transaction of the handle.
public IdbTransaction Transaction { get; }Methods
| Name | Description |
|---|---|
| Add(object?, object?) | Adds a record, which fails when a record with the same key exists (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add). |
| Clear() | Deletes all the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-clear). |
| Count(object?) | Counts the records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-count). |
| CreateIndex(string, object?, IdbIndexParameters?) | Creates an index in an upgrade transaction (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex). |
| Delete(object?) | Deletes the records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-delete). |
| DeleteIndex(string) | Deletes an index in an upgrade transaction (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-deleteindex). |
| Get(object?) | Retrieves the value of the first record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-get). |
| GetAll(object?, uint?) | Retrieves the values of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getall). |
| GetAllKeys(object?, uint?) | Retrieves the keys of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallkeys). |
| GetAllRecords(IdbGetAllOptions?) | Retrieves the keys and the values of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallrecords). |
| GetKey(object?) | Retrieves the key of the first record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getkey). |
| Index(string) | Returns the handle of an index (the same handle for the same name) (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-index). |
| OpenCursor(object?, IdbCursorDirection) | Opens a cursor over the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-opencursor). |
| OpenKeyCursor(object?, IdbCursorDirection) | Opens a cursor over the keys of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-openkeycursor). |
| Put(object?, object?) | Adds or replaces a record (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put). |
Add(object?, object?)
IdbObjectStore.csAdds a record, which fails when a record with the same key exists (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add).
public IdbRequest Add(object? value, object? key = null)Parameters
Returns
See also
Clear()
IdbObjectStore.csDeletes all the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-clear).
public IdbRequest Clear()Count(object?)
IdbObjectStore.csCounts the records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-count).
public IdbRequest Count(object? query = null)CreateIndex(string, object?, IdbIndexParameters?)
IdbObjectStore.csCreates an index in an upgrade transaction (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex).
public IdbIndex CreateIndex(string name, object? keyPath, IdbIndexParameters? options = null)Delete(object?)
IdbObjectStore.csDeletes the records with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-delete).
public IdbRequest Delete(object? query)DeleteIndex(string)
IdbObjectStore.csDeletes an index in an upgrade transaction (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-deleteindex).
Get(object?)
IdbObjectStore.csRetrieves the value of the first record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-get).
public IdbRequest Get(object? query)GetAll(object?, uint?)
IdbObjectStore.csRetrieves the values of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getall).
public IdbRequest GetAll(object? queryOrOptions = null, uint? count = null)Parameters
Returns
See also
GetAllKeys(object?, uint?)
IdbObjectStore.csRetrieves the keys of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallkeys).
public IdbRequest GetAllKeys(object? queryOrOptions = null, uint? count = null)Parameters
Returns
See also
GetAllRecords(IdbGetAllOptions?)
IdbObjectStore.csRetrieves the keys and the values of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallrecords).
public IdbRequest GetAllRecords(IdbGetAllOptions? options = null)GetKey(object?)
IdbObjectStore.csRetrieves the key of the first record with a key or in a key range (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getkey).
public IdbRequest GetKey(object? query)Index(string)
IdbObjectStore.csReturns the handle of an index (the same handle for the same name) (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-index).
OpenCursor(object?, IdbCursorDirection)
IdbObjectStore.csOpens a cursor over the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-opencursor).
public IdbRequest OpenCursor(object? query = null, IdbCursorDirection direction = IdbCursorDirection.Next)OpenKeyCursor(object?, IdbCursorDirection)
IdbObjectStore.csOpens a cursor over the keys of the records (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-openkeycursor).
public IdbRequest OpenKeyCursor(object? query = null, IdbCursorDirection direction = IdbCursorDirection.Next)Put(object?, object?)
IdbObjectStore.csAdds or replaces a record (https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put).
public IdbRequest Put(object? value, object? key = null)