@ethereumjs/util / DB
Defined in: packages/util/src/db.ts:55
Minimal async key/value database interface used across EthereumJS.
TKey extends Uint8Array | string | number = Uint8Array
TValue extends Uint8Array | string | DBObject = Uint8Array
batch(
opStack):Promise<void>
Defined in: packages/util/src/db.ts:83
Performs a batch operation on db.
BatchDBOp<TKey, TValue>[]
A stack of levelup operations
Promise<void>
del(
key,opts?):Promise<void>
Defined in: packages/util/src/db.ts:77
Removes a raw value in the underlying db.
TKey
Promise<void>
get(
key,opts?):Promise<TValue|undefined>
Defined in: packages/util/src/db.ts:64
Retrieves a raw value from db.
TKey
Promise<TValue | undefined>
A Promise that resolves to Uint8Array if a value is found or undefined if no value is found.
open():
Promise<void>
Defined in: packages/util/src/db.ts:94
Opens the database – if applicable
Promise<void>
put(
key,val,opts?):Promise<void>
Defined in: packages/util/src/db.ts:71
Writes a value directly to db.
TKey
The key as a TValue
TValue
The value to be stored
Promise<void>
shallowCopy():
DB<TKey,TValue>
Defined in: packages/util/src/db.ts:89
Returns a copy of the DB instance, with a reference to the same underlying db instance.
DB<TKey, TValue>