An introduction to the schema-related APIs in the header file c8messages.h, including their purposes and parameters.
Parameters:
Returns: The number of columns in the schema.
Parameters:
ptr: A pointer to a schema object.
col_ndx: Indicates which column to get the info for. Note that column indexes are 0-based, not 1-based.
Returns: The type of information contained in that column. This is one of the enumerated data types defined for C8_TYPES; see c8types.h for details. The function returns C8_INVALID if col_ndx is out of range or if another error occurs.
Parameters:
ptr: A pointer to a schema object.
i_fieldname: The name of the field for which you want the data type.
Returns: The type of information contained in that column. This is one of the enumerated data types defined for C8_TYPES; see c8types.h for details. The function returns C8_INVALID if col_ndx is out of range or if another error occurs.
Parameters:
ptr: A pointer to a schema object.
col_num: The index of the column you want the information for.
Returns: The name of the column. The return value is a pointer. Do not change the memory that the pointer points to, or C8Free() this pointer. The returned pointer is valid as long as the schema pointer is valid.
Parameters:
ptr: A pointer to a schema object.
col_name: The name of the column for which you want the info.
o_ndx: A pointer to a C8UInt that can hold the column number.
Returns: C8_OK if successful, C8_FAIL otherwise.
Parameters: none.
Returns: A new schema pointer, or NULL if there was an error.
Parameters:
i_schema: The schema you want to add a column to.
i_type: The data type of the new column.
i_name: The name of the new column.
Returns: C8_OK if success, C8_FAIL otherwise.
Parameters:
i_filename: The name of the file from which to read the schema.
Returns: Returns a pointer to the schema if successful, NULL otherwise. When you are done using the schema, the returned pointer must be freed with a call to C8SchemaDestroy().
Parameters:
i_str: The string from which to read the schema.
Returns: A pointer to the schema if successful, NULL otherwise. When you are done using the schema, the returned pointer must be freed with a call to C8SchemaDestroy().
Parameters:
i_schema: A pointer to the schema to destroy.
Returns: Nothing.
Parameters:
i_s: A pointer to a schema.
o_buf: A pointer that can be set to point to a string containing the XML representation of the schema.
Returns: C8_OK if success, C8_FAIL otherwise (in which case o_buf is unchanged).
Parameters:
i_s: A pointer to the schema.
i_fn: The name of the file to write the schema to.
Returns: C8_OK if success, C8_FAIL otherwise.
Parameters:
i_s1: First schema.
i _ s2: Second schema.
Returns: C8_TRUE if the schemas are identical, C8_FALSE otherwise.