Skip to content

Commit

Permalink
Basic SQLite DataBase
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikpalatynski committed Feb 5, 2024
1 parent 7935011 commit c6d9782
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ add_executable(passwordManager main.cpp PasswordManager.cpp DataBase/DataBaseHan
target_include_directories(sqlite3 PUBLIC ../lib)
target_link_libraries(passwordManager PRIVATE sqlite3)

add_subdirectory(test)
add_subdirectory(test)
2 changes: 1 addition & 1 deletion source/DataBase/DataBaseCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const std::vector<std::string> DataBaseCommon::userRecords{"Username", "Password

const std::string DataBaseCommon::dataBasePath{"../../../source/DataBase/password-manager.db"};
const std::string DataBaseCommon::users{"Users"};
const std::string DataBaseCommon::passwords{"Passwords"};
const std::string DataBaseCommon::passwords{"Passwords"};
2 changes: 1 addition & 1 deletion source/DataBase/DataBaseHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class DataBaseHandler
void executeQuery(const std::string &query);

sqlite3 *database_;
};
};
9 changes: 5 additions & 4 deletions source/PasswordManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

#include "PasswordManager.h"

PasswordManager::PasswordManager(const std::string& password)
: password_(password)
PasswordManager::PasswordManager(const std::string &password)
: password_(password)
{
std::cout << "Password is: " << password_ << '\n';
}

PasswordManager::~PasswordManager() {
PasswordManager::~PasswordManager()
{
std::cout << "Password manager destructor\n";
}
}
2 changes: 1 addition & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ int main()
}

return 0;
}
}

0 comments on commit c6d9782

Please sign in to comment.