-<nav><ul><li><a href="/">TinyBase</a></li><li><a href="/guides/">Guides</a></li><li><a href="/guides/schemas-and-persistence/">Schemas And Persistence</a></li></ul></nav><section class="s1" id="/guides/schemas-and-persistence/" data-id="SAP"><h1>Schemas And Persistence</h1><p>These guides discuss how to set up a <a href="/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> or <a href="/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> on a <a href="/api/store/interfaces/store/store/"><code>Store</code></a> so that certain structures of data are assured - and how to load and save data to a <a href="/api/store/interfaces/store/store/"><code>Store</code></a> from a persistence layer.</p><p>See also the <a href="/demos/countries/">Countries</a> demo, the <a href="/demos/todo-app/">Todo App</a> demos, and the <a href="/demos/drawing/">Drawing</a> demo.</p><section class="s2" id="/guides/schemas-and-persistence/using-schemas/" data-id="US"><h2><a href="/guides/schemas-and-persistence/using-schemas/">Using Schemas</a></h2><p>Schemas are a simple declarative way to say what data you would like to store.</p></section><section class="s2" id="/guides/schemas-and-persistence/schema-based-typing/" data-id="SBT"><h2><a href="/guides/schemas-and-persistence/schema-based-typing/">Schema-Based Typing</a></h2><p>You can use type definitions that infer API types from the schemas you apply, providing a powerful way to improve your develope experience when you know the shape of the data being stored.</p></section><section class="s2" id="/guides/schemas-and-persistence/mutating-data-with-listeners/" data-id="MDWL"><h2><a href="/guides/schemas-and-persistence/mutating-data-with-listeners/">Mutating Data With Listeners</a></h2><p>Although listeners are normally prevented from updating data, there are times when you may want to - such as when you are programmatically checking your data as it gets updated.</p></section><section class="s2" id="/guides/schemas-and-persistence/persisting-data/" data-id="PD"><h2><a href="/guides/schemas-and-persistence/persisting-data/">Persisting Data</a></h2><p>The persister module lets you save and load <a href="/api/store/interfaces/store/store/"><code>Store</code></a> data to and from different locations, or underlying storage types.</p></section><section class="s2" id="/guides/schemas-and-persistence/custom-persistence/" data-id="CP"><h2><a href="/guides/schemas-and-persistence/custom-persistence/">Custom Persistence</a></h2><p>When you want to load and save <a href="/api/store/interfaces/store/store/"><code>Store</code></a> data in unusual or custom ways, you can used the <a href="/api/persisters/functions/creation/createcustompersister/"><code>createCustomPersister</code></a> function to do so in any way you wish.</p></section><section class="s2" id="/guides/schemas-and-persistence/database-persistence/" data-id="DP"><h2><a href="/guides/schemas-and-persistence/database-persistence/">Database Persistence</a></h2><p>Since v4.0, there are various options for persisting <a href="/api/store/interfaces/store/store/"><code>Store</code></a> data to and from SQLite databases, via a range of third-party modules.</p></section><section class="s2" id="/guides/schemas-and-persistence/synchronizing-data/" data-id="SD"><h2><a href="/guides/schemas-and-persistence/synchronizing-data/">Synchronizing Data</a></h2><p>Some persister modules let you save and load <a href="/api/store/interfaces/store/store/"><code>Store</code></a> data to underlying storage types that can provide synchronization, local-first reconciliation, and CRDTs.</p></section></section>
0 commit comments