JULEA
|
#include <julea-config.h>
#include <glib.h>
#include <string.h>
#include <bson.h>
#include <julea.h>
#include <db/jdb-internal.h>
#include <julea-db.h>
Functions | |
JDBSchema * | j_db_schema_new (gchar const *namespace, gchar const *name, GError **error) |
JDBSchema * | j_db_schema_ref (JDBSchema *schema) |
void | j_db_schema_unref (JDBSchema *schema) |
gboolean | j_db_schema_add_field (JDBSchema *schema, gchar const *name, JDBType type, GError **error) |
gboolean | j_db_schema_get_field (JDBSchema *schema, gchar const *name, JDBType *type, GError **error) |
guint32 | j_db_schema_get_all_fields (JDBSchema *schema, gchar ***names, JDBType **types, GError **error) |
gboolean | j_db_schema_add_index (JDBSchema *schema, gchar const **names, GError **error) |
gboolean | j_db_schema_create (JDBSchema *schema, JBatch *batch, GError **error) |
gboolean | j_db_schema_get (JDBSchema *schema, JBatch *batch, GError **error) |
gboolean | j_db_schema_delete (JDBSchema *schema, JBatch *batch, GError **error) |
gboolean | j_db_schema_equals (JDBSchema *schema1, JDBSchema *schema2, gboolean *equal, GError **error) |
gboolean j_db_schema_add_field | ( | JDBSchema * | schema, |
gchar const * | name, | ||
JDBType | type, | ||
GError ** | error | ||
) |
Add a field to the schema.
[in] | schema | the schema to add a field to |
[in] | name | the name of the variable to add |
[in] | type | the type of the variable to add |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
gboolean j_db_schema_add_index | ( | JDBSchema * | schema, |
gchar const ** | names, | ||
GError ** | error | ||
) |
adds an index to the given schema.
[in] | schema | the schema to add a index to |
[in] | names | the names of the variables to put into an index group |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
stores a schema in the backend.
[in] | schema | the schema to store |
[in] | batch | the batch to add this operation to |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
deletes a schema structure from the backend.
[in] | schema | the schema to delete |
[in] | batch | the batch to add this operation to |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
gboolean j_db_schema_equals | ( | JDBSchema * | schema1, |
JDBSchema * | schema2, | ||
gboolean * | equal, | ||
GError ** | error | ||
) |
compares two schema with each other.
[in] | schema1 | |
[in] | schema2 | the schema to compare with each other |
[out] | equal | TRUE if schema1 and schema2 equals |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
querys a schema structure from the backend.
[in] | schema | the schema to query |
[in] | batch | the batch to add this operation to |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
guint32 j_db_schema_get_all_fields | ( | JDBSchema * | schema, |
gchar *** | names, | ||
JDBType ** | types, | ||
GError ** | error | ||
) |
query all variables from the schema.
[in] | schema | the schema to query |
[out] | names | the names of all variables in the schema |
[out] | types | the types of all variables in the schema |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
gboolean j_db_schema_get_field | ( | JDBSchema * | schema, |
gchar const * | name, | ||
JDBType * | type, | ||
GError ** | error | ||
) |
query a variable from the schema.
[in] | schema | the schema to query |
[in] | name | the name of the variable to query |
[out] | type | the type of the queried variable |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
JDBSchema* j_db_schema_new | ( | gchar const * | namespace_, |
gchar const * | name, | ||
GError ** | error | ||
) |
Allocates a new schema.
[in] | namespace_ | the namespace of the schema |
[in] | name | the name of the schema |
[out] | error | A GError pointer. Will point to a GError object in case of failure. |
Increase the ref_count of the given schema.
[in] | schema | the schema to increase the ref_count |
void j_db_schema_unref | ( | JDBSchema * | schema | ) |
Decrease the ref_count of the given schema - and automatically call free if ref_count is 0. This is a noop if schema == NULL.
[in] | schema | the schema to decrease the ref_count |