Skip to content

Commit c053092

Browse files
committed
v4.0.2
1 parent 784f7db commit c053092

File tree

764 files changed

+766
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

764 files changed

+766
-766
lines changed

coverage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"tests":3093,"assertions":14355,"lines":{"total":1815,"covered":1815,"skipped":0,"pct":100},"statements":{"total":1957,"covered":1957,"skipped":0,"pct":100},"functions":{"total":776,"covered":776,"skipped":0,"pct":100},"branches":{"total":669,"covered":669,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
1+
{"tests":3138,"assertions":14445,"lines":{"total":1815,"covered":1815,"skipped":0,"pct":100},"statements":{"total":1957,"covered":1957,"skipped":0,"pct":100},"functions":{"total":776,"covered":776,"skipped":0,"pct":100},"branches":{"total":669,"covered":669,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}

docs/api/all.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5717,7 +5717,7 @@
57175717
rowIdColumnName<span class="operator">?</span><span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">;</span>
57185718
deleteEmptyColumns<span class="operator">?</span><span class="operator">:</span> <span class="builtin">boolean</span><span class="punctuation">;</span>
57195719
deleteEmptyTable<span class="operator">?</span><span class="operator">:</span> <span class="builtin">boolean</span><span class="punctuation">;</span>
5720-
<span class="punctuation">}</span> <span class="operator">|</span> <span class="builtin">string</span><span class="punctuation">}</span></code></pre><p>It is an object where each key is an <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of a <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, and the value is a child configuration object for how that <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> should be saved out to the database. The properties of the child configuration object are:</p><div class="table"><table><thead><tr><th></th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tableName</code></td><td>string</td><td>The name of the database table out to which the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> should be saved.</td></tr><tr><td><code>rowIdColumnName?</code></td><td>string</td><td>The optional name of the column in the database table that will be used to save the <a href="#/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="#/api/common/type-aliases/identity/ids/"><code>Ids</code></a> from the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, defaulting to &#x27;_id&#x27;.</td></tr><tr><td><code>deleteEmptyColumns?</code></td><td>boolean</td><td>Whether columns in the database table will be removed if they are empty in the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, defaulting to false.</td></tr><tr><td><code>deleteEmptyTable?</code></td><td>boolean</td><td>Whether tables in the database will be removed if the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> is empty, defaulting to false.</td></tr></tbody></table></div><p>As a shortcut, if you do not need to specify a custom <code>rowIdColumnName</code>, or enable the <code>deleteEmptyColumns</code> or <code>deleteEmptyTable</code> settings, you can simply provide the name of the database table instead of the whole object.</p><p>The &#x27;Dpc&#x27; prefix indicates that this type is used within the <a href="#/api/persisters/type-aliases/configuration/databasepersisterconfig/"><code>DatabasePersisterConfig</code></a> type.</p><section class="s6"><h6>Example</h6><p>When applied to a database <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a>, this <a href="#/api/persisters/type-aliases/configuration/databasepersisterconfig/"><code>DatabasePersisterConfig</code></a> will save the data of two <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/tables/"><code>Tables</code></a> (called &#x27;pets&#x27; and &#x27;species&#x27;) into two database tables (called &#x27;petsInDb&#x27; and &#x27;speciesInDb&#x27;). One has a column for the <a href="#/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> called &#x27;id&#x27; and will delete columns and the whole table if empty, the other defaults to &#x27;_id&#x27; and will not delete columns or the whole table if empty.</p><pre><code><span class="keyword">const</span> <span class="literal-property">databasePersisterConfig</span><span class="operator">:</span> DatabasePersisterConfig <span class="operator">=</span> <span class="punctuation">{</span>
5720+
<span class="punctuation">}</span> <span class="operator">|</span> <span class="builtin">string</span><span class="punctuation">}</span></code></pre><p>It is an object where each key is an <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of a <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, and the value is a child configuration object for how that <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> should be saved out to the database. The properties of the child configuration object are:</p><div class="table"><table><thead><tr><th></th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tableName</code></td><td>string</td><td>The name of the database table out to which the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> should be saved.</td></tr><tr><td><code>rowIdColumnName?</code></td><td>string</td><td>The optional name of the column in the database table that will be used to save the <a href="#/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="#/api/common/type-aliases/identity/ids/"><code>Ids</code></a> from the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, defaulting to &#x27;_id&#x27;.</td></tr><tr><td><code>deleteEmptyColumns?</code></td><td>boolean</td><td>Whether columns in the database table will be removed if they are empty in the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a>, defaulting to false.</td></tr><tr><td><code>deleteEmptyTable?</code></td><td>boolean</td><td>Whether tables in the database will be removed if the <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> is empty, defaulting to false.</td></tr></tbody></table></div><p>As a shortcut, if you do not need to specify a custom <code>rowIdColumnName</code>, or enable the <code>deleteEmptyColumns</code> or <code>deleteEmptyTable</code> settings, you can simply provide the name of the database table instead of the whole object.</p><p><code>deleteEmptyColumns</code> and <code>deleteEmptyTable</code> only have a guaranteed effect when an explicit call is made to the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a>&#x27;s <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method. Columns and tables will not necessarily be removed when the <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a> is incrementally &#x27;autoSaving&#x27;, due to performance reasons. If you want to be sure that your database table matches a <a href="#/">TinyBase</a> <a href="#/api/store/type-aliases/store/table/"><code>Table</code></a> without any extraneous columns, simply call the <a href="#/api/persisters/interfaces/persister/persister/methods/save/save/"><code>save</code></a> method at an idle moment.</p><p>The &#x27;Dpc&#x27; prefix indicates that this type is used within the <a href="#/api/persisters/type-aliases/configuration/databasepersisterconfig/"><code>DatabasePersisterConfig</code></a> type.</p><section class="s6"><h6>Example</h6><p>When applied to a database <a href="#/api/persisters/interfaces/persister/persister/"><code>Persister</code></a>, this <a href="#/api/persisters/type-aliases/configuration/databasepersisterconfig/"><code>DatabasePersisterConfig</code></a> will save the data of two <a href="#/api/store/interfaces/store/store/"><code>Store</code></a> <a href="#/api/store/type-aliases/store/tables/"><code>Tables</code></a> (called &#x27;pets&#x27; and &#x27;species&#x27;) into two database tables (called &#x27;petsInDb&#x27; and &#x27;speciesInDb&#x27;). One has a column for the <a href="#/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> called &#x27;id&#x27; and will delete columns and the whole table if empty, the other defaults to &#x27;_id&#x27; and will not delete columns or the whole table if empty.</p><pre><code><span class="keyword">const</span> <span class="literal-property">databasePersisterConfig</span><span class="operator">:</span> DatabasePersisterConfig <span class="operator">=</span> <span class="punctuation">{</span>
57215721
<span class="literal-property">mode</span><span class="operator">:</span> <span class="string">'tabular'</span><span class="punctuation">,</span>
57225722
<span class="literal-property">tables</span><span class="operator">:</span> <span class="punctuation">{</span>
57235723
<span class="literal-property">save</span><span class="operator">:</span> <span class="punctuation">{</span>
@@ -11737,4 +11737,4 @@
1173711737
checkpointId<span class="operator">:</span> <span class="type"><a href="#/api/common/type-aliases/identity/id/">Id</a></span><span class="punctuation">;</span>
1173811738
checkpoints<span class="operator">?</span><span class="operator">:</span> <span class="type"><a href="#/api/ui-react/type-aliases/identity/checkpointsorcheckpointsid/">CheckpointsOrCheckpointsId</a></span><span class="punctuation">;</span>
1173911739
debugIds<span class="operator">?</span><span class="operator">:</span> <span class="builtin">boolean</span><span class="punctuation">;</span>
11740-
<span class="punctuation">}</span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>checkpointId</code></th><td><code><span class="type"><a href="#/api/common/type-aliases/identity/id/">Id</a></span></code></td><td><p>The <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of the checkpoint in the <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object.</p></td></tr><tr><th><code>checkpoints<span class="operator">?</span></code></th><td><code><span class="type"><a href="#/api/ui-react/type-aliases/identity/checkpointsorcheckpointsid/">CheckpointsOrCheckpointsId</a></span></code></td><td><p>The <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object to be accessed: omit for the default context <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object, provide an <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> for a named context <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object, or provide an explicit reference.</p></td></tr><tr><th><code>debugIds<span class="operator">?</span></code></th><td><code><span class="builtin">boolean</span></code></td><td><p>Whether the component should also render the <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of the checkpoint to assist with debugging.</p></td></tr></table></div></section></section></section></section></section></article><aside></aside></main><footer><nav><a id="tw" href="https://twitter.com/tinybasejs" target="_blank">Twitter</a><a id="fb" href="https://facebook.com/tinybasejs" target="_blank">Facebook</a></nav><nav><a href="/">TinyBase 4.0.1</a> © 2021- All Rights Reserved</nav></footer></body><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ"></script><script>window.dataLayer=window.dataLayer||[];function g(){dataLayer.push(arguments);}g('js',new Date());g('config','G-D1MGR8VRWJ');</script></html>
11740+
<span class="punctuation">}</span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>checkpointId</code></th><td><code><span class="type"><a href="#/api/common/type-aliases/identity/id/">Id</a></span></code></td><td><p>The <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of the checkpoint in the <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object.</p></td></tr><tr><th><code>checkpoints<span class="operator">?</span></code></th><td><code><span class="type"><a href="#/api/ui-react/type-aliases/identity/checkpointsorcheckpointsid/">CheckpointsOrCheckpointsId</a></span></code></td><td><p>The <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object to be accessed: omit for the default context <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object, provide an <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> for a named context <a href="#/api/checkpoints/interfaces/checkpoints/checkpoints/"><code>Checkpoints</code></a> object, or provide an explicit reference.</p></td></tr><tr><th><code>debugIds<span class="operator">?</span></code></th><td><code><span class="builtin">boolean</span></code></td><td><p>Whether the component should also render the <a href="#/api/common/type-aliases/identity/id/"><code>Id</code></a> of the checkpoint to assist with debugging.</p></td></tr></table></div></section></section></section></section></section></article><aside></aside></main><footer><nav><a id="tw" href="https://twitter.com/tinybasejs" target="_blank">Twitter</a><a id="fb" href="https://facebook.com/tinybasejs" target="_blank">Facebook</a></nav><nav><a href="/">TinyBase 4.0.2</a> © 2021- All Rights Reserved</nav></footer></body><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ"></script><script>window.dataLayer=window.dataLayer||[];function g(){dataLayer.push(arguments);}g('js',new Date());g('config','G-D1MGR8VRWJ');</script></html>

docs/api/checkpoints/functions/creation/createcheckpoints/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
<span class="keyword">const</span> checkpoints2 <span class="operator">=</span> <span class="function"><a href="/api/checkpoints/functions/creation/createcheckpoints/">createCheckpoints</a></span><span class="punctuation">(</span>store<span class="punctuation">)</span><span class="punctuation">;</span>
88
console<span class="punctuation">.</span><span class="function">log</span><span class="punctuation">(</span>checkpoints1 <span class="operator">===</span> checkpoints2<span class="punctuation">)</span><span class="punctuation">;</span>
99
<span class="comment">// -> true</span>
10-
</code></pre></section></section></article><aside></aside></main><footer><nav><a id="tw" href="https://twitter.com/tinybasejs" target="_blank">Twitter</a><a id="fb" href="https://facebook.com/tinybasejs" target="_blank">Facebook</a></nav><nav><a href="/">TinyBase 4.0.1</a> © 2021- All Rights Reserved</nav></footer></body><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ"></script><script>window.dataLayer=window.dataLayer||[];function g(){dataLayer.push(arguments);}g('js',new Date());g('config','G-D1MGR8VRWJ');</script></html>
10+
</code></pre></section></section></article><aside></aside></main><footer><nav><a id="tw" href="https://twitter.com/tinybasejs" target="_blank">Twitter</a><a id="fb" href="https://facebook.com/tinybasejs" target="_blank">Facebook</a></nav><nav><a href="/">TinyBase 4.0.2</a> © 2021- All Rights Reserved</nav></footer></body><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ"></script><script>window.dataLayer=window.dataLayer||[];function g(){dataLayer.push(arguments);}g('js',new Date());g('config','G-D1MGR8VRWJ');</script></html>

0 commit comments

Comments
 (0)