mirror of
https://github.com/emqx/neuron.git
synced 2026-10-16 20:30:39 +08:00
chore(persist): get persist db
This commit is contained in:
@@ -24,7 +24,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "adapter/adapter_info.h"
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "adapter_info.h"
|
||||
#include "persist/json/persist_json_plugin.h"
|
||||
|
||||
typedef neu_json_plugin_req_plugin_t neu_persist_plugin_info_t;
|
||||
@@ -90,6 +92,8 @@ int neu_persister_create(const char *schema_dir);
|
||||
*/
|
||||
void neu_persister_destroy();
|
||||
|
||||
sqlite3 *neu_persister_get_db();
|
||||
|
||||
/**
|
||||
* Persist nodes.
|
||||
* @param node_info neu_persist_node_info_t.
|
||||
|
||||
@@ -465,6 +465,11 @@ int neu_persister_create(const char *schema_dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sqlite3 *neu_persister_get_db()
|
||||
{
|
||||
return global_db;
|
||||
}
|
||||
|
||||
void neu_persister_destroy()
|
||||
{
|
||||
sqlite3_close(global_db);
|
||||
|
||||
Reference in New Issue
Block a user