mco_uda_checkpoint

Insert a new object into indexes.

Prototype

 
    MCO_RET mco_uda_checkpoint(	/*IN*/ mco_uda_object_handle_t * obj );
 

Arguments

obj The object handle

Description

This function inserts a new object into indexes. It can be called prior to a the transaction commit to allow lookups of this object within the current transaction if its index value has changed.

Return Codes

MCO_S_OK Checkpoint successful
MCO_E_UDA_STRUCT_NOT_CLASS Invalid object handle

Example

 
    Application snippet:
        
     
    int main(int argc, char* argv[])
    {
        MCO_RET rc;
        mco_db_h db;
        mco_trans_h t;
        mco_uda_object_handle_t obj;
        ...
         
         
        rc = mco_trans_start(db, MCO_READ_WRITE, MCO_TRANS_FOREGROUND, &t);
        if ( MCO_S_OK == rc )
        {
            mco_uda_new(t, struct_no, 0, 0, 0, &obj); /* create a new object */
            mco_uda_put(&obj, ...);                   /* set field values */
            mco_uda_checkpoint(&obj);                 /* insert into indexes */
        
            ...
            rc = mco_trans_commit(t);
        }
        ...
    }
     
 

Files

Header file:
mcouda.h
Source file:
mcouda.c
Library:
libmcouda.a