This commit is contained in:
parent
cfb7a74841
commit
31e20e9af0
@ -23,13 +23,11 @@
|
|||||||
#define REPERTORY_INCLUDE_DB_META_DB_HPP_
|
#define REPERTORY_INCLUDE_DB_META_DB_HPP_
|
||||||
|
|
||||||
#include "db/i_meta_db.hpp"
|
#include "db/i_meta_db.hpp"
|
||||||
#include "db/sqlite_meta_db.hpp"
|
|
||||||
|
|
||||||
namespace repertory {
|
namespace repertory {
|
||||||
[[nodiscard]] inline auto create_meta_db(const app_config &cfg)
|
class app_config;
|
||||||
-> std::unique_ptr<i_meta_db> {
|
|
||||||
return std::make_unique<sqlite_meta_db>(cfg);
|
auto create_meta_db(const app_config &cfg) -> std::unique_ptr<i_meta_db>;
|
||||||
}
|
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // REPERTORY_INCLUDE_DB_META_DB_HPP_
|
#endif // REPERTORY_INCLUDE_DB_META_DB_HPP_
|
||||||
|
31
repertory/librepertory/src/db/meta_db.cpp
Normal file
31
repertory/librepertory/src/db/meta_db.cpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Copyright <2018-2024> <scott.e.graves@protonmail.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
*/
|
||||||
|
#include "db/meta_db.hpp"
|
||||||
|
|
||||||
|
#include "app_config.hpp"
|
||||||
|
#include "db/sqlite_meta_db.hpp"
|
||||||
|
|
||||||
|
namespace repertory {
|
||||||
|
auto create_meta_db(const app_config &cfg) -> std::unique_ptr<i_meta_db> {
|
||||||
|
return std::make_unique<sqlite_meta_db>(cfg);
|
||||||
|
}
|
||||||
|
} // namespace repertory
|
Loading…
x
Reference in New Issue
Block a user