create db at the right place
This commit is contained in:
parent
c946bf6924
commit
5eef98074e
6 changed files with 40 additions and 22 deletions
|
@ -10,17 +10,18 @@
|
|||
class Database
|
||||
{
|
||||
public:
|
||||
Database(const std::string& dbname);
|
||||
explicit Database(const std::string& dbname);
|
||||
Database();
|
||||
~Database();
|
||||
Database(const Database&) = delete;
|
||||
Database& operator=(const Database&) = delete;
|
||||
void exec(const std::string& sql);
|
||||
void init();
|
||||
unsigned int storeSellers(std::vector<std::unique_ptr<Seller>>& sellers);
|
||||
|
||||
private:
|
||||
sqlite3* db_;
|
||||
sqlite3* db_{nullptr};
|
||||
std::string dbname_;
|
||||
void init();
|
||||
void beginTransaction();
|
||||
void endTransaction();
|
||||
void createNew();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue