suite sqlmanager
This commit is contained in:
parent
f6dbdc9fc3
commit
bc12dc6020
@ -1,3 +1,5 @@
|
||||
//database file location to read in the json?
|
||||
|
||||
//deployer SLmanager implementation
|
||||
// Copyright (C) 2024 Jean-Cloud
|
||||
// GNU General Public License v3
|
||||
@ -6,20 +8,50 @@
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <sqlite3.h>
|
||||
#include "Service.h"
|
||||
#include "SQLmanager.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//constructor and destructor inlin
|
||||
//constructor
|
||||
SQLmanager::SQLmanager()
|
||||
{
|
||||
sqlite3 *db;
|
||||
char *zErrMsg = 0;
|
||||
int rc;
|
||||
|
||||
//services
|
||||
vector<Service> GetServices() const;
|
||||
const Service * FindServiceByUsername(string aUsername) const;
|
||||
const Service * FindServiceByID(int aUserID) const;
|
||||
rc = sqlite3_open("test.db", &db);
|
||||
|
||||
if(rc) {
|
||||
cerr << "Error. Database cannot be opened." << endl << sqlite3_errmsg(db) << endl;
|
||||
} else {
|
||||
cout << "Database opened" << endl;
|
||||
}
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
//destructor inline
|
||||
|
||||
//public methods
|
||||
vector<Service> SQLmanager::GetServices() const
|
||||
{
|
||||
|
||||
}
|
||||
const Service * SQLmanager::FindServiceByUsername(string aUsername) const
|
||||
{
|
||||
|
||||
}
|
||||
const Service * SQLmanager::FindServiceByID(int aUserID) const
|
||||
{
|
||||
|
||||
}
|
||||
//list<const Service*> FindServicesByServer(string aServer) const;
|
||||
int isServiceOnServer(string serviceUsername);
|
||||
int SQLmanager::isServiceOnServer(string serviceUsername)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
vector <Service> services;
|
||||
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ using namespace std;
|
||||
|
||||
class SQLmanager {
|
||||
public:
|
||||
SQLmanager(){}
|
||||
SQLmanager();
|
||||
~SQLmanager(){}
|
||||
//services
|
||||
vector<Service> GetServices() const;
|
||||
|
Loading…
Reference in New Issue
Block a user