NAME
hyle/field.h - Field descriptors and validation metadata.
SYNOPSIS
#include <stddef.h>
#include <stdint.h>
Data Structures
Per-field descriptor and validation constraints.
Enumerations
Storage and matching category of a hyle field.
Functions
Find a field descriptor by name.
Test whether a field type is a reference category.
Detailed Description
Field descriptors and validation metadata.
Declares the field types a hyle source can expose, plus the per-field constraints used by filtering, purification and schema hints.
Enumeration Type Documentation
enum hyle_field_type_t
Storage and matching category of a hyle field.
Enumerator
- HYLE_FIELD_STRING
- Plain string value.
- HYLE_FIELD_INT
- Integer value.
- HYLE_FIELD_BOOL
- Boolean value.
- HYLE_FIELD_NULLABLE_STRING
- String value that may be absent.
- HYLE_FIELD_REFERENCE
- Single reference to a row of another source.
- HYLE_FIELD_MULTI_REFERENCE
- Newline-separated list of references to another source.
- HYLE_FIELD_INVERSE
- Virtual inverse relation over a foreign reference field.
- HYLE_FIELD_DERIVED
- Derived value computed by a registered derive provider.
Function Documentation
const hyle_field_t * hyle_field_by_name (const hyle_field_t * fields, size_t field_count, const char * name)
Find a field descriptor by name.
Parameters
fields Array of field descriptors.
field_count Number of entries in fields.
name Field name to look up.
Returns
Pointer to the matching descriptor, or NULL when not found.
int hyle_field_is_reference (hyle_field_type_t type)
Test whether a field type is a reference category. Returns non-zero for HYLE_FIELD_REFERENCE, HYLE_FIELD_MULTI_REFERENCE and HYLE_FIELD_INVERSE.
Parameters
type Field type to test.
Returns
1 for reference categories, 0 otherwise.
Author
Generated automatically by Doxygen for libhyle from the source code.