TinyBase logoTinyBase

delSchema

The delSchema method lets you remove both the TablesSchema and ValuesSchema of the Store.

delSchema(): Store
returnsStore

A reference to the Store.

Prior to v3.0, this method removed the TablesSchema only.

Example

This example removes the TablesSchema and ValuesSchema of a Store.

const store = createStore()
  .setTablesSchema({
    pets: {species: {type: 'string'}},
  })
  .setValuesSchema({
    sold: {type: 'boolean', default: false},
  });
store.delSchema();
console.log(store.getSchemaJson());
// -> '[{},{}]'

Since

v3.0.0