summaryrefslogtreecommitdiff
path: root/docs/classes/_database_.database.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/classes/_database_.database.html')
-rw-r--r--docs/classes/_database_.database.html173
1 files changed, 161 insertions, 12 deletions
diff --git a/docs/classes/_database_.database.html b/docs/classes/_database_.database.html
index f0acbcf..2a3a45f 100644
--- a/docs/classes/_database_.database.html
+++ b/docs/classes/_database_.database.html
@@ -109,6 +109,7 @@
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#buff" class="tsd-kind-icon">buff</a></li>
+ <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#changehandlers" class="tsd-kind-icon">change<wbr>Handlers</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#ctx" class="tsd-kind-icon">ctx</a></li>
</ul>
</section>
@@ -121,8 +122,11 @@
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_database_.database.html#read" class="tsd-kind-icon">read</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_database_.database.html#remove" class="tsd-kind-icon">remove</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#resolve" class="tsd-kind-icon">resolve</a></li>
+ <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#runchangehandlers" class="tsd-kind-icon">run<wbr>Change<wbr>Handlers</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#serialize" class="tsd-kind-icon">serialize</a></li>
+ <li class="tsd-kind-method tsd-parent-kind-class"><a href="_database_.database.html#subscribe" class="tsd-kind-icon">subscribe</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_database_.database.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li>
+ <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="_database_.database.html#unsubscribe" class="tsd-kind-icon">unsubscribe</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_database_.database.html#write" class="tsd-kind-icon">write</a></li>
</ul>
</section>
@@ -141,7 +145,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L40">database.ts:40</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L63">database.ts:63</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -163,9 +167,31 @@
<div class="tsd-signature tsd-kind-icon">buff<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L40">database.ts:40</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L57">database.ts:57</a></li>
</ul>
</aside>
+ <div class="tsd-comment tsd-typography">
+ <div class="lead">
+ <p>In memory buffer to read/write data</p>
+ </div>
+ </div>
+ </section>
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
+ <a name="changehandlers" class="tsd-anchor"></a>
+ <h3><span class="tsd-flag ts-flagPrivate">Private</span> change<wbr>Handlers</h3>
+ <div class="tsd-signature tsd-kind-icon">change<wbr>Handlers<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_change_handlers_model_.changehandlers.html" class="tsd-signature-type">ChangeHandlers</a></div>
+ <aside class="tsd-sources">
+ <ul>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L63">database.ts:63</a></li>
+ </ul>
+ </aside>
+ <div class="tsd-comment tsd-typography">
+ <div class="lead">
+ <p>An array of callback functions that are alerted
+ when the database changes (mostly want to use this
+ for some type of pubsub functionality on-top)</p>
+ </div>
+ </div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="ctx" class="tsd-anchor"></a>
@@ -173,7 +199,7 @@
<div class="tsd-signature tsd-kind-icon">ctx<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_context_model_.context.html" class="tsd-signature-type">Context</a></div>
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L41">database.ts:41</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L64">database.ts:64</a></li>
</ul>
</aside>
</section>
@@ -191,7 +217,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_database_model_.databaseinterface.html">DatabaseInterface</a>.<a href="../interfaces/_database_model_.databaseinterface.html#flush">flush</a></p>
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L78">database.ts:78</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L125">database.ts:125</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@@ -208,7 +234,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L144">database.ts:144</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L202">database.ts:202</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
@@ -226,7 +252,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_database_model_.databaseinterface.html">DatabaseInterface</a>.<a href="../interfaces/_database_model_.databaseinterface.html#init">init</a></p>
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L43">database.ts:43</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L66">database.ts:66</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@@ -244,7 +270,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_database_model_.databaseinterface.html">DatabaseInterface</a>.<a href="../interfaces/_database_model_.databaseinterface.html#read">read</a></p>
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L56">database.ts:56</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L79">database.ts:79</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -268,7 +294,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_database_model_.databaseinterface.html">DatabaseInterface</a>.<a href="../interfaces/_database_model_.databaseinterface.html#remove">remove</a></p>
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L74">database.ts:74</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L121">database.ts:121</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -291,7 +317,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L99">database.ts:99</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L146">database.ts:146</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@@ -323,6 +349,32 @@
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <a name="runchangehandlers" class="tsd-anchor"></a>
+ <h3><span class="tsd-flag ts-flagPrivate">Private</span> run<wbr>Change<wbr>Handlers</h3>
+ <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <li class="tsd-signature tsd-kind-icon">run<wbr>Change<wbr>Handlers<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, change<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
+ </ul>
+ <ul class="tsd-descriptions">
+ <li class="tsd-description">
+ <aside class="tsd-sources">
+ <ul>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L99">database.ts:99</a></li>
+ </ul>
+ </aside>
+ <h4 class="tsd-parameters-title">Parameters</h4>
+ <ul class="tsd-parameters">
+ <li>
+ <h5>path: <span class="tsd-signature-type">string</span></h5>
+ </li>
+ <li>
+ <h5>change: <span class="tsd-signature-type">any</span></h5>
+ </li>
+ </ul>
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
+ </li>
+ </ul>
+ </section>
+ <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
<a name="serialize" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> serialize</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
@@ -332,7 +384,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L139">database.ts:139</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L197">database.ts:197</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@@ -349,6 +401,62 @@
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
+ <a name="subscribe" class="tsd-anchor"></a>
+ <h3>subscribe</h3>
+ <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
+ <li class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></li>
+ </ul>
+ <ul class="tsd-descriptions">
+ <li class="tsd-description">
+ <aside class="tsd-sources">
+ <ul>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L108">database.ts:108</a></li>
+ </ul>
+ </aside>
+ <h4 class="tsd-parameters-title">Parameters</h4>
+ <ul class="tsd-parameters">
+ <li>
+ <h5>path: <span class="tsd-signature-type">string</span></h5>
+ </li>
+ <li>
+ <h5>callback: <span class="tsd-signature-type">function</span></h5>
+ <ul class="tsd-parameters">
+ <li class="tsd-parameter-siganture">
+ <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
+ <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li>
+ </ul>
+ <ul class="tsd-descriptions">
+ <li class="tsd-description">
+ <h4 class="tsd-parameters-title">Parameters</h4>
+ <ul class="tsd-parameters">
+ <li>
+ <h5>e: <span class="tsd-signature-type">any</span></h5>
+ </li>
+ </ul>
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">function</span></h4>
+ <ul class="tsd-parameters">
+ <li class="tsd-parameter-siganture">
+ <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
+ <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
+ </ul>
+ <ul class="tsd-descriptions">
+ <li class="tsd-description">
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </section>
+ <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="tostring" class="tsd-anchor"></a>
<h3>to<wbr>String</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
@@ -359,13 +467,36 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_database_model_.databaseinterface.html">DatabaseInterface</a>.<a href="../interfaces/_database_model_.databaseinterface.html#tostring">toString</a></p>
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L83">database.ts:83</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L130">database.ts:130</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
+ <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <a name="unsubscribe" class="tsd-anchor"></a>
+ <h3><span class="tsd-flag ts-flagPrivate">Private</span> unsubscribe</h3>
+ <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <li class="tsd-signature tsd-kind-icon">unsubscribe<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
+ </ul>
+ <ul class="tsd-descriptions">
+ <li class="tsd-description">
+ <aside class="tsd-sources">
+ <ul>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L117">database.ts:117</a></li>
+ </ul>
+ </aside>
+ <h4 class="tsd-parameters-title">Parameters</h4>
+ <ul class="tsd-parameters">
+ <li>
+ <h5>key: <span class="tsd-signature-type">string</span></h5>
+ </li>
+ </ul>
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
+ </li>
+ </ul>
+ </section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="write" class="tsd-anchor"></a>
<h3>write</h3>
@@ -376,7 +507,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
- <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/d590774/src/database.ts#L63">database.ts:63</a></li>
+ <li>Defined in <a href="https://github.com/nvandoorn/naive/blob/638ff46/src/database.ts#L86">database.ts:86</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -401,6 +532,9 @@
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-external-module">
+ <a href="../modules/_change_handlers_model_.html">"change-<wbr>handlers.model"</a>
+ </li>
+ <li class=" tsd-kind-external-module">
<a href="../modules/_context_model_.html">"context.model"</a>
</li>
<li class="current tsd-kind-external-module">
@@ -434,6 +568,9 @@
<a href="_database_.database.html#buff" class="tsd-kind-icon">buff</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
+ <a href="_database_.database.html#changehandlers" class="tsd-kind-icon">change<wbr>Handlers</a>
+ </li>
+ <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="_database_.database.html#ctx" class="tsd-kind-icon">ctx</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
@@ -455,11 +592,20 @@
<a href="_database_.database.html#resolve" class="tsd-kind-icon">resolve</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <a href="_database_.database.html#runchangehandlers" class="tsd-kind-icon">run<wbr>Change<wbr>Handlers</a>
+ </li>
+ <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
<a href="_database_.database.html#serialize" class="tsd-kind-icon">serialize</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
+ <a href="_database_.database.html#subscribe" class="tsd-kind-icon">subscribe</a>
+ </li>
+ <li class=" tsd-kind-method tsd-parent-kind-class">
<a href="_database_.database.html#tostring" class="tsd-kind-icon">to<wbr>String</a>
</li>
+ <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
+ <a href="_database_.database.html#unsubscribe" class="tsd-kind-icon">unsubscribe</a>
+ </li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="_database_.database.html#write" class="tsd-kind-icon">write</a>
</li>
@@ -474,6 +620,9 @@
<a href="../modules/_database_.html#write" class="tsd-kind-icon">write</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
+ <a href="../modules/_database_.html#ischildormatch" class="tsd-kind-icon">is<wbr>Child<wbr>OrMatch</a>
+ </li>
+ <li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a href="../modules/_database_.html#isrootnode" class="tsd-kind-icon">is<wbr>Root<wbr>Node</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">