Diffusion C API 6.11.5
Loading...
Searching...
No Matches
diffusion-recordv2-schema.h File Reference

Schema for RecordV2. More...

Typedefs

typedef struct DIFFUSION_RECORDV2_SCHEMA_T DIFFUSION_RECORDV2_SCHEMA_T
 Opaque recordv2 schema data type.
 

Functions

DIFFUSION_RECORDV2_MUTABLE_RECORD_MODEL_Tdiffusion_recordv2_schema_create_mutable_model (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Create a mutable model based upon the schema.
 
LIST_T * diffusion_recordv2_schema_get_records (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Returns an immutable, ordered list of record definitions.
 
char * diffusion_recordv2_schema_as_json_string (const DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Returns the schema in a JSON format.
 
void diffusion_recordv2_schema_free (DIFFUSION_RECORDV2_SCHEMA_T *recordv2_schema)
 Free a recordv2 schema.
 

Detailed Description

Schema for RecordV2.

Function Documentation

◆ diffusion_recordv2_schema_as_json_string()

char * diffusion_recordv2_schema_as_json_string ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Returns the schema in a JSON format.

Parameters
recordv2_schemathe recordv2 schema.
Returns
schema in JSON string format - must be freed after use. NULL if the recordv2_schema is NULL.

◆ diffusion_recordv2_schema_create_mutable_model()

DIFFUSION_RECORDV2_MUTABLE_RECORD_MODEL_T * diffusion_recordv2_schema_create_mutable_model ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Create a mutable model based upon the schema.

The model will be created with all mandatory record occurrences and all mandatory field occurrences initialized to default values. Such a model may be mutated and used to generate updated RecordV2 occurrences for updating purposes. diffusion_recordv2_mutable_record_model_free should be called on this pointer when no longer needed.

Parameters
recordv2_schemathe recordv2 schema
Returns
a mutable recordv2 model. NULL if recordv2_schema is NULL.

◆ diffusion_recordv2_schema_free()

void diffusion_recordv2_schema_free ( DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Free a recordv2 schema.

Parameters
recordv2_schemarecordv2 schema to be freed

◆ diffusion_recordv2_schema_get_records()

LIST_T * diffusion_recordv2_schema_get_records ( const DIFFUSION_RECORDV2_SCHEMA_T recordv2_schema)

Returns an immutable, ordered list of record definitions.

There will be at least one.

Parameters
recordv2_schemathe recordv2 schema
Returns
a list of DIFFUSION_RECORDV2_SCHEMA_RECORD_Ts in the schema. NULL if the recordv2_schema is NULL.