#include <dballe/db/internals.h>
Go to the source code of this file.
Data Structures | |
struct | _dba_db_context |
Precompiled query to manipulate the context table. More... | |
Typedefs | |
typedef struct _dba_db_context * | dba_db_context |
Precompiled query to manipulate the context table. | |
Functions | |
dba_err | dba_db_context_create (dba_db db, dba_db_context *ins) |
Create a new dba_db_context. | |
void | dba_db_context_delete (dba_db_context ins) |
Deletes a dba_db_context. | |
dba_err | dba_db_context_get_id (dba_db_context ins, int *id) |
Get the context id for the context data previously set in ins. | |
dba_err | dba_db_context_get_data (dba_db_context ins, int id) |
Get context information given a context ID. | |
dba_err | dba_db_context_obtain_ana (dba_db_context ins, int *id) |
Get the context id for a pseudoana info context. | |
dba_err | dba_db_context_insert (dba_db_context ins, int *id) |
Insert a new context in the database. | |
dba_err | dba_db_context_remove (dba_db_context ins) |
Remove a context record. |
dba_err dba_db_context_create | ( | dba_db | db, | |
dba_db_context * | ins | |||
) |
Create a new dba_db_context.
db | The dba_db this dba_db_context will access |
ins | The newly created dba_db_context (it will need to be deallocated wth dba_db_context_delete()) |
void dba_db_context_delete | ( | dba_db_context | ins | ) |
dba_err dba_db_context_get_data | ( | dba_db_context | ins, | |
int | id | |||
) |
Get context information given a context ID.
ins | dba_db_context to query | |
id | ID of the context to query |
dba_err dba_db_context_get_id | ( | dba_db_context | ins, | |
int * | id | |||
) |
Get the context id for the context data previously set in ins.
ins | The dba_db_context structure, with parameters filled in for the query |
id | The database ID, or -1 if no existing context entry matches the given values |
dba_err dba_db_context_insert | ( | dba_db_context | ins, | |
int * | id | |||
) |
Insert a new context in the database.
ins | The dba_db_context structure with all the input fields filled in. |
id | The ID of the newly inserted context |
dba_err dba_db_context_obtain_ana | ( | dba_db_context | ins, | |
int * | id | |||
) |
Get the context id for a pseudoana info context.
ins | The dba_db_context structure, with id_ana and id_report filled in for the query. If id_report is filled with -1, it gets replaced with the report code for pseudoana information. |
id | The database ID |
dba_err dba_db_context_remove | ( | dba_db_context | ins | ) |
Remove a context record.
ins | The dba_db_context structure, with id filled with the id of the context to remove. |