delSchema
The delSchema method lets you remove both the TablesSchema and ValuesSchema of the Store.
delSchema(): this| returns | this | A reference to the |
|---|
Prior to v3.0, this method removed the TablesSchema only.
Example
This example removes the TablesSchema and ValuesSchema of a Store.
import {createStore} from 'tinybase';
const store = createStore()
.setTablesSchema({
pets: {species: {type: 'string'}},
})
.setValuesSchema({
sold: {type: 'boolean', default: false},
});
store.delSchema();
console.log(store.getSchemaJson());
// -> '[{},{}]'
Since
v3.0.0