25 #ifndef JULEA_BACKEND_H
26 #define JULEA_BACKEND_H
28 #if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
29 #error "Only <julea.h> can be included directly."
41 #define J_BACKEND_BSON_ERROR j_backend_bson_error_quark()
42 #define J_BACKEND_DB_ERROR j_backend_db_error_quark()
43 #define J_BACKEND_SQL_ERROR j_backend_sql_error_quark()
147 gboolean (*
backend_open)(gpointer, gchar
const*, gchar
const*, gpointer*);
155 gboolean (*
backend_read)(gpointer, gpointer, gpointer, guint64, guint64, guint64*);
156 gboolean (*
backend_write)(gpointer, gpointer, gconstpointer, guint64, guint64, guint64*);
171 gboolean (*
backend_put)(gpointer, gpointer, gchar
const*, gconstpointer, guint32);
173 gboolean (*
backend_get)(gpointer, gpointer, gchar
const*, gpointer*, guint32*);
177 gboolean (*
backend_iterate)(gpointer, gpointer, gchar
const**, gconstpointer*, guint32*);
260 gboolean (*
backend_insert)(gpointer, gpointer, gchar
const*, bson_t
const*, bson_t*, GError**);
298 gboolean (*
backend_update)(gpointer, gpointer, gchar
const*, bson_t
const*, bson_t
const*, GError**);
329 gboolean (*
backend_delete)(gpointer, gpointer, gchar
const*, bson_t
const*, GError**);
361 gboolean (*
backend_query)(gpointer, gpointer, gchar
const*, bson_t
const*, gpointer*, GError**);
gboolean j_backend_db_query(JBackend *, gpointer, gchar const *, bson_t const *, gpointer *, GError **)
Definition: jbackend.c:935
gboolean j_backend_db_schema_get(JBackend *, gpointer, gchar const *, bson_t *, GError **)
Definition: jbackend.c:826
gboolean j_backend_kv_get_by_prefix(JBackend *, gchar const *, gchar const *, gpointer *)
Definition: jbackend.c:687
gboolean j_backend_db_schema_create(JBackend *, gpointer, gchar const *, bson_t const *, GError **)
Definition: jbackend.c:804
GQuark j_backend_sql_error_quark(void)
Definition: jbackend.c:57
gboolean j_backend_object_iterate(JBackend *, gpointer, gchar const **)
Definition: jbackend.c:410
gboolean j_backend_object_open(JBackend *, gchar const *, gchar const *, gpointer *)
Definition: jbackend.c:330
gboolean j_backend_object_status(JBackend *, gpointer, gint64 *, guint64 *)
Definition: jbackend.c:449
void j_backend_kv_fini(JBackend *)
Definition: jbackend.c:550
gboolean j_backend_db_delete(JBackend *, gpointer, gchar const *, bson_t const *, GError **)
Definition: jbackend.c:914
gboolean j_backend_db_batch_execute(JBackend *, gpointer, GError **)
Definition: jbackend.c:784
gboolean j_backend_db_insert(JBackend *, gpointer, gchar const *, bson_t const *, bson_t *, GError **)
Definition: jbackend.c:868
gboolean j_backend_object_create(JBackend *, gchar const *, gchar const *, gpointer *)
Definition: jbackend.c:309
gboolean j_backend_object_init(JBackend *, gchar const *)
Definition: jbackend.c:276
gboolean j_backend_object_sync(JBackend *, gpointer)
Definition: jbackend.c:470
gboolean j_backend_kv_iterate(JBackend *, gpointer, gchar const **, gconstpointer *, guint32 *)
Definition: jbackend.c:707
gboolean j_backend_kv_init(JBackend *, gchar const *)
Definition: jbackend.c:531
gboolean j_backend_kv_batch_start(JBackend *, gchar const *, JSemantics *, gpointer *)
Definition: jbackend.c:564
gboolean j_backend_db_batch_start(JBackend *, gchar const *, JSemantics *, gpointer *, GError **)
Definition: jbackend.c:762
gboolean j_backend_db_schema_delete(JBackend *, gpointer, gchar const *, GError **)
Definition: jbackend.c:847
gboolean j_backend_load(gchar const *, JBackendComponent, JBackendType, GModule **, JBackend **)
Definition: jbackend.c:65
gboolean j_backend_kv_delete(JBackend *, gpointer, gchar const *)
Definition: jbackend.c:625
void j_backend_db_fini(JBackend *)
Definition: jbackend.c:748
gboolean j_backend_object_write(JBackend *, gpointer, gconstpointer, guint64, guint64, guint64 *)
Definition: jbackend.c:510
gboolean j_backend_kv_batch_execute(JBackend *, gpointer)
Definition: jbackend.c:585
gboolean j_backend_object_get_all(JBackend *, gchar const *, gpointer *)
Definition: jbackend.c:370
gboolean j_backend_kv_get_all(JBackend *, gchar const *, gpointer *)
Definition: jbackend.c:667
gboolean j_backend_db_update(JBackend *, gpointer, gchar const *, bson_t const *, bson_t const *, GError **)
Definition: jbackend.c:891
gboolean j_backend_db_iterate(JBackend *, gpointer, bson_t *, GError **)
Definition: jbackend.c:957
gboolean j_backend_kv_put(JBackend *, gpointer, gchar const *, gconstpointer, guint32)
Definition: jbackend.c:604
gboolean j_backend_object_delete(JBackend *, gpointer)
Definition: jbackend.c:351
GQuark j_backend_bson_error_quark(void)
Definition: jbackend.c:41
gboolean j_backend_unload(JBackend *, GModule *)
Definition: jbackend.c:260
gboolean j_backend_object_get_by_prefix(JBackend *, gchar const *, gchar const *, gpointer *)
Definition: jbackend.c:390
gboolean j_backend_object_read(JBackend *, gpointer, gpointer, guint64, guint64, guint64 *)
Definition: jbackend.c:489
GQuark j_backend_db_error_quark(void)
Definition: jbackend.c:49
void j_backend_object_fini(JBackend *)
Definition: jbackend.c:295
gboolean j_backend_kv_get(JBackend *, gpointer, gchar const *, gpointer *, guint32 *)
Definition: jbackend.c:645
gboolean j_backend_object_close(JBackend *, gpointer)
Definition: jbackend.c:430
gboolean j_backend_db_init(JBackend *, gchar const *)
Definition: jbackend.c:729
JBackendSQLError
Definition: jbackend.h:94
@ J_BACKEND_SQL_ERROR_STEP
Definition: jbackend.h:102
@ J_BACKEND_SQL_ERROR_CONSTRAINT
Definition: jbackend.h:97
@ J_BACKEND_SQL_ERROR_FINALIZE
Definition: jbackend.h:98
@ J_BACKEND_SQL_ERROR_PREPARE
Definition: jbackend.h:100
@ J_BACKEND_SQL_ERROR_FAILED
Definition: jbackend.h:95
@ J_BACKEND_SQL_ERROR_INVALID_TYPE
Definition: jbackend.h:99
@ J_BACKEND_SQL_ERROR_RESET
Definition: jbackend.h:101
@ J_BACKEND_SQL_ERROR_BIND
Definition: jbackend.h:96
JBackendDBError
Definition: jbackend.h:76
@ J_BACKEND_DB_ERROR_THREADING_ERROR
Definition: jbackend.h:87
@ J_BACKEND_DB_ERROR_FAILED
Definition: jbackend.h:77
@ J_BACKEND_DB_ERROR_OPERATOR_INVALID
Definition: jbackend.h:83
@ J_BACKEND_DB_ERROR_ITERATOR_INVALID
Definition: jbackend.h:80
@ J_BACKEND_DB_ERROR_ITERATOR_NO_MORE_ELEMENTS
Definition: jbackend.h:81
@ J_BACKEND_DB_ERROR_NO_VARIABLE_SET
Definition: jbackend.h:82
@ J_BACKEND_DB_ERROR_COMPARATOR_INVALID
Definition: jbackend.h:78
@ J_BACKEND_DB_ERROR_SCHEMA_EMPTY
Definition: jbackend.h:84
@ J_BACKEND_DB_ERROR_SELECTOR_EMPTY
Definition: jbackend.h:86
@ J_BACKEND_DB_ERROR_DB_TYPE_INVALID
Definition: jbackend.h:79
@ J_BACKEND_DB_ERROR_SCHEMA_NOT_FOUND
Definition: jbackend.h:85
@ J_BACKEND_DB_ERROR_VARIABLE_NOT_FOUND
Definition: jbackend.h:88
JBackendComponent
Definition: jbackend.h:117
@ J_BACKEND_COMPONENT_CLIENT
Definition: jbackend.h:118
@ J_BACKEND_COMPONENT_SERVER
Definition: jbackend.h:119
JBackend * backend_info(void)
JBackendType
Definition: jbackend.h:108
@ J_BACKEND_TYPE_OBJECT
Definition: jbackend.h:109
@ J_BACKEND_TYPE_DB
Definition: jbackend.h:111
@ J_BACKEND_TYPE_KV
Definition: jbackend.h:110
JBackendBSONError
Definition: jbackend.h:47
@ J_BACKEND_BSON_ERROR_BSON_COUNT_NULL
Definition: jbackend.h:53
@ J_BACKEND_BSON_ERROR_ITER_KEY_FOUND
Definition: jbackend.h:65
@ J_BACKEND_BSON_ERROR_ITER_KEY_NULL
Definition: jbackend.h:67
@ J_BACKEND_BSON_ERROR_BSON_BUF_NULL
Definition: jbackend.h:52
@ J_BACKEND_BSON_ERROR_FAILED
Definition: jbackend.h:48
@ J_BACKEND_BSON_ERROR_BSON_JSON_NULL
Definition: jbackend.h:56
@ J_BACKEND_BSON_ERROR_BSON_NULL
Definition: jbackend.h:59
@ J_BACKEND_BSON_ERROR_ITER_NULL
Definition: jbackend.h:68
@ J_BACKEND_BSON_ERROR_ITER_TYPE_NULL
Definition: jbackend.h:70
@ J_BACKEND_BSON_ERROR_BSON_NAME_NULL
Definition: jbackend.h:57
@ J_BACKEND_BSON_ERROR_ITER_HAS_NEXT_NULL
Definition: jbackend.h:62
@ J_BACKEND_BSON_ERROR_BSON_APPEND_FAILED
Definition: jbackend.h:51
@ J_BACKEND_BSON_ERROR_BSON_HAS_FIELD_NULL
Definition: jbackend.h:54
@ J_BACKEND_BSON_ERROR_BSON_NOT_ENOUGH_KEYS
Definition: jbackend.h:58
@ J_BACKEND_BSON_ERROR_BSON_VALUE_NULL
Definition: jbackend.h:60
@ J_BACKEND_BSON_ERROR_BSON_APPEND_DOCUMENT_FAILED
Definition: jbackend.h:50
@ J_BACKEND_BSON_ERROR_BSON_INIT_FROM_JSON_FAILED
Definition: jbackend.h:55
@ J_BACKEND_BSON_ERROR_ITER_INIT
Definition: jbackend.h:63
@ J_BACKEND_BSON_ERROR_ITER_INVALID_TYPE
Definition: jbackend.h:64
@ J_BACKEND_BSON_ERROR_ITER_RECOURSE
Definition: jbackend.h:69
@ J_BACKEND_BSON_ERROR_ITER_KEY_NOT_FOUND
Definition: jbackend.h:66
@ J_BACKEND_BSON_ERROR_ITER_EQUALS_NULL
Definition: jbackend.h:61
@ J_BACKEND_BSON_ERROR_BSON_APPEND_ARRAY_FAILED
Definition: jbackend.h:49
JBackendFlags
Definition: jbackend.h:125
@ J_BACKEND_FLAGS_DO_NOT_UNLOAD
Definition: jbackend.h:126
Definition: jbackend.h:132
struct JBackend::@8::@12 db
gboolean(* backend_update)(gpointer, gpointer, gchar const *, bson_t const *, bson_t const *, GError **)
Definition: jbackend.h:298
gboolean(* backend_iterate)(gpointer, gpointer, gchar const **)
Definition: jbackend.h:160
gboolean(* backend_write)(gpointer, gpointer, gconstpointer, guint64, guint64, guint64 *)
Definition: jbackend.h:156
gboolean(* backend_get)(gpointer, gpointer, gchar const *, gpointer *, guint32 *)
Definition: jbackend.h:173
void(* backend_fini)(gpointer)
Definition: jbackend.h:144
gboolean(* backend_create)(gpointer, gchar const *, gchar const *, gpointer *)
Definition: jbackend.h:146
JBackendComponent component
Definition: jbackend.h:134
gboolean(* backend_open)(gpointer, gchar const *, gchar const *, gpointer *)
Definition: jbackend.h:147
gboolean(* backend_schema_create)(gpointer, gpointer, gchar const *, bson_t const *, GError **)
Definition: jbackend.h:207
struct JBackend::@8::@10 object
gpointer data
Definition: jbackend.h:137
gboolean(* backend_batch_start)(gpointer, gchar const *, JSemantics *, gpointer *)
Definition: jbackend.h:168
gboolean(* backend_put)(gpointer, gpointer, gchar const *, gconstpointer, guint32)
Definition: jbackend.h:171
JBackendFlags flags
Definition: jbackend.h:135
gboolean(* backend_get_all)(gpointer, gchar const *, gpointer *)
Definition: jbackend.h:158
gboolean(* backend_status)(gpointer, gpointer, gint64 *, guint64 *)
Definition: jbackend.h:152
gboolean(* backend_schema_get)(gpointer, gpointer, gchar const *, bson_t *, GError **)
Definition: jbackend.h:228
gboolean(* backend_get_by_prefix)(gpointer, gchar const *, gchar const *, gpointer *)
Definition: jbackend.h:159
gboolean(* backend_schema_delete)(gpointer, gpointer, gchar const *, GError **)
Definition: jbackend.h:238
gboolean(* backend_delete)(gpointer, gpointer)
Definition: jbackend.h:149
JBackendType type
Definition: jbackend.h:133
gboolean(* backend_init)(gchar const *, gpointer *)
Definition: jbackend.h:143
gboolean(* backend_close)(gpointer, gpointer)
Definition: jbackend.h:150
gboolean(* backend_query)(gpointer, gpointer, gchar const *, bson_t const *, gpointer *, GError **)
Definition: jbackend.h:361
gboolean(* backend_sync)(gpointer, gpointer)
Definition: jbackend.h:153
gboolean(* backend_read)(gpointer, gpointer, gpointer, guint64, guint64, guint64 *)
Definition: jbackend.h:155
gboolean(* backend_batch_execute)(gpointer, gpointer)
Definition: jbackend.h:169
gboolean(* backend_insert)(gpointer, gpointer, gchar const *, bson_t const *, bson_t *, GError **)
Definition: jbackend.h:260
struct JBackend::@8::@11 kv
Definition: jsemantics.c:42