opfsdb / Exports / FileStoreStrategy
Name |
---|
K |
V |
-
SerializeStrategyAsync
<K
,V
>↳
FileStoreStrategy
• new FileStoreStrategy<K
, V
>(order
, root
, encoder
, indexName
, parent
, pageSize?
): FileStoreStrategy
<K
, V
>
Name |
---|
K |
V |
Name | Type | Default value |
---|---|---|
order |
number |
undefined |
root |
FileSystemDirectoryHandle |
undefined |
encoder |
IEncoder |
undefined |
indexName |
string |
undefined |
parent |
OPFSDB <any > |
undefined |
pageSize |
number |
65536 |
FileStoreStrategy
<K
, V
>
SerializeStrategyAsync<K, V>.constructor
• Private
encoder: IEncoder
• head: SerializeStrategyHead
SerializeStrategyAsync.head
node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/base/SerializeStrategy.d.ts:11
• Private
indexName: string
• Private
Optional
lastHead: SerializeStrategyHead
• Readonly
order: number
SerializeStrategyAsync.order
node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/base/SerializeStrategy.d.ts:10
• Private
pageSize: number
= 65536
• Private
parent: OPFSDB
<any
>
• Private
root: FileSystemDirectoryHandle
• Private
Optional
writeHeadTimeout: Timeout
▸ autoIncrement(key
, defaultValue
): Promise
<number
>
Name | Type |
---|---|
key |
string |
defaultValue |
number |
Promise
<number
>
SerializeStrategyAsync.autoIncrement
node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:12
▸ getHeadData(key
, defaultValue
): Promise
<Json
>
Name | Type |
---|---|
key |
string |
defaultValue |
Json |
Promise
<Json
>
SerializeStrategyAsync.getHeadData
node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:10
▸ id(): Promise
<number
>
Promise
<number
>
SerializeStrategyAsync.id
▸ read(index?
): Promise
<BPTreeNode
<K
, V
>>
Name | Type | Default value |
---|---|---|
index |
number |
0 |
Promise
<BPTreeNode
<K
, V
>>
SerializeStrategyAsync.read
▸ readHead(): Promise
<null
| SerializeStrategyHead
>
Promise
<null
| SerializeStrategyHead
>
SerializeStrategyAsync.readHead
▸ setHeadData(key
, data
): Promise
<void
>
Name | Type |
---|---|
key |
string |
data |
Json |
Promise
<void
>
SerializeStrategyAsync.setHeadData
node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:11
▸ write(index?
, node
): Promise
<void
>
Name | Type | Default value |
---|---|---|
index |
number |
0 |
node |
BPTreeNode <K , V > |
undefined |
Promise
<void
>
SerializeStrategyAsync.write
▸ writeHead(head
): Promise
<void
>
Name | Type |
---|---|
head |
SerializeStrategyHead |
Promise
<void
>
SerializeStrategyAsync.writeHead