Diffusion C API  6.3.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
diffusion-recordv2-schema-field.h File Reference

Typedefs

typedef struct
DIFFUSION_RECORDV2_SCHEMA_FIELD_T 
DIFFUSION_RECORDV2_SCHEMA_FIELD_T
 Opaque recordv2 schema field data type.
 

Functions

bool diffusion_recordv2_schema_field_get_type (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, DIFFUSION_RECORDV2_FIELD_TYPE_T *field_type, DIFFUSION_API_ERROR *error)
 Retrieves the field type. More...
 
bool diffusion_recordv2_schema_field_get_scale (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, int *scale, DIFFUSION_API_ERROR *error)
 Retrieves the scale of a DIFFUSION_RECORDV2_FIELD_TYPE_T decimal field or 0 for other types. More...
 
bool diffusion_recordv2_schema_field_get_name (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, char **field_name, DIFFUSION_API_ERROR *error)
 Retrieves the field name. More...
 
bool diffusion_recordv2_schema_field_get_min (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, int *min, DIFFUSION_API_ERROR *error)
 Retrieves minimum number of occurrences. More...
 
bool diffusion_recordv2_schema_field_get_max (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, int *max, DIFFUSION_API_ERROR *error)
 Retrieves the maximum number of occurrences. More...
 
bool diffusion_recordv2_schema_field_is_variable (const DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field, bool *is_variable, DIFFUSION_API_ERROR *error)
 Retrieves the field's variable multiplicity. More...
 
void diffusion_recordv2_schema_field_free (DIFFUSION_RECORDV2_SCHEMA_FIELD_T *schema_field)
 Free a schema field. More...
 

Function Documentation

void diffusion_recordv2_schema_field_free ( DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field)

Free a schema field.

Parameters
schema_fieldschema field to be freed
bool diffusion_recordv2_schema_field_get_max ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
int *  max,
DIFFUSION_API_ERROR error 
)

Retrieves the maximum number of occurrences.

This will be a positive value greater than or equal to the "min" value, or -1 to indicate an unlimited number.

Parameters
schema_fieldthe schema field
maxpopulated with the field's maximum number of occurrences.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the maximum was successfully retrieved from the schema_field. False, otherwise.
bool diffusion_recordv2_schema_field_get_min ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
int *  min,
DIFFUSION_API_ERROR error 
)

Retrieves minimum number of occurrences.

This may be 0 for a variable multiplicity field; otherwise, it will be a positive value.

Parameters
schema_fieldthe schema field
minpopulated with the field's minimum number of occurrences.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the minimum was successfully retrieved from the schema_field. False, otherwise.
bool diffusion_recordv2_schema_field_get_name ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
char **  field_name,
DIFFUSION_API_ERROR error 
)

Retrieves the field name.

Parameters
schema_fieldthe schema field
field_namepopulated with a pointer to the field's name. Must be freed after use.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the name of the field was successfully retrieved from the schema_field. False, otherwise.
bool diffusion_recordv2_schema_field_get_scale ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
int *  scale,
DIFFUSION_API_ERROR error 
)

Retrieves the scale of a DIFFUSION_RECORDV2_FIELD_TYPE_T decimal field or 0 for other types.

The scale represents the number of places to the right of the decimal point in a decimal number.

Parameters
schema_fieldthe schema field
scalepopulated with the field's scale
errorpopulated if an error occurs. Can be NULL.
Returns
true if the scale was successfully retrieved from the schema_field. False, otherwise.
bool diffusion_recordv2_schema_field_get_type ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
DIFFUSION_RECORDV2_FIELD_TYPE_T *  field_type,
DIFFUSION_API_ERROR error 
)

Retrieves the field type.

Parameters
schema_fieldthe schema field
field_typepopulated with the field's type
errorpopulated if an error occurs. Can be NULL.
Returns
true if the type was successfuly retrieved from the schema_field. False, otherwise.
bool diffusion_recordv2_schema_field_is_variable ( const DIFFUSION_RECORDV2_SCHEMA_FIELD_T schema_field,
bool *  is_variable,
DIFFUSION_API_ERROR error 
)

Retrieves the field's variable multiplicity.

True if the field has variable multiplicity. i.e. min != max.

Parameters
schema_fieldthe schema field
is_variablepopulated with a bool stating if the field has variable multiplicity.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the field's variable multiplicity was successfully retrieved from the schema_field False, otherwise.