mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-18 15:29:48 +00:00
Move db dbsource files to the postgresql backend lib and rename namespace.
This commit is contained in:
parent
baa67138eb
commit
70caa9e26c
24 changed files with 166 additions and 131 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <cstdint>
|
||||
|
||||
namespace {
|
||||
bool confirm_delete (const din::IDDescMap& parMap) {
|
||||
bool confirm_delete (const dinbpostgres::IDDescMap& parMap) {
|
||||
for (const auto& itm : parMap) {
|
||||
std::cout << "ID " << itm.first << '\t' << itm.second << '\n';
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace {
|
|||
return (answer.empty() or "y" == answer or "Y" == answer);
|
||||
}
|
||||
|
||||
bool always_delete (const din::IDDescMap&) {
|
||||
bool always_delete (const dinbpostgres::IDDescMap&) {
|
||||
return true;
|
||||
}
|
||||
} //unnamed namespace
|
||||
|
@ -77,7 +77,7 @@ int main (int parArgc, char* parArgv[]) {
|
|||
|
||||
const auto ids = vm["groupid"].as<std::vector<uint32_t>>();
|
||||
auto confirm_func = (vm.count("confirm") ? &always_delete : &confirm_delete);
|
||||
din::delete_group_from_db(settings.db, ids, confirm_func);
|
||||
dinbpostgres::delete_group_from_db(settings.db, ids, confirm_func);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue