Migration API: DatabaseBuilder
createStore()
Summary
tsclass DatabaseBuilder { createStore(name: string): StoreBuilder; createStore(name: string, autoIncrement: AutoIncrement): StoreBuilder; createStore(name: string, keyPath: string | string[]): StoreBuilder; }Creates a new object store with the specified name and options. If
autoIncrementorkeyPath, the store will have a manually specified key.Parameters
name— The name to give the new store.autoIncrement— Indicates to use an auto-increment primary key.keyPath— The path or paths to the primary key within the records.
Returns
Returns a StoreBuilder for further modify the store.
alterStore()
Summary
tsclass DatabaseBuilder { alterStore(name: string): StoreBuilder; }Gets a StoreBuilder to modify an existing object store.
Parameters
name— The name of the object store to alter.
Returns
Returns a StoreBuilder to modify the store.
dropStore()
Summary
tsclass DatabaseBuilder { dropStore(name: string): void; }Deletes an existing object store.
Parameters
name— The name of the object store to delete.