now storing and updateing sellers, storing articles
This commit is contained in:
parent
d50e496f79
commit
c7d8eddf86
2 changed files with 107 additions and 13 deletions
|
@ -9,21 +9,23 @@
|
|||
|
||||
class Database
|
||||
{
|
||||
public:
|
||||
public:
|
||||
Database(const std::string& dbname);
|
||||
~Database();
|
||||
Database(const Database&) = delete;
|
||||
Database& operator=(const Database&) = delete;
|
||||
void exec(const std::string& sql);
|
||||
void init();
|
||||
unsigned int storeSellers(std::vector<Seller>& sellers);
|
||||
private:
|
||||
sqlite3 *db_;
|
||||
unsigned int storeSellers(std::vector<std::shared_ptr<Seller>>& sellers);
|
||||
|
||||
private:
|
||||
sqlite3* db_;
|
||||
std::string dbname_;
|
||||
void beginTransaction();
|
||||
void endTransaction();
|
||||
void createNew();
|
||||
int getVersion();
|
||||
unsigned int storeArticles(sqlite3_stmt* stmt, std::vector<Article*> articles);
|
||||
};
|
||||
|
||||
#endif // DATABASE_H
|
Loading…
Add table
Add a link
Reference in a new issue