summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/gfdb/gfdb_sqlite3_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/gfdb/gfdb_sqlite3_helper.h')
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3_helper.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3_helper.h b/libglusterfs/src/gfdb/gfdb_sqlite3_helper.h
new file mode 100644
index 00000000000..8b62be1d4d0
--- /dev/null
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3_helper.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+
+ This file is licensed to you under your choice of the GNU Lesser
+ General Public License, version 3 or any later version (LGPLv3 or
+ later), or the GNU General Public License, version 2 (GPLv2), in all
+ cases as published by the Free Software Foundation.
+*/
+#ifndef __GFDB_SQLITE3_HELPER_H
+#define __GFDB_SQLITE3_HELPER_H
+
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+#include "config.h"
+#endif
+
+#include "gfdb_sqlite3.h"
+
+/******************************************************************************
+ *
+ * Helper functions for gf_sqlite3_insert()
+ *
+ * ****************************************************************************/
+
+
+int
+gf_sql_insert_wind (gf_sql_connection_t *sql_conn,
+ gfdb_db_record_t *gfdb_db_record);
+
+int
+gf_sql_insert_unwind (gf_sql_connection_t *sql_conn,
+ gfdb_db_record_t *gfdb_db_record);
+
+
+int
+gf_sql_update_delete_wind (gf_sql_connection_t *sql_conn,
+ gfdb_db_record_t *gfdb_db_record);
+
+int
+gf_sql_delete_unwind (gf_sql_connection_t *sql_conn,
+ gfdb_db_record_t *gfdb_db_record);
+
+
+
+
+
+/******************************************************************************
+ *
+ * Find/Query helper functions
+ *
+ * ****************************************************************************/
+
+
+int
+gf_sql_query_function (sqlite3_stmt *prep_stmt,
+ gf_query_callback_t query_callback,
+ void *_query_cbk_args);
+
+int
+gf_sql_clear_counters (gf_sql_connection_t *sql_conn);
+
+#endif