server/src/kernel/database.c

39 lines
546 B
C
Raw Normal View History

#include <platform.h>
#include "database.h"
#include <platform.h>
#include <kernel/config.h>
#include <kernel/database.h>
#include <kernel/orderdb.h>
#include <util/log.h>
2017-11-19 12:31:50 +01:00
#include "db/driver.h"
2017-11-19 12:31:50 +01:00
order_data *dblib_load_order(int id)
{
if (id > 0) {
2017-11-19 12:31:50 +01:00
return db_driver_order_load(id);
}
return NULL;
}
2017-11-19 12:31:50 +01:00
int dblib_save_order(order_data *od)
{
if (od->_str) {
2017-11-19 12:31:50 +01:00
return db_driver_order_save(od);
}
return 0;
}
2017-11-19 12:31:50 +01:00
void dblib_open(void)
{
2017-11-19 12:31:50 +01:00
db_driver_open();
}
2017-11-19 12:31:50 +01:00
void dblib_close(void)
{
2017-11-19 12:31:50 +01:00
db_driver_close();
}