@atala/prism-wallet-sdk / Exports / Store
Class: Store
Implements
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new Store(options
, collections?
): Store
Parameters
Name | Type |
---|---|
options | RxDatabaseCreator <any , any > |
collections? | CollectionList |
Returns
Defined in
Properties
_db
• Private
Optional
_db: RxDatabase
<CollectionsOfDatabase
, any
, any
>
Defined in
collections
• Private
Optional
Readonly
collections: CollectionList
Defined in
options
• Private
Readonly
options: RxDatabaseCreator
<any
, any
>
Defined in
Accessors
db
• get
db(): RxDatabase
<CollectionsOfDatabase
, any
, any
>
Returns
RxDatabase
<CollectionsOfDatabase
, any
, any
>
Defined in
Methods
cleanup
▸ cleanup(): Promise
<void
>
Use with caution, this will remove all entries from database
Returns
Promise
<void
>
Defined in
clear
▸ clear(): Promise
<void
>
Use with caution, this will remove all entries from database and then destroy the database itself.
Returns
Promise
<void
>
Defined in
delete
▸ delete(name
, uuid
): Promise
<void
>
Deleting a row in the Store
Parameters
Name | Type |
---|---|
name | string |
uuid | string |
Returns
Promise
<void
>
Implementation of
Defined in
getCollection
▸ getCollection(name
): RxCollection
<any
, , , >
Parameters
Name | Type |
---|---|
name | string |
Returns
RxCollection
<any
, , , >
Defined in
insert
▸ insert(name
, data
): Promise
<void
>
Persist new data in the Store.
Parameters
Name | Type | Description |
---|---|---|
name | string | table name |
data | any | object to save |
Returns
Promise
<void
>
Implementation of
Defined in
query
▸ query<T
>(name
, query?
): Promise
<any
>
Run a query to fetch data from the Store
Type parameters
Name | Type |
---|---|
T | extends Storable |