ac61c26d56
add: improved sql calls
43 lines
650 B
C++
43 lines
650 B
C++
#ifndef EMGAUWA_CORE_SCHEDULE_DBO_H
|
|
#define EMGAUWA_CORE_SCHEDULE_DBO_H
|
|
|
|
#include <string>
|
|
#include <sqlite3.h>
|
|
#include <json/value.h>
|
|
#include "period.h"
|
|
#include "period_list.h"
|
|
|
|
class schedule_dbo
|
|
{
|
|
public:
|
|
|
|
char id[33];
|
|
char name[128];
|
|
period_list *periods;
|
|
|
|
bool
|
|
update();
|
|
|
|
bool
|
|
insert();
|
|
|
|
bool
|
|
remove();
|
|
|
|
~schedule_dbo();
|
|
|
|
Json::Value
|
|
to_json();
|
|
|
|
static void
|
|
free_list(schedule_dbo **schedules_list);
|
|
|
|
static schedule_dbo**
|
|
get_by_simple(const char *key, const void *value, intptr_t bind_func);
|
|
|
|
static schedule_dbo**
|
|
get_all();
|
|
};
|
|
|
|
|
|
#endif //EMGAUWA_CORE_SCHEDULE_DBO_H
|