JULEA
Data Fields
JBackend Struct Reference

#include <jbackend.h>

Data Fields

JBackendType type
 
JBackendComponent component
 
JBackendFlags flags
 
gpointer data
 
union {
   struct {
      gboolean(*   backend_init )(gchar const *, gpointer *)
 
      void(*   backend_fini )(gpointer)
 
      gboolean(*   backend_create )(gpointer, gchar const
         *, gchar const *, gpointer *)
 
      gboolean(*   backend_open )(gpointer, gchar const
         *, gchar const *, gpointer *)
 
      gboolean(*   backend_delete )(gpointer, gpointer)
 
      gboolean(*   backend_close )(gpointer, gpointer)
 
      gboolean(*   backend_status )(gpointer, gpointer, gint64
         *, guint64 *)
 
      gboolean(*   backend_sync )(gpointer, gpointer)
 
      gboolean(*   backend_read )(gpointer, gpointer, gpointer,
         guint64, guint64, guint64 *)
 
      gboolean(*   backend_write )(gpointer, gpointer,
         gconstpointer, guint64,
         guint64, guint64 *)
 
      gboolean(*   backend_get_all )(gpointer, gchar const
         *, gpointer *)
 
      gboolean(*   backend_get_by_prefix )(gpointer, gchar const
         *, gchar const *, gpointer *)
 
      gboolean(*   backend_iterate )(gpointer, gpointer, gchar
         const **)
 
   }   object
 
   struct {
      gboolean(*   backend_init )(gchar const *, gpointer *)
 
      void(*   backend_fini )(gpointer)
 
      gboolean(*   backend_batch_start )(gpointer, gchar const
         *, JSemantics *, gpointer *)
 
      gboolean(*   backend_batch_execute )(gpointer, gpointer)
 
      gboolean(*   backend_put )(gpointer, gpointer, gchar
         const *, gconstpointer,
         guint32)
 
      gboolean(*   backend_delete )(gpointer, gpointer, gchar
         const *)
 
      gboolean(*   backend_get )(gpointer, gpointer, gchar
         const *, gpointer *, guint32 *)
 
      gboolean(*   backend_get_all )(gpointer, gchar const
         *, gpointer *)
 
      gboolean(*   backend_get_by_prefix )(gpointer, gchar const
         *, gchar const *, gpointer *)
 
      gboolean(*   backend_iterate )(gpointer, gpointer, gchar
         const **, gconstpointer
         *, guint32 *)
 
   }   kv
 
   struct {
      gboolean(*   backend_init )(gchar const *, gpointer *)
 
      void(*   backend_fini )(gpointer)
 
      gboolean(*   backend_batch_start )(gpointer, gchar const
         *, JSemantics *, gpointer
         *, GError **)
 
      gboolean(*   backend_batch_execute )(gpointer, gpointer, GError **)
 
      gboolean(*   backend_schema_create )(gpointer, gpointer, gchar
         const *, bson_t const
         *, GError **)
 
      gboolean(*   backend_schema_get )(gpointer, gpointer, gchar
         const *, bson_t *, GError **)
 
      gboolean(*   backend_schema_delete )(gpointer, gpointer, gchar
         const *, GError **)
 
      gboolean(*   backend_insert )(gpointer, gpointer, gchar
         const *, bson_t const
         *, bson_t *, GError **)
 
      gboolean(*   backend_update )(gpointer, gpointer, gchar
         const *, bson_t const
         *, bson_t const *, GError **)
 
      gboolean(*   backend_delete )(gpointer, gpointer, gchar
         const *, bson_t const
         *, GError **)
 
      gboolean(*   backend_query )(gpointer, gpointer, gchar
         const *, bson_t const
         *, gpointer *, GError **)
 
      gboolean(*   backend_iterate )(gpointer, gpointer, bson_t
         *, GError **)
 
   }   db
 
}; 
 

Field Documentation

◆ 

union { ... }

◆ backend_batch_execute

gboolean(* JBackend::backend_batch_execute) (gpointer, gpointer, GError **)

◆ backend_batch_start

gboolean(* JBackend::backend_batch_start) (gpointer, gchar const *, JSemantics *, gpointer *, GError **)

◆ backend_close

gboolean(* JBackend::backend_close) (gpointer, gpointer)

◆ backend_create

gboolean(* JBackend::backend_create) (gpointer, gchar const *, gchar const *, gpointer *)

◆ backend_delete

gboolean(* JBackend::backend_delete) (gpointer, gpointer, gchar const *, bson_t const *, GError **)

Deletes data

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to delete (e.g., "files")
[in]selectorThe selector to decide which data should be updated. Points to:
  • An initialized bson containing "selector_part"
  • An empty bson
  • NULL
    selector_part
    {
    "_mode": mode (int32)
    "0": {
    "_name": name1 (utf8),
    "_operator": op1 (int32),
    "_value": value1
    },
    "4": selector_part (document),
    "N": {
    "_name": name2 (utf8),
    "_operator": op2 (int32),
    "_value": value2
    }
    }
Returns
TRUE on success, FALSE otherwise.

◆ backend_fini

void(* JBackend::backend_fini) (gpointer)

◆ backend_get

gboolean(* JBackend::backend_get) (gpointer, gpointer, gchar const *, gpointer *, guint32 *)

◆ backend_get_all

gboolean(* JBackend::backend_get_all) (gpointer, gchar const *, gpointer *)

◆ backend_get_by_prefix

gboolean(* JBackend::backend_get_by_prefix) (gpointer, gchar const *, gchar const *, gpointer *)

◆ backend_init

gboolean(* JBackend::backend_init) (gchar const *, gpointer *)

◆ backend_insert

gboolean(* JBackend::backend_insert) (gpointer, gpointer, gchar const *, bson_t const *, bson_t *, GError **)

Insert data into a schema

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to delete (e.g., "files")
[in]metadataThe data to insert. Points to:
  • An initialized BSON containing "data"
[out]idreturns the id of the inserted entry
{
"var_name1": value1,
"var_name2": value2,
"var_nameN": valueN,
}
gpointer data
Definition: jbackend.h:137
Returns
TRUE on success, FALSE otherwise.

◆ backend_iterate

gboolean(* JBackend::backend_iterate) (gpointer, gpointer, bson_t *, GError **)

Obtains metadata

backend_iterate should be called until the returned value is NULL due to no more elements found. This allows the backend to free potentially allocated caches.

Parameters
[in,out]iteratorThe iterator specifying the data to retrieve
[out]metadataThe requested metadata initially points to:
  • An initialized BSON
    {
    "_id": id,
    "var_name1": value1,
    "var_name2": value2,
    "var_nameN": valueN
    }
Returns
TRUE on success, FALSE otherwise.

◆ backend_open

gboolean(* JBackend::backend_open) (gpointer, gchar const *, gchar const *, gpointer *)

◆ backend_put

gboolean(* JBackend::backend_put) (gpointer, gpointer, gchar const *, gconstpointer, guint32)

◆ backend_query

gboolean(* JBackend::backend_query) (gpointer, gpointer, gchar const *, bson_t const *, gpointer *, GError **)

Creates an iterator

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to delete (e.g., "files")
[in]selectorThe selector to decide which data should be updated. Points to:
  • An initialized BSON containing "selector_part"
  • An empty BSON
  • NULL
    selector_part
    {
    "_mode": mode (int32),
    "0": {
    "_name": name1 (utf8),
    "_operator": op1 (int32),
    "_value": value1
    },
    "4": selector_part (document),
    "N": {
    "_name": name2 (utf8),
    "_operator": op2 (int32),
    "_value": value2
    },
    }
[out]iteratorThe iterator which can be used later for backend_iterate
Returns
TRUE on success, FALSE otherwise.

◆ backend_read

gboolean(* JBackend::backend_read) (gpointer, gpointer, gpointer, guint64, guint64, guint64 *)

◆ backend_schema_create

gboolean(* JBackend::backend_schema_create) (gpointer, gpointer, gchar const *, bson_t const *, GError **)

Create a schema

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to create (e.g., "files")
[in]schemaThe schema structure to create. Points to:
  • An initialized BSON containing "structure"
    structure
    {
    "var_name1": var_type1 (int32),
    "var_name2": var_type2 (int32),
    "var_nameN": var_typeN (int32),
    "_indexes": [["var_name1", "var_name2"], ["var_name3"]]
    }
Returns
TRUE on success, FALSE otherwise.

◆ backend_schema_delete

gboolean(* JBackend::backend_schema_delete) (gpointer, gpointer, gchar const *, GError **)

Delete a schema

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to delete (e.g., "files")
Returns
TRUE on success, FALSE otherwise.

◆ backend_schema_get

gboolean(* JBackend::backend_schema_get) (gpointer, gpointer, gchar const *, bson_t *, GError **)

Obtains information about a schema

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to open (e.g., "files")
[out]schemaThe schema information initially points to:
  • An allocated, uninitialized BSON
  • NULL
    {
    "_id": id (int64),
    "var_name1": var_type1 (int32),
    "var_name2": var_type2 (int32),
    "var_nameN": var_typeN (int32)
    }
Returns
TRUE on success, FALSE otherwise.

◆ backend_status

gboolean(* JBackend::backend_status) (gpointer, gpointer, gint64 *, guint64 *)

◆ backend_sync

gboolean(* JBackend::backend_sync) (gpointer, gpointer)

◆ backend_update

gboolean(* JBackend::backend_update) (gpointer, gpointer, gchar const *, bson_t const *, bson_t const *, GError **)

Updates data

Parameters
[in]namespaceDifferent use cases (e.g., "adios", "hdf5")
[in]nameSchema name to delete (e.g., "files")
[in]selectorThe selector to decide which data should be updated. Points to:
  • An initialized BSON containing "selector_part"
    selector_part
    {
    "_mode": mode (int32)
    "0": {
    "_name": name1 (utf8),
    "_operator": op1 (int32),
    "_value": value1
    },
    "4": selector_part (document),
    "N": {
    "_name": name2 (utf8),
    "_operator": op2 (int32),
    "_value": value2
    }
    }
[in]metadataThe data to write.
{
"var_name1": value1,
"var_name2": value2,
"var_nameN": valueN
}
Returns
TRUE on success, FALSE otherwise.

◆ backend_write

gboolean(* JBackend::backend_write) (gpointer, gpointer, gconstpointer, guint64, guint64, guint64 *)

◆ component

JBackendComponent JBackend::component

◆ data

gpointer JBackend::data

◆ 

struct { ... } JBackend::db

◆ flags

JBackendFlags JBackend::flags

◆ 

struct { ... } JBackend::kv

◆ 

struct { ... } JBackend::object

◆ type

JBackendType JBackend::type

The documentation for this struct was generated from the following file: