CSSM_DL_DataInsert
CSSM_DB_UNIQUE_RECORD_PTR CSSMAPI CSSM_DL_DataInsert
(CSSM_DL_DB_HANDLE DLDBHandle,
const CSSM_DB_RECORDTYPE RecordType,
const CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes,
const CSSM_DATA_PTR Data)
This function creates a new persistent data record of the specified type by inserting it into the specified data store. The values contained in the new data record are specified by the Attributes and the Data. The attribute value list contains zero or more attribute values. The DL module may require initial values for the CSSM pre-defined attributes. The DL module can assume default values for any unspecified attribute values or can return an error condition when DLM-required attribute values are not specified by the caller. The Data is an opaque object to be stored in the new data record.
- DLDBHandle (input)
The handle pair that describes the add-in data storage library module to be used to perform this function and the open data store in which to insert the new data record.
- RecordType (input)
Indicates the type of data record being added to the data store
- Attributes (input/optional)
A list of structures containing the attribute values to be stored in that attribute and the meta information (schema) describing those attributes. The list contains at most one entry per attribute in the specified record type. The DL module can assume default values for those attributes that are not assigned values by the caller, or may return an error. If the specified record type does not contain any attributes, this parameter must be NULL.
- DataRecord (input/optional)
A pointer to the CSSM_DATA structure which contains the opaque data object to be stored in the new data record. If the specified record type does not contain an opaque data object, this parameter must be NULL.
A pointer to a CSSM_DB_UNIQUE_RECORD_POINTER containing a unique identifier associated with the new record. This unique identifier structure can be used in future references to this record. When NULL is returned, an error has occurred. Use CSSM_GetError to obtain the error code.
- CSSM_DL_INVALID_DL_HANDLE
Invalid data storage library handle.
- CSSM_DL_INVALID_DB_HANDLE
Invalid Data Store handle.
- CSSM_DL_INVALID_RECORDTYPE
Invalid record type for this data store.
- CSSM_DL_INVALID_ATTRIBUTE
Invalid attribute for this record type in this data store.
- CSSM_DL_MISSING_VALUE
Missing attribute or data value for this record type.
- CSSM_DL_DATA_INSERT_FAIL
Add caused an exception.
CSSM_DL_DataDelete
Contents | Next section | Index |