diff --git a/docs/micro_utils/repos/inmemory.md b/docs/micro_utils/repos/inmemory.md new file mode 100644 index 0000000..119e453 --- /dev/null +++ b/docs/micro_utils/repos/inmemory.md @@ -0,0 +1,20 @@ +# In memory + +In memory realizations contains several simple variants: + +* [MapCRUDRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-c-r-u-d-repo/index.html) +* [MapKeyValueRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-key-value-repo/index.html) +* [MapKeyValuesRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-key-values-repo/index.html) + +Each realization contains `Write` and `Read` parents. + +There are several important moments: + +## [WriteMapCRUDRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-write-map-c-r-u-d-repo/index.html) (and [MapCRUDRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-c-r-u-d-repo/index.html)) + +It is an abstract repo with abstract functions: `updateObject` and `createObject`. Both functions require from realization to create `Registered` variant from incoming data and +both will be called within repo [locker.withWriteLock](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.coroutines/with-write-lock.html). + +You may use functions [MapCRUDRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-c-r-u-d-repo.html) with +passing the callbacks `updateObject` and `createObject` which will be used in their realizations of default [MapCRUDRepo](https://microutils.inmo.dev/micro_utils.dokka/dev.inmo.micro_utils.repos/-map-c-r-u-d-repo/index.html) +variant diff --git a/mkdocs.yml b/mkdocs.yml index a9e1110..9eb9fba 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,7 +12,9 @@ nav: - 'micro_utils/index.md' - 'micro_utils/resources.md' - 'micro_utils/startup.md' - - 'micro_utils/repos/' + - 'Repos': + - 'micro_utils/repos/index.md' + - 'micro_utils/repos/inmemory.md' - 'Telegram Bot API': - 'tgbotapi/index.md' - KDocs: 'https://tgbotapi.inmo.dev'