-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Basic DataBase. Adding CMakeLists.txt in dataBase directory
- Loading branch information
1 parent
c6d9782
commit 6c7cb7d
Showing
7 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
project(PasswordManager) | ||
|
||
target_sources(passwordManager PRIVATE DataBaseHandler.cpp) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#pragma once | ||
|
||
#include <iostream> | ||
#include <vector> | ||
|
||
#include <string> | ||
struct DataBaseCommon | ||
{ | ||
static const std::vector<std::string> userRecords; | ||
static const std::vector<std::string> passwordRecords; | ||
static constexpr std::vector<std::string> userRecordsRecords{"Username", "Password"}; | ||
static constexpr std::vector<std::string> categoriesRecords{"Category"}; | ||
static constexpr std::vector<std::string> passwordHistoryRecords{"Creation_Time", "Modify_Time", "Expiry_Time"}; | ||
static constexpr std::vector<std::string> passwordRecords{ | ||
"User_Id", "Category_Id", "Title", "Username", "Password", "Note", "Url"}; | ||
|
||
static constexpr std::string dataBasePath{"../../../source/dataBase/password-manager.db"}; | ||
|
||
static const std::string dataBasePath; | ||
static const std::string users; | ||
static const std::string passwords; | ||
static constexpr std::string users{"Users"}; | ||
static constexpr std::string passwords{"Passwords"}; | ||
static constexpr std::string passwordHistory{"PasswordHistory"}; | ||
static constexpr std::string categories{"Categories"}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,4 @@ class DataBaseHandler | |
void executeQuery(const std::string &query); | ||
|
||
sqlite3 *database_; | ||
}; | ||
}; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters