Implement a storage object for a group of related observation data. More...
#include <dballe/core/error.h>
#include <dballe/core/var.h>
Go to the source code of this file.
Typedefs | |
typedef enum _dba_keyword | dba_keyword |
typedef struct _dba_record * | dba_record |
Opaque structure representing a DBALLE record. | |
typedef struct _dba_item * | dba_record_cursor |
Opaque structure representing a cursor used to iterate a dba_record. | |
Enumerations | |
enum | _dba_keyword { DBA_KEY_ERROR = -1, DBA_KEY_PRIORITY = 0, DBA_KEY_PRIOMAX = 1, DBA_KEY_PRIOMIN = 2, DBA_KEY_REP_COD = 3, DBA_KEY_REP_MEMO = 4, DBA_KEY_ANA_ID = 5, DBA_KEY_MOBILE = 6, DBA_KEY_IDENT = 7, DBA_KEY_LAT = 8, DBA_KEY_LON = 9, DBA_KEY_LATMAX = 10, DBA_KEY_LATMIN = 11, DBA_KEY_LONMAX = 12, DBA_KEY_LONMIN = 13, DBA_KEY_YEAR = 14, DBA_KEY_MONTH = 15, DBA_KEY_DAY = 16, DBA_KEY_HOUR = 17, DBA_KEY_MIN = 18, DBA_KEY_SEC = 19, DBA_KEY_YEARMAX = 20, DBA_KEY_YEARMIN = 21, DBA_KEY_MONTHMAX = 22, DBA_KEY_MONTHMIN = 23, DBA_KEY_DAYMAX = 24, DBA_KEY_DAYMIN = 25, DBA_KEY_HOURMAX = 26, DBA_KEY_HOURMIN = 27, DBA_KEY_MINUMAX = 28, DBA_KEY_MINUMIN = 29, DBA_KEY_SECMAX = 30, DBA_KEY_SECMIN = 31, DBA_KEY_LEVELTYPE1 = 32, DBA_KEY_L1 = 33, DBA_KEY_LEVELTYPE2 = 34, DBA_KEY_L2 = 35, DBA_KEY_PINDICATOR = 36, DBA_KEY_P1 = 37, DBA_KEY_P2 = 38, DBA_KEY_VAR = 39, DBA_KEY_VARLIST = 40, DBA_KEY_CONTEXT_ID = 41, DBA_KEY_QUERY = 42, DBA_KEY_ANA_FILTER = 43, DBA_KEY_DATA_FILTER = 44, DBA_KEY_ATTR_FILTER = 45, DBA_KEY_LIMIT = 46, DBA_KEY_VAR_RELATED = 47, DBA_KEY_COUNT = 48 } |
Keyword used to quickly access context and query information from a record. | |
Functions | |
const char * | dba_record_keyword_name (dba_keyword keyword) |
Return the name of a dba_keyword. | |
dba_err | dba_record_keyword_info (dba_keyword keyword, dba_varinfo *info) |
Return informations about a keyword. | |
dba_keyword | dba_record_keyword_byname (const char *tag) |
Get the dba_keyword corresponding to the given name. | |
dba_keyword | dba_record_keyword_byname_len (const char *tag, int len) |
Get the dba_keyword corresponding to the given name. | |
dba_err | dba_record_create (dba_record *rec) |
Create a new record. | |
void | dba_record_delete (dba_record rec) |
Delete an existing record, freeing all the resources used by it. | |
void | dba_record_clear (dba_record rec) |
Remove all data from the record. | |
void | dba_record_clear_vars (dba_record rec) |
Remove all variables from the record, leaving the keywords intact. | |
dba_err | dba_record_copy (dba_record dest, dba_record source) |
Copy all data from the record source into dest. | |
dba_err | dba_record_add (dba_record dest, dba_record source) |
Copy all data from the record source into dest. | |
dba_err | dba_record_difference (dba_record dest, dba_record source1, dba_record source2) |
Copy in dest only those fields that change source1 into source2. | |
int | dba_record_equals (dba_record rec1, dba_record rec2) |
Check if two records have the same content. | |
dba_var | dba_record_key_peek (dba_record rec, dba_keyword parameter) |
Look at the value of a parameter, as dba_var. | |
dba_var | dba_record_var_peek (dba_record rec, dba_varcode code) |
Look at the value of a parameter, as dba_var. | |
const char * | dba_record_key_peek_value (dba_record rec, dba_keyword parameter) |
Look at the raw value of a keyword in the record, without raising errors. | |
const char * | dba_record_var_peek_value (dba_record rec, dba_varcode code) |
Look at the raw value of a variable in the record, without raising errors. | |
dba_err | dba_record_contains (dba_record rec, const char *name, int *found) |
Check if a keyword or value is set. | |
dba_err | dba_record_contains_key (dba_record rec, dba_keyword parameter, int *found) |
Check if a keyword is set. | |
dba_err | dba_record_contains_var (dba_record rec, dba_varcode code, int *found) |
Check if a variable is set. | |
dba_err | dba_record_enq (dba_record rec, const char *name, dba_var *var) |
Get the value of an item, as dba_var. | |
dba_err | dba_record_key_enq (dba_record rec, dba_keyword parameter, dba_var *var) |
Get the value of a parameter, as dba_var. | |
dba_err | dba_record_var_enq (dba_record rec, dba_varcode code, dba_var *var) |
Get the value of a parameter, as dba_var. | |
dba_err | dba_record_enqi (dba_record rec, const char *name, int *value, int *found) |
Get the value of an item, as an unscaled integer. | |
dba_err | dba_record_key_enqi (dba_record rec, dba_keyword parameter, int *value, int *found) |
Get the value of a parameter, as an unscaled integer. | |
dba_err | dba_record_var_enqi (dba_record rec, dba_varcode code, int *value, int *found) |
Get the value of a parameter, as an unscaled integer. | |
dba_err | dba_record_enqd (dba_record rec, const char *name, double *value, int *found) |
Get the value of an item, correctly scaled, in double precision. | |
dba_err | dba_record_key_enqd (dba_record rec, dba_keyword parameter, double *value, int *found) |
Get the value of a parameter, correctly scaled, in double precision. | |
dba_err | dba_record_var_enqd (dba_record rec, dba_varcode code, double *value, int *found) |
Get the value of a parameter, correctly scaled, in double precision. | |
dba_err | dba_record_enqc (dba_record rec, const char *name, const char **value) |
Get the value of an item. | |
dba_err | dba_record_key_enqc (dba_record rec, dba_keyword parameter, const char **value) |
Get the value of a parameter. | |
dba_err | dba_record_var_enqc (dba_record rec, dba_varcode code, const char **value) |
Get the value of a parameter. | |
dba_err | dba_record_key_set (dba_record rec, dba_keyword parameter, dba_var var) |
Set the value of a parameter, from a dba_var. | |
dba_err | dba_record_var_set (dba_record rec, dba_varcode code, dba_var var) |
Set the value of a parameter, from a dba_var. | |
dba_err | dba_record_var_set_direct (dba_record rec, dba_var var) |
Set the value of a parameter, from a dba_var. | |
dba_err | dba_record_set_ana_context (dba_record rec) |
Set the date, level and timerange values to match the anagraphical context. | |
dba_err | dba_record_key_seti (dba_record rec, dba_keyword parameter, int value) |
Set the value of a parameter. | |
dba_err | dba_record_var_seti (dba_record rec, dba_varcode code, int value) |
Set the value of a parameter. | |
dba_err | dba_record_key_setd (dba_record rec, dba_keyword parameter, double value) |
Set the value of a parameter, in double precision. | |
dba_err | dba_record_var_setd (dba_record rec, dba_varcode code, double value) |
Set the value of a parameter, in double precision. | |
dba_err | dba_record_key_setc (dba_record rec, dba_keyword parameter, const char *value) |
Set the value of a parameter. | |
dba_err | dba_record_var_setc (dba_record rec, dba_varcode code, const char *value) |
Set the value of a parameter. | |
dba_err | dba_record_set_from_string (dba_record rec, const char *str) |
Set a value in the record according to an assignment encoded in a string. | |
dba_err | dba_record_key_unset (dba_record rec, dba_keyword parameter) |
Remove a parameter from the record. | |
dba_err | dba_record_var_unset (dba_record rec, dba_varcode code) |
Remove a parameter from the record. | |
void | dba_record_print (dba_record rec, FILE *out) |
Print the contents of this record to the given file descriptor. | |
void | dba_record_diff (dba_record rec1, dba_record rec2, int *diffs, FILE *out) |
Print the difference between two records to an output stream. | |
dba_record_cursor | dba_record_iterate_first (dba_record rec) |
Start iterating through the values in a record. | |
dba_record_cursor | dba_record_iterate_next (dba_record rec, dba_record_cursor cur) |
Continue iterating through the values in a record. | |
dba_var | dba_record_cursor_variable (dba_record_cursor cur) |
Get the variable pointed by a dba_record_cursor. | |
dba_err | dba_record_parse_date_extremes (dba_record rec, int *minvalues, int *maxvalues) |
Parse the date extremes set in the dba_record. |
Implement a storage object for a group of related observation data.
typedef enum _dba_keyword dba_keyword |
Keyword used to quickly access context and query information from a record.
typedef struct _dba_record* dba_record |
Opaque structure representing a DBALLE record.
A DBALLE record is a container for one observation of meteorological value, that includes anagraphical informations, physical location of the observation in time and space, and all the observed variables.
This object is created with dba_record_create() and deleted with dba_record_delete().
typedef struct _dba_item* dba_record_cursor |
Opaque structure representing a cursor used to iterate a dba_record.
This object is a pointer to internal structures that does not need to be explicitly created or deallocated.
dba_err dba_record_add | ( | dba_record | dest, |
dba_record | source | ||
) |
Copy all data from the record source into dest.
At the end of the function, dest will contain its previous values, plus the values in source. If a value is present both in source and in dest, the one in dest will be overwritten.
dest | The record to copy data into. |
source | The record to copy data from. |
References DBA_RUN_OR_RETURN.
void dba_record_clear | ( | dba_record | rec ) |
Remove all data from the record.
rec | The record to empty. |
void dba_record_clear_vars | ( | dba_record | rec ) |
Remove all variables from the record, leaving the keywords intact.
rec | The record to operate on. |
dba_err dba_record_contains | ( | dba_record | rec, |
const char * | name, | ||
int * | found | ||
) |
Check if a keyword or value is set.
rec | The record to get the value from. |
name | The name of the item to check. |
found | true if the record contains a value for the parameter, else false. |
References dba_error_notfound, dba_record_keyword_byname(), and DBA_STRING_TO_VAR.
dba_err dba_record_contains_key | ( | dba_record | rec, |
dba_keyword | parameter, | ||
int * | found | ||
) |
Check if a keyword is set.
rec | The record to get the value from. |
parameter | The key to check. |
found | true if the record contains a value for the parameter, else false. |
References dba_error_notfound.
dba_err dba_record_contains_var | ( | dba_record | rec, |
dba_varcode | code, | ||
int * | found | ||
) |
Check if a variable is set.
rec | The record to get the value from. |
code | The variable to check. |
found | true if the record contains a value for the parameter, else false. |
dba_err dba_record_copy | ( | dba_record | dest, |
dba_record | source | ||
) |
Copy all data from the record source into dest.
At the end of the function, dest will contain the same data as source.
dest | The record to copy data into. |
source | The record to copy data from. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_create | ( | dba_record * | rec ) |
Create a new record.
rec | The record variable to initialize. |
dba_var dba_record_cursor_variable | ( | dba_record_cursor | cur ) |
Get the variable pointed by a dba_record_cursor.
cur | The cursor returned by dba_record_iterate_first or dba_record_iterate_next |
void dba_record_delete | ( | dba_record | rec ) |
Delete an existing record, freeing all the resources used by it.
rec | The record to delete. |
void dba_record_diff | ( | dba_record | rec1, |
dba_record | rec2, | ||
int * | diffs, | ||
FILE * | out | ||
) |
Print the difference between two records to an output stream.
If there is no difference, it does not print anything.
rec1 | The first record to compare |
rec2 | The second record to compare |
diffs | Incremented by 1 if the variables differ |
out | The output stream to use for printing |
dba_err dba_record_difference | ( | dba_record | dest, |
dba_record | source1, | ||
dba_record | source2 | ||
) |
Copy in dest only those fields that change source1 into source2.
If a field has been deleted from source1 to source2, it will not be copied in dest.
dest | The record to copy data into. |
source1 | The original record to compute the changes from. |
source2 | The new record that has changes over source1. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_enq | ( | dba_record | rec, |
const char * | name, | ||
dba_var * | var | ||
) |
Get the value of an item, as dba_var.
rec | The record to get the value from. |
name | The name of the item to get the value for. |
var | A copy of the internal dba_var with the parameter. You need to deallocate it with dba_var_delete(). |
References dba_error_notfound, dba_record_keyword_byname(), DBA_RUN_OR_RETURN, and DBA_STRING_TO_VAR.
dba_err dba_record_enqc | ( | dba_record | rec, |
const char * | name, | ||
const char ** | value | ||
) |
Get the value of an item.
The function will return a string representation of the uncaled number if the value is a number instead of a string.
rec | The record to get the value from. |
name | The name of the item to get the value for. |
value | The variable where the value, if found, should be stored. It will be set to NULL if the value is unset. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_enqd | ( | dba_record | rec, |
const char * | name, | ||
double * | value, | ||
int * | found | ||
) |
Get the value of an item, correctly scaled, in double precision.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
name | The name of the item to get the value for. |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_enqi | ( | dba_record | rec, |
const char * | name, | ||
int * | value, | ||
int * | found | ||
) |
Get the value of an item, as an unscaled integer.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
name | The name of the item to get the value for. |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
int dba_record_equals | ( | dba_record | rec1, |
dba_record | rec2 | ||
) |
Check if two records have the same content.
rec1 | The first record to compare |
rec2 | The second record to compare |
dba_record_cursor dba_record_iterate_first | ( | dba_record | rec ) |
Start iterating through the values in a record.
rec | The record to iterate on. |
dba_record_cursor dba_record_iterate_next | ( | dba_record | rec, |
dba_record_cursor | cur | ||
) |
Continue iterating through the values in a record.
rec | The record to iterate on. |
cur | The cursor returned by dba_record_iterate_first or dba_record_iterate_next |
dba_err dba_record_key_enq | ( | dba_record | rec, |
dba_keyword | parameter, | ||
dba_var * | var | ||
) |
Get the value of a parameter, as dba_var.
rec | The record to get the value from. |
parameter | The parameter to get the value for. |
var | A copy of the internal dba_var with the parameter. You need to deallocate it with dba_var_delete(). |
References DBA_RUN_OR_RETURN.
dba_err dba_record_key_enqc | ( | dba_record | rec, |
dba_keyword | parameter, | ||
const char ** | value | ||
) |
Get the value of a parameter.
The function will return a string representation of the uncaled number if the value is a number instead of a string.
rec | The record to get the value from. |
parameter | The parameter to get the value for. |
value | The variable where the value, if found, should be stored. It will be set to NULL if the value is unset. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_key_enqd | ( | dba_record | rec, |
dba_keyword | parameter, | ||
double * | value, | ||
int * | found | ||
) |
Get the value of a parameter, correctly scaled, in double precision.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
parameter | The parameter to get the value for. |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_key_enqi | ( | dba_record | rec, |
dba_keyword | parameter, | ||
int * | value, | ||
int * | found | ||
) |
Get the value of a parameter, as an unscaled integer.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
parameter | The parameter to get the value for. |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
dba_var dba_record_key_peek | ( | dba_record | rec, |
dba_keyword | parameter | ||
) |
Look at the value of a parameter, as dba_var.
rec | The record to get the value from. |
parameter | The parameter to get the value for. |
const char* dba_record_key_peek_value | ( | dba_record | rec, |
dba_keyword | parameter | ||
) |
Look at the raw value of a keyword in the record, without raising errors.
rec | The record to get the value from. |
parameter | The keyword to get the value for. |
dba_err dba_record_key_set | ( | dba_record | rec, |
dba_keyword | parameter, | ||
dba_var | var | ||
) |
Set the value of a parameter, from a dba_var.
If dba_var has a value for a different parameter, it will be converted.
rec | The record where the value is to be set. |
parameter | The parameter to set the value for. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
var | A the dba_var with the parameter which will be copied inside the record. The record will copy the variable and will not take ownership of it: memory management will remain in charge of the caller. |
References dba_error_notfound, and DBA_RUN_OR_RETURN.
dba_err dba_record_key_setc | ( | dba_record | rec, |
dba_keyword | parameter, | ||
const char * | value | ||
) |
Set the value of a parameter.
rec | The record where the value is to be set. |
parameter | The parameter to set the value for. |
value | The value to set. If the parameter is numeric, value will be taken as a string representing the unscaled integer with the value. |
References dba_error_notfound.
dba_err dba_record_key_setd | ( | dba_record | rec, |
dba_keyword | parameter, | ||
double | value | ||
) |
Set the value of a parameter, in double precision.
The function will fail if the keyword is a string instead of a number.
rec | The record where the value is to be set. |
parameter | The parameter to set the value for. |
value | The value to set. |
References dba_error_notfound.
dba_err dba_record_key_seti | ( | dba_record | rec, |
dba_keyword | parameter, | ||
int | value | ||
) |
Set the value of a parameter.
The function will fail if the keyword is a string instead of a number.
rec | The record where the value is to be set. |
parameter | The parameter to set the value for. |
value | The value to set, as an unscaled integer. |
References dba_error_notfound.
dba_err dba_record_key_unset | ( | dba_record | rec, |
dba_keyword | parameter | ||
) |
Remove a parameter from the record.
rec | The record where the value is to be set. |
parameter | The parameter to remove. |
References dba_error_notfound.
dba_keyword dba_record_keyword_byname | ( | const char * | tag ) |
Get the dba_keyword corresponding to the given name.
tag | The name to query. |
References dba_record_keyword_byname().
Referenced by dba_record_contains(), dba_record_enq(), and dba_record_keyword_byname().
dba_keyword dba_record_keyword_byname_len | ( | const char * | tag, |
int | len | ||
) |
Get the dba_keyword corresponding to the given name.
tag | The name to query. |
len | The length of the name in tag. |
References dba_record_keyword_byname_len().
Referenced by dba_record_keyword_byname_len(), and dba_record_set_from_string().
dba_err dba_record_keyword_info | ( | dba_keyword | keyword, |
dba_varinfo * | info | ||
) |
Return informations about a keyword.
keyword | The keyword to look for informations about |
info | The dba_varinfo structure with the informations. |
References dba_error_notfound.
const char* dba_record_keyword_name | ( | dba_keyword | keyword ) |
Return the name of a dba_keyword.
keyword | The keyword to get the name for |
References dba_record_keyword_name().
Referenced by dba_record_keyword_name().
dba_err dba_record_parse_date_extremes | ( | dba_record | rec, |
int * | minvalues, | ||
int * | maxvalues | ||
) |
Parse the date extremes set in the dba_record.
This function will examine the values yearmin, monthmin, daymin, hourmin, minumin, secmin, yearmax, monthmax, daymax, hourmax, minumax, secmax, year, month, day, hour, min and sec, and will compute the two datetime extremes that bound the interval they represent.
rec | The record that holds the datetime specifications |
minvalues | An array of 6 integers that will be filled with the minimum year, month, day, hour, minute and seconds. |
maxvalues | An array of 6 integers that will be filled with the maximum year, month, day, hour, minute and seconds. |
References dba_error_consistency, and _dba_varinfo::desc.
void dba_record_print | ( | dba_record | rec, |
FILE * | out | ||
) |
Print the contents of this record to the given file descriptor.
rec | The record to print |
out | The output file descriptor |
dba_err dba_record_set_ana_context | ( | dba_record | rec ) |
Set the date, level and timerange values to match the anagraphical context.
rec | The record where the value is to be set. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_set_from_string | ( | dba_record | rec, |
const char * | str | ||
) |
Set a value in the record according to an assignment encoded in a string.
String can use keywords, aliases and varcodes. Examples: ana_id=3, name=Bologna, B12012=32.4
rec | The record where the value is to be set. |
str | The string containing the assignment. |
References dba_error_consistency, dba_error_notfound, dba_record_keyword_byname_len(), DBA_RUN_OR_RETURN, DBA_STRING_TO_VAR, and _dba_varinfo::is_string.
dba_err dba_record_var_enq | ( | dba_record | rec, |
dba_varcode | code, | ||
dba_var * | var | ||
) |
Get the value of a parameter, as dba_var.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
var | A copy of the internal dba_var with the parameter. You need to deallocate it with dba_var_delete(). |
References DBA_RUN_OR_RETURN.
dba_err dba_record_var_enqc | ( | dba_record | rec, |
dba_varcode | code, | ||
const char ** | value | ||
) |
Get the value of a parameter.
The function will return a string representation of the uncaled number if the value is a number instead of a string.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
value | The variable where the value, if found, should be stored. It will be set to NULL if the value is unset. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_var_enqd | ( | dba_record | rec, |
dba_varcode | code, | ||
double * | value, | ||
int * | found | ||
) |
Get the value of a parameter, correctly scaled, in double precision.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_var_enqi | ( | dba_record | rec, |
dba_varcode | code, | ||
int * | value, | ||
int * | found | ||
) |
Get the value of a parameter, as an unscaled integer.
The function will fail if the value is a string instead of a number.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
value | The variable where the value, if found, should be stored. |
found | 1 if the value is set, 0 otherwise. |
References DBA_RUN_OR_RETURN.
dba_var dba_record_var_peek | ( | dba_record | rec, |
dba_varcode | code | ||
) |
Look at the value of a parameter, as dba_var.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
const char* dba_record_var_peek_value | ( | dba_record | rec, |
dba_varcode | code | ||
) |
Look at the raw value of a variable in the record, without raising errors.
rec | The record to get the value from. |
code | The variable to get the value for. See vartable.h |
dba_err dba_record_var_set | ( | dba_record | rec, |
dba_varcode | code, | ||
dba_var | var | ||
) |
Set the value of a parameter, from a dba_var.
If dba_var has a value for a different parameter, it will be converted.
rec | The record where the value is to be set. |
code | The variable to set the value for. See vartable.h |
var | A the dba_var with the parameter which will be copied inside the record. The record will copy the variable and will not take ownership of it: memory management will remain in charge of the caller. |
References DBA_RUN_OR_GOTO.
dba_err dba_record_var_set_direct | ( | dba_record | rec, |
dba_var | var | ||
) |
Set the value of a parameter, from a dba_var.
rec | The record where the value is to be set. |
var | A the dba_var with the parameter which will be copied inside the record. The record will copy the variable and will not take ownership of it: memory management will remain in charge of the caller. |
References DBA_RUN_OR_RETURN.
dba_err dba_record_var_setc | ( | dba_record | rec, |
dba_varcode | code, | ||
const char * | value | ||
) |
Set the value of a parameter.
rec | The record where the value is to be set. |
code | The variable to set the value for. See vartable.h |
value | The value to set. If the parameter is numeric, value will be taken as a string representing the unscaled integer with the value. |
References DBA_RUN_OR_GOTO, and DBA_RUN_OR_RETURN.
dba_err dba_record_var_setd | ( | dba_record | rec, |
dba_varcode | code, | ||
double | value | ||
) |
Set the value of a parameter, in double precision.
The function will fail if the variable is a string instead of a number.
rec | The record where the value is to be set. |
code | The variable to set the value for. See vartable.h |
value | The value to set. |
References DBA_RUN_OR_GOTO, and DBA_RUN_OR_RETURN.
dba_err dba_record_var_seti | ( | dba_record | rec, |
dba_varcode | code, | ||
int | value | ||
) |
Set the value of a parameter.
The function will fail if the variable is a string instead of a number.
rec | The record where the value is to be set. |
code | The variable to set the value for. See vartable.h |
value | The value to set, as an unscaled integer. |
References DBA_RUN_OR_GOTO, and DBA_RUN_OR_RETURN.
dba_err dba_record_var_unset | ( | dba_record | rec, |
dba_varcode | code | ||
) |
Remove a parameter from the record.
rec | The record where the value is to be set. |
code | The variable to remove. See vartable.h |