mirror of
https://github.com/InsanusMokrassar/docs.git
synced 2026-11-14 07:52:56 +00:00
deploy: 68426c126d
This commit is contained in:
1 parent
87625064c3
commit
1c1602fd90
3 files changed
+92
-8
No files matched your search
@@ -333,6 +333,31 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#keyvalues">
|
||||
<span class="md-ellipsis">
|
||||
KeyValues
|
||||
</span>
|
||||
</a>
|
||||
<nav aria-label="KeyValues" class="md-nav">
|
||||
<ul class="md-nav__list">
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#readkeyvaluesrepo">
|
||||
<span class="md-ellipsis">
|
||||
ReadKeyValuesRepo
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#writekeyvaluesrepo">
|
||||
<span class="md-ellipsis">
|
||||
WriteKeyValuesRepo
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
@@ -897,6 +922,31 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#keyvalues">
|
||||
<span class="md-ellipsis">
|
||||
KeyValues
|
||||
</span>
|
||||
</a>
|
||||
<nav aria-label="KeyValues" class="md-nav">
|
||||
<ul class="md-nav__list">
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#readkeyvaluesrepo">
|
||||
<span class="md-ellipsis">
|
||||
ReadKeyValuesRepo
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="md-nav__item">
|
||||
<a class="md-nav__link" href="#writekeyvaluesrepo">
|
||||
<span class="md-ellipsis">
|
||||
WriteKeyValuesRepo
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -952,10 +1002,12 @@ any mutable operation.</p>
|
||||
By default, all mutating operations consumes <code>List</code>s of data (<code>List<New></code> for <code>create</code>, <code>List<Pair<Id, New>></code> for <code>update</code> and <code>List<Id></code> for delete),
|
||||
but all they have their extension function-variations with one/two args (like <code>create</code> with <code>New</code> arg)</p>
|
||||
</div>
|
||||
<p><code>create</code> operation consumes list of <code>New</code> variants of object and produces <code>Registered</code>s list. In most cases, <code>Registered</code> variant of object should have
|
||||
<code>Id</code> of registered object, but it is not required for repo.</p>
|
||||
<p><code>update</code> operation consumes list of pairs with <code>Id</code> and <code>New</code> objects and produces list of <code>Registered</code> objects.</p>
|
||||
<p><code>deleteById</code> operation consumes list of <code>Id</code>s and do not consume anything except of notifying via <code>deletedObjectsIdsFlow</code>.</p>
|
||||
<ul>
|
||||
<li><code>create</code> operation consumes list of <code>New</code> variants of object and produces <code>Registered</code>s list. In most cases, <code>Registered</code> variant of object should have
|
||||
<code>Id</code> of registered object, but it is not required for repo.</li>
|
||||
<li><code>update</code> operation consumes list of pairs with <code>Id</code> and <code>New</code> objects and produces list of <code>Registered</code> objects.</li>
|
||||
<li><code>deleteById</code> operation consumes list of <code>Id</code>s and do not consume anything except of notifying via <code>deletedObjectsIdsFlow</code>.</li>
|
||||
</ul>
|
||||
<h2 id="keyvalue">KeyValue<a class="headerlink" href="#keyvalue" title="Permanent link">¶</a></h2>
|
||||
<p>Key-value repos has been created to support work with classic key-value stores, where keys are unique across all the repo when values are not unique.
|
||||
As well as all the others types of repos, this one have two basic types:
|
||||
@@ -978,9 +1030,41 @@ By default, all mutating operations consumes some collections. For example, <a h
|
||||
require <code>Map</code> with <code>Key</code>s and <code>Value</code>s and do not returns anything. Instead, it will throw notification via <code>onNewValue</code> flow</p>
|
||||
<p>All the methods on <code>WriteKeyValueRepo</code> have their variances with <code>pairs</code> (for set) or plain <code>vararg</code>s.</p>
|
||||
</div>
|
||||
<p><code>set</code> operation consumes map of <code>Key</code>s and their <code>Value</code>s, set them and produces updates via <code>onNewValue</code></p>
|
||||
<p><code>unset</code> operation consumes list of <code>Key</code>s, removing <code>Value</code> by <code>Key</code> and produces updates via <code>onValueRemoved</code></p>
|
||||
<p><code>unsetWithValues</code> consumes list of <code>Value</code>s, removing all <code>Key</code>s with the <code>Value</code>s equal to one of the input <code>Value</code>s, and then produces updates via <code>onValueRemoved</code></p>
|
||||
<ul>
|
||||
<li><code>set</code> operation consumes map of <code>Key</code>s and their <code>Value</code>s, set them and produces updates via <code>onNewValue</code></li>
|
||||
<li><code>unset</code> operation consumes list of <code>Key</code>s, removing <code>Value</code> by <code>Key</code> and produces updates via <code>onValueRemoved</code></li>
|
||||
<li><code>unsetWithValues</code> consumes list of <code>Value</code>s, removing all <code>Key</code>s with the <code>Value</code>s equal to one of the input <code>Value</code>s, and then produces updates via <code>onValueRemoved</code></li>
|
||||
</ul>
|
||||
<h2 id="keyvalues">KeyValues<a class="headerlink" href="#keyvalues" title="Permanent link">¶</a></h2>
|
||||
<p>This type of repos contains muliple <code>Value</code>s by their unique <code>Key</code>. It is not guaranteed, that <code>Value</code>s list by any <code>Key</code> will contains only unique values,
|
||||
but in most cases <code>Value</code>s list will not contains copies/same objects.</p>
|
||||
<h3 id="readkeyvaluesrepo"><a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-read-key-values-repo/index.html">ReadKeyValuesRepo</a><a class="headerlink" href="#readkeyvaluesrepo" title="Permanent link">¶</a></h3>
|
||||
<p>Contains operations for work with value/values getting and checking. For example:
|
||||
<a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-read-key-values-repo/count.html">count</a> for checking of amount of all values in repo
|
||||
or values by key; <a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-read-key-values-repo/get.html">get</a> for getting of values by
|
||||
<code>pagination</code>.</p>
|
||||
<h3 id="writekeyvaluesrepo"><a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-write-key-values-repo/index.html">WriteKeyValuesRepo</a><a class="headerlink" href="#writekeyvaluesrepo" title="Permanent link">¶</a></h3>
|
||||
<p>Contains write-only operations. This interface can be observed via its flows:</p>
|
||||
<ul>
|
||||
<li><a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-write-key-values-repo/on-new-value.html">onNewValue</a> will pass <code>Key</code> and <code>Value</code> when <code>Value</code> has been added to the <code>Key</code></li>
|
||||
<li><a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-write-key-values-repo/on-value-removed.html">onValueRemoved</a> will pass <code>Key</code> and <code>Value</code> when <code>Value</code> has been removed for the <code>Key</code></li>
|
||||
<li><a href="https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-write-key-values-repo/on-data-cleared.html">onDataCleared</a> will pass <code>Key</code> when <strong>all</strong> its values has been
|
||||
removed by the <code>clear</code> operation</li>
|
||||
</ul>
|
||||
<div class="admonition info">
|
||||
<p class="admonition-title">Info</p>
|
||||
<p>
|
||||
In difference with other repos, not all the methods of write key values repo require collections.</p>
|
||||
<p>All the methods on <code>WriteKeyValuesRepo</code> have their variances with <code>pairs</code> (for set) or plain <code>vararg</code>s.</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li><code>add</code> will add <code>Value</code>s to their <code>Key</code>s without any removing of data</li>
|
||||
<li><code>clear</code> removes all <code>Value</code>s by <code>Key</code> and <code>Key</code> itself from repo</li>
|
||||
<li><code>clearWithValue</code> removes all <code>Value</code> with full clear of all data by <code>Key</code>s with incoming <code>Value</code></li>
|
||||
<li><code>remove</code> consumes <code>Map</code> of <code>Key</code>s and the <code>Value</code>s which should be removed for each <code>Key</code></li>
|
||||
<li><code>removeWithValue</code> will remove only <code>Value</code> from all <code>Key</code>s collections without their full wipe</li>
|
||||
<li><code>set</code> consumes <code>Map</code> of <code>Key</code>s and the <code>Value</code>s and will <strong>rewrite</strong> currently exists list of <code>Value</code>s and set the <code>Value</code>s for their <code>Key</code></li>
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --> KSLog TelegramBotAPI --> MicroUtils TelegramBotAPI-examples --> TelegramBotAPI PlaguBot --> TelegramBotAPI TelegramBotAPILibraries --> PlaguBot PlaguBotPlugins --> TelegramBotAPILibraries PlaguBotExample --> PlaguBotPlugins BooruGrabberTelegramBot --> TelegramBotAPI BooruGrabberTelegramBot --> Krontab SauceNaoTelegramBot --> TelegramBotAPI SauceNaoTelegramBot --> SauceNaoAPI TelegramBotTutorial --> PlaguBotPlugins PlaguBotSuggestionsBot --> PlaguBotPlugins PlaguPoster --> PlaguBotPlugins PlaguPoster --> Krontab SauceNaoAPI --> MicroUtils Navigation --> MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give opportunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Another version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated
|
||||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --> KSLog TelegramBotAPI --> MicroUtils TelegramBotAPI-examples --> TelegramBotAPI PlaguBot --> TelegramBotAPI TelegramBotAPILibraries --> PlaguBot PlaguBotPlugins --> TelegramBotAPILibraries PlaguBotExample --> PlaguBotPlugins BooruGrabberTelegramBot --> TelegramBotAPI BooruGrabberTelegramBot --> Krontab SauceNaoTelegramBot --> TelegramBotAPI SauceNaoTelegramBot --> SauceNaoAPI TelegramBotTutorial --> PlaguBotPlugins PlaguBotSuggestionsBot --> PlaguBotPlugins PlaguPoster --> PlaguBotPlugins PlaguPoster --> Krontab SauceNaoAPI --> MicroUtils Navigation --> MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give opportunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Another version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user