Skip to content

Commit b8868a5

Browse files
committed
v9.0.0-beta.1
1 parent 47ba60d commit b8868a5

216 files changed

Lines changed: 833 additions & 717 deletions

File tree

Some content is hidden

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

‎coverage.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"tests":8620,"assertions":35861,"lines":{"total":4452,"covered":4452,"skipped":0,"pct":100},"statements":{"total":4833,"covered":4833,"skipped":0,"pct":100},"functions":{"total":2183,"covered":2183,"skipped":0,"pct":100},"branches":{"total":1359,"covered":1359,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
1+
{"tests":8634,"assertions":35919,"lines":{"total":4461,"covered":4461,"skipped":0,"pct":100},"statements":{"total":4842,"covered":4842,"skipped":0,"pct":100},"functions":{"total":2184,"covered":2184,"skipped":0,"pct":100},"branches":{"total":1371,"covered":1371,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}

‎docs/api/all.html‎

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

‎docs/api/mergeable-store/functions/creation/createmergeablestore/article.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@
6161
<span class="punctuation">{</span>
6262
<span class="literal-property">fido</span><span class="operator">:</span> <span class="punctuation">[</span>
6363
<span class="punctuation">{</span>
64-
<span class="literal-property">sold</span><span class="operator">:</span> <span class="punctuation">[</span><span class="boolean">false</span><span class="punctuation">,</span> <span class="string">'Nn1JUF----2FnHIC'</span><span class="punctuation">,</span> <span class="number">2603026204</span><span class="punctuation">]</span><span class="punctuation">,</span>
64+
<span class="literal-property">sold</span><span class="operator">:</span> <span class="punctuation">[</span><span class="boolean">false</span><span class="punctuation">,</span> <span class="string">''</span><span class="punctuation">,</span> <span class="number">3177411910</span><span class="punctuation">]</span><span class="punctuation">,</span>
6565
<span class="literal-property">species</span><span class="operator">:</span> <span class="punctuation">[</span><span class="string">'dog'</span><span class="punctuation">,</span> <span class="string">'Nn1JUF----1FnHIC'</span><span class="punctuation">,</span> <span class="number">2817056260</span><span class="punctuation">]</span><span class="punctuation">,</span>
6666
<span class="punctuation">}</span><span class="punctuation">,</span>
6767
<span class="string">''</span><span class="punctuation">,</span>
68-
<span class="number">2859424112</span><span class="punctuation">,</span>
68+
<span class="number">3078067457</span><span class="punctuation">,</span>
6969
<span class="punctuation">]</span><span class="punctuation">,</span>
7070
<span class="punctuation">}</span><span class="punctuation">,</span>
7171
<span class="string">''</span><span class="punctuation">,</span>
72-
<span class="number">1640515891</span><span class="punctuation">,</span>
72+
<span class="number">1137907280</span><span class="punctuation">,</span>
7373
<span class="punctuation">]</span><span class="punctuation">,</span>
7474
<span class="punctuation">}</span><span class="punctuation">,</span>
7575
<span class="string">''</span><span class="punctuation">,</span>
76-
<span class="number">2077041985</span><span class="punctuation">,</span>
76+
<span class="number">401719767</span><span class="punctuation">,</span>
7777
<span class="punctuation">]</span><span class="punctuation">,</span>
7878
<span class="punctuation">[</span><span class="punctuation">{</span><span class="punctuation">}</span><span class="punctuation">,</span> <span class="string">''</span><span class="punctuation">,</span> <span class="number">0</span><span class="punctuation">]</span><span class="punctuation">,</span>
7979
<span class="punctuation">]</span><span class="punctuation">;</span>

‎docs/api/mergeable-store/functions/creation/createmergeablestore/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@
6161
<span class="punctuation">{</span>
6262
<span class="literal-property">fido</span><span class="operator">:</span> <span class="punctuation">[</span>
6363
<span class="punctuation">{</span>
64-
<span class="literal-property">sold</span><span class="operator">:</span> <span class="punctuation">[</span><span class="boolean">false</span><span class="punctuation">,</span> <span class="string">'Nn1JUF----2FnHIC'</span><span class="punctuation">,</span> <span class="number">2603026204</span><span class="punctuation">]</span><span class="punctuation">,</span>
64+
<span class="literal-property">sold</span><span class="operator">:</span> <span class="punctuation">[</span><span class="boolean">false</span><span class="punctuation">,</span> <span class="string">''</span><span class="punctuation">,</span> <span class="number">3177411910</span><span class="punctuation">]</span><span class="punctuation">,</span>
6565
<span class="literal-property">species</span><span class="operator">:</span> <span class="punctuation">[</span><span class="string">'dog'</span><span class="punctuation">,</span> <span class="string">'Nn1JUF----1FnHIC'</span><span class="punctuation">,</span> <span class="number">2817056260</span><span class="punctuation">]</span><span class="punctuation">,</span>
6666
<span class="punctuation">}</span><span class="punctuation">,</span>
6767
<span class="string">''</span><span class="punctuation">,</span>
68-
<span class="number">2859424112</span><span class="punctuation">,</span>
68+
<span class="number">3078067457</span><span class="punctuation">,</span>
6969
<span class="punctuation">]</span><span class="punctuation">,</span>
7070
<span class="punctuation">}</span><span class="punctuation">,</span>
7171
<span class="string">''</span><span class="punctuation">,</span>
72-
<span class="number">1640515891</span><span class="punctuation">,</span>
72+
<span class="number">1137907280</span><span class="punctuation">,</span>
7373
<span class="punctuation">]</span><span class="punctuation">,</span>
7474
<span class="punctuation">}</span><span class="punctuation">,</span>
7575
<span class="string">''</span><span class="punctuation">,</span>
76-
<span class="number">2077041985</span><span class="punctuation">,</span>
76+
<span class="number">401719767</span><span class="punctuation">,</span>
7777
<span class="punctuation">]</span><span class="punctuation">,</span>
7878
<span class="punctuation">[</span><span class="punctuation">{</span><span class="punctuation">}</span><span class="punctuation">,</span> <span class="string">''</span><span class="punctuation">,</span> <span class="number">0</span><span class="punctuation">]</span><span class="punctuation">,</span>
7979
<span class="punctuation">]</span><span class="punctuation">;</span>

‎docs/api/persisters/functions/creation/createcustompersister/article.html‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎docs/api/persisters/functions/creation/createcustompersister/index.html‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎docs/api/queries/type-aliases/definition/select/article.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
asQuery<span class="operator">:</span> <span class="boolean">true</span><span class="punctuation">,</span>
66
joinedQueryId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">,</span>
77
joinedCellId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">,</span>
8-
<span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>asQuery</code></th><td><code><span class="boolean">true</span></code></td><td><p>A flag indicating that the next <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> is a query <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>.</p></td></tr><tr><th><code>joinedQueryId</code></th><td><code><span class="builtin">string</span></code></td><td><p>The <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> of the query result to fetch the value from. If the underlying query result was joined &#x27;as&#x27; a different <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>, that should instead be used.</p></td></tr><tr><th><code>joinedCellId</code></th><td><code><span class="builtin">string</span></code></td><td><p>The <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> of the <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> to fetch the value for.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></td><td><p></p><p>A <a href="/api/queries/type-aliases/definition/selectedas/"><code>SelectedAs</code></a> object so that the selected <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> can be optionally aliased.</p><p></p></td></tr></table></div><section class="s2"><h2>Since</h2><p>v8.3.0</p></section><hr><p>Calling this function with one callback parameter will indicate that the query should select a calculated value, based on one or more <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> values in the root <a href="/api/store/type-aliases/store/table/"><code>Table</code></a> or a joined <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>, or on the root <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>&#x27;s <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>.</p><pre><code><span class="punctuation">(</span><span class="function-variable">getCell</span><span class="operator">:</span> <span class="punctuation">(</span>getTableCell<span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/callback/gettablecell/">GetTableCell</a></span><span class="punctuation">,</span> rowId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">)</span> <span class="operator">=></span> <span class="type"><a href="/api/queries/type-aliases/result/resultcellorundefined/">ResultCellOrUndefined</a></span><span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>getCell</code></th><td><code><span class="punctuation">(</span>getTableCell<span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/callback/gettablecell/">GetTableCell</a></span><span class="punctuation">,</span> rowId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">)</span> <span class="operator">=></span> <span class="type"><a href="/api/queries/type-aliases/result/resultcellorundefined/">ResultCellOrUndefined</a></span></code></td><td><p>A callback that takes a <a href="/api/queries/type-aliases/callback/gettablecell/"><code>GetTableCell</code></a> function and the main <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>&#x27;s <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>. These can be used to programmatically create a calculated value from multiple <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> values and 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>.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></td><td><p></p><p>A <a href="/api/queries/type-aliases/definition/selectedas/"><code>SelectedAs</code></a> object so that the selected <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> can be optionally aliased.</p><p></p></td></tr></table></div><section class="s2"><h2>Since</h2><p>v2.0.0</p></section><p>The <code>Select</code> function is provided to the third <code>query</code> parameter of the <a href="/api/queries/interfaces/queries/queries/methods/configuration/setquerydefinition/"><code>setQueryDefinition</code></a> method. A query definition must call the <code>Select</code> function at least once, otherwise it will be meaningless and return no data.</p><section class="s2"><h2>Examples</h2><p>This example shows a query that selects two Cells from the main query <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createQueries<span class="punctuation">,</span> createStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
8+
<span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>asQuery</code></th><td><code><span class="boolean">true</span></code></td><td><p>A flag indicating that the next <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> is a query <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>.</p></td></tr><tr><th><code>joinedQueryId</code></th><td><code><span class="builtin">string</span></code></td><td><p>The <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> of the query result to fetch the value from. If the underlying query result was joined &#x27;as&#x27; a different <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>, that should instead be used.</p></td></tr><tr><th><code>joinedCellId</code></th><td><code><span class="builtin">string</span></code></td><td><p>The <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> of the <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> to fetch the value for.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></td><td><p></p><p>A <a href="/api/queries/type-aliases/definition/selectedas/"><code>SelectedAs</code></a> object so that the selected <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> can be optionally aliased.</p><p></p></td></tr></table></div><section class="s2"><h2>Since</h2><p>v8.3.0</p></section><hr><p>Calling this function with one callback parameter will indicate that the query should select a calculated value, based on one or more <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> values in the root <a href="/api/store/type-aliases/store/table/"><code>Table</code></a> or a joined <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>, or on the root <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>&#x27;s <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>.</p><pre><code><span class="punctuation">(</span><span class="function-variable">getCell</span><span class="operator">:</span> <span class="punctuation">(</span>getTableCell<span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/callback/gettablecell/">GetTableCell</a></span><span class="punctuation">,</span> rowId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">)</span> <span class="operator">=></span> <span class="type"><a href="/api/queries/type-aliases/result/resultcellorundefined/">ResultCellOrUndefined</a></span><span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>getCell</code></th><td><code><span class="punctuation">(</span>getTableCell<span class="operator">:</span> <span class="type"><a href="/api/queries/type-aliases/callback/gettablecell/">GetTableCell</a></span><span class="punctuation">,</span> rowId<span class="operator">:</span> <span class="builtin">string</span><span class="punctuation">)</span> <span class="operator">=></span> <span class="type"><a href="/api/queries/type-aliases/result/resultcellorundefined/">ResultCellOrUndefined</a></span></code></td><td><p>A callback that takes a <a href="/api/queries/type-aliases/callback/gettablecell/"><code>GetTableCell</code></a> function and the main <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>&#x27;s <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a>. These can be used to programmatically create a calculated value from multiple <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> values and 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>.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/queries/type-aliases/definition/selectedas/">SelectedAs</a></span></code></td><td><p></p><p>A <a href="/api/queries/type-aliases/definition/selectedas/"><code>SelectedAs</code></a> object so that the selected <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> can be optionally aliased.</p><p></p></td></tr></table></div><section class="s2"><h2>Since</h2><p>v2.0.0</p></section><p>The <code>Select</code> function is provided to the third <code>query</code> parameter of the <a href="/api/queries/interfaces/queries/queries/methods/configuration/setquerydefinition/"><code>setQueryDefinition</code></a> method. A query definition must call the <code>Select</code> function at least once, otherwise it will be meaningless and return no data.</p><p>A <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> will only appear in the <a href="/api/queries/type-aliases/result/resulttable/"><code>ResultTable</code></a> if at least one <code>Select</code> clause produces a defined value for it. If all selected Cells or calculated values resolve to <code>undefined</code>, no <a href="/api/queries/type-aliases/result/resultrow/"><code>ResultRow</code></a> is created for that <a href="/api/store/type-aliases/store/row/"><code>Row</code></a>.</p><section class="s2"><h2>Examples</h2><p>This example shows a query that selects two Cells from the main query <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>createQueries<span class="punctuation">,</span> createStore<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
99

1010
<span class="keyword">const</span> store <span class="operator">=</span> <span class="function"><a href="/api/the-essentials/creating-stores/createstore/">createStore</a></span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">.</span><span class="function"><a href="/api/mergeable-store/interfaces/mergeable/mergeablestore/methods/setter/settable/">setTable</a></span><span class="punctuation">(</span><span class="string">'pets'</span><span class="punctuation">,</span> <span class="punctuation">{</span>
1111
<span class="literal-property">fido</span><span class="operator">:</span> <span class="punctuation">{</span><span class="literal-property">species</span><span class="operator">:</span> <span class="string">'dog'</span><span class="punctuation">,</span> <span class="literal-property">color</span><span class="operator">:</span> <span class="string">'brown'</span><span class="punctuation">,</span> <span class="literal-property">legs</span><span class="operator">:</span> <span class="number">4</span><span class="punctuation">}</span><span class="punctuation">,</span>

0 commit comments

Comments
 (0)