Skip to content

Latest commit

 

History

History
363 lines (204 loc) · 6.55 KB

FileStoreStrategy.md

File metadata and controls

363 lines (204 loc) · 6.55 KB

opfsdb / Exports / FileStoreStrategy

Class: FileStoreStrategy<K, V>

Type parameters

Name
K
V

Hierarchy

  • SerializeStrategyAsync<K, V>

    FileStoreStrategy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new FileStoreStrategy<K, V>(order, root, encoder, indexName, parent, pageSize?): FileStoreStrategy<K, V>

Type parameters

Name
K
V

Parameters

Name Type Default value
order number undefined
root FileSystemDirectoryHandle undefined
encoder IEncoder undefined
indexName string undefined
parent OPFSDB<any> undefined
pageSize number 65536

Returns

FileStoreStrategy<K, V>

Overrides

SerializeStrategyAsync&lt;K, V&gt;.constructor

Defined in

lib/Strategy.ts:9

Properties

encoder

Private encoder: IEncoder

Defined in

lib/Strategy.ts:12


head

head: SerializeStrategyHead

Inherited from

SerializeStrategyAsync.head

Defined in

node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/base/SerializeStrategy.d.ts:11


indexName

Private indexName: string

Defined in

lib/Strategy.ts:13


lastHead

Private Optional lastHead: SerializeStrategyHead

Defined in

lib/Strategy.ts:6


order

Readonly order: number

Inherited from

SerializeStrategyAsync.order

Defined in

node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/base/SerializeStrategy.d.ts:10


pageSize

Private pageSize: number = 65536

Defined in

lib/Strategy.ts:15


parent

Private parent: OPFSDB<any>

Defined in

lib/Strategy.ts:14


root

Private root: FileSystemDirectoryHandle

Defined in

lib/Strategy.ts:11


writeHeadTimeout

Private Optional writeHeadTimeout: Timeout

Defined in

lib/Strategy.ts:7

Methods

autoIncrement

autoIncrement(key, defaultValue): Promise<number>

Parameters

Name Type
key string
defaultValue number

Returns

Promise<number>

Inherited from

SerializeStrategyAsync.autoIncrement

Defined in

node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:12


getHeadData

getHeadData(key, defaultValue): Promise<Json>

Parameters

Name Type
key string
defaultValue Json

Returns

Promise<Json>

Inherited from

SerializeStrategyAsync.getHeadData

Defined in

node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:10


id

id(): Promise<number>

Returns

Promise<number>

Overrides

SerializeStrategyAsync.id

Defined in

lib/Strategy.ts:20


read

read(index?): Promise<BPTreeNode<K, V>>

Parameters

Name Type Default value
index number 0

Returns

Promise<BPTreeNode<K, V>>

Overrides

SerializeStrategyAsync.read

Defined in

lib/Strategy.ts:24


readHead

readHead(): Promise<null | SerializeStrategyHead>

Returns

Promise<null | SerializeStrategyHead>

Overrides

SerializeStrategyAsync.readHead

Defined in

lib/Strategy.ts:33


setHeadData

setHeadData(key, data): Promise<void>

Parameters

Name Type
key string
data Json

Returns

Promise<void>

Inherited from

SerializeStrategyAsync.setHeadData

Defined in

node_modules/.pnpm/serializable-bptree@3.2.2/node_modules/serializable-bptree/dist/typings/SerializeStrategyAsync.d.ts:11


write

write(index?, node): Promise<void>

Parameters

Name Type Default value
index number 0
node BPTreeNode<K, V> undefined

Returns

Promise<void>

Overrides

SerializeStrategyAsync.write

Defined in

lib/Strategy.ts:29


writeHead

writeHead(head): Promise<void>

Parameters

Name Type
head SerializeStrategyHead

Returns

Promise<void>

Overrides

SerializeStrategyAsync.writeHead

Defined in

lib/Strategy.ts:42