Skip to content
On this page

Home > @taiyuuki/utils > DB > (constructor)

DB.(constructor)

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

这是 IndexedDB 数据库的构造函数,用于创建对象存储。

Signature:

typescript
constructor(dbName: string, storeName: string, version?: number);
constructor(dbName: string, storeName: string, version?: number);

Parameters

ParameterTypeDescription
dbNamestring将创建或访问的 IndexedDB 数据库的名称。
storeNamestring将在 IndexedDB 数据库中创建或访问的存储对象的名称。
versionnumber(Optional) 存储对象的版本。

Released under the MIT License.