Context table management used by the db module.
More...
#include <dballe/db/internals.h>
Go to the source code of this file.
Detailed Description
Context table management used by the db module.
Typedef Documentation
Precompiled query to manipulate the context table.
Function Documentation
Create a new dba_db_context.
- Parameters:
-
- Return values:
-
- Returns:
- The error indicator for the function (See error.h)
References _dba_db_context::date, _dba_db_context::db, DBA_RUN_OR_GOTO, _dba_db_context::dstm, _dba_db_context::id, _dba_db_context::id_ana, _dba_db_context::id_report, _dba_db_context::istm, _dba_db_context::l1, _dba_db_context::l2, _dba_db_context::ltype1, _dba_db_context::ltype2, _dba_db_context::p1, _dba_db_context::p2, _dba_db_context::pind, _dba_db_context::sdstm, _dba_db::server_type, and _dba_db_context::sstm.
Get the context id for the context data previously set in ins.
- Parameters:
-
ins | The dba_db_context structure, with parameters filled in for the query |
- Return values:
-
id | The database ID, or -1 if no existing context entry matches the given values |
- Returns:
- The error indicator for the function (See error.h)
References _dba_db_context::id, and _dba_db_context::sstm.
Get the context id for a pseudoana info context.
- Parameters:
-
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. |
- Return values:
-
- Returns:
- The error indicator for the function (See error.h)
References _dba_db_context::date, DBA_RUN_OR_RETURN, _dba_db_context::l1, _dba_db_context::l2, _dba_db_context::ltype1, _dba_db_context::ltype2, _dba_db_context::p1, _dba_db_context::p2, and _dba_db_context::pind.
Remove a context record.
- Parameters:
-
ins | The dba_db_context structure, with id filled with the id of the context to remove. |
- Returns:
- The error indicator for the function (See error.h)
References _dba_db_context::dstm.