From 2629906b6d961064ad566f90adfe8d28a7315d8a Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Fri, 17 May 2019 12:26:26 +0200 Subject: #941 add basic database-independent abstraction (dbi) Add basic infrastructure to support for the independent database layer. --- sources/dbi.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sources/dbi.h (limited to 'sources/dbi.h') diff --git a/sources/dbi.h b/sources/dbi.h new file mode 100644 index 0000000..882550f --- /dev/null +++ b/sources/dbi.h @@ -0,0 +1,21 @@ +#ifndef __OG_DBI +#define __OG_DBI + +#include + +struct og_dbi_config { + const char *user; + const char *passwd; + const char *host; + const char *database; +}; + +struct og_dbi { + dbi_conn conn; + dbi_inst inst; +}; + +struct og_dbi *og_dbi_open(struct og_dbi_config *config); +void og_dbi_close(struct og_dbi *db); + +#endif -- cgit v1.2.3-18-g5258