workflow destination transition, some examples on title docs page
Main LMDBAL workfow / Archlinux (push) Successful in 48s Details

This commit is contained in:
Blue 2024-03-03 20:09:06 -03:00
parent f638228d24
commit dcf2d289dc
Signed by: blue
GPG Key ID: 9B203B252A63EE38
2 changed files with 48 additions and 1 deletions

View File

@ -35,5 +35,5 @@ jobs:
username: ${{ secrets.DEPLOY_USER_NAME }}
key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
source: "build/doc/html/*,build/doc/xml/*,build/doc/man/*"
target: ${{ secrets.LMDBAL_DOCS_DEPLOY_PATH }}
target: "/srv/lmdbal/doc"
strip_components: 2

View File

@ -4,6 +4,15 @@
* It repesents a collection of key-value storages that are going to be stored in a sigle data base directory.
* To create a LMDBAL::Base you need to pick up a name of a directory that is going to be created on your machine.
*
* @code{.cpp}
*
* #include "base.h"
*
* //...
*
* LMDBAL::Base base("myDataBase");
* @endcode
*
* LMDBAL::Base creates or opens existing directory with the given name in the location acquired with
* <a class="el" href="https://doc.qt.io/qt-6/qstandardpaths.html">QStandardPaths</a>::<a class="el" href="https://doc.qt.io/qt-6/qstandardpaths.html#writableLocation">writableLocation</a>(<a class="el" href="https://doc.qt.io/qt-6/qstandardpaths.html">QStandardPaths</a>::<a class="el" href="https://doc.qt.io/qt-6/qstandardpaths.html#StandardLocation-enum">CacheLocation</a>)
* so, the file system destination of your data depends on the
@ -15,17 +24,55 @@
* <a class="el" href="https://en.cppreference.com/w/cpp/container/map">std::map</a>
* to speed up the access.
*
* @code{.cpp}
*
* #include "storage.h"
* #include "cache.h"
*
* //...
*
* LMDBAL::Storage<uint32_t, uint32_t> storage = base.addStorage<uint32_t, uint32_t>("storage");
* LMDBAL::Cache<int8_t, std::string> cache = base.addCache<int8_t, std::string>("cache");
*
* @endcode
*
* You can obtain handlers by calling LMDBAL::Base::addStorage() or LMDBAL::Base::addCache().
* Note that the handlers still belong to the LMDBAL::Base and it's his responsibility to destroy them.
* You are not obliged to save those handlers,
* you can obtain them at any time later using methods LMDBAL::Base::getStorage() or LMDBAL::Base::getCache()
* calling them with the same template types and names.
*
* @code{.cpp}
*
* //...
*
* base.open();
*
* @endcode
*
* After you have added all the storages you wanted it's time to open the data base with LMDBAL::Base::open().
* At this point you are not allowed to add any more storages, otherwise LMDBAL::Opened exception will be thrown.
* It's currently the limitation of this little library and I might solve it in the future.
* Database will throw no exception if you will try to close the closed LMDBAL::Base or open again already opened one.
* Also it will automatically close itself if you'll try to destoroy onpened LMDBAL::Base.
*
* @code{.cpp}
*
* //...
*
* storage->addRecord(54, 75);
* cache->addRecord(9, "my value");
*
* uint32_t value1 = storage->getRecord(54); //75
* std::string value2 = cache->getRecord(9); //"myValue"
*
* uint32_t count1 = storage->count(); //1
* uint32_t count2 = cache->count(); //1
*
* storage->removeRecord(54);
* cache->removeRecord(9);
*
* @endcode
*
* To discover how to store read and modify data take a look at LMDBAL::Storage and LMDBAL::Cache classes.
*/