Once the database is opened and a connection established, the application can begin performing read and write storage operations as demonstrated in SDK sample
. To perform any storage operation, the application must first start a database transaction by calling function
samples/native/core/04_operations
mco_trans_start()
. Once a transaction is opened, the transaction handle is passed to the generatedclassname_new()
function to create a new instance of the object in the database. The object’s handle is used for the generatedclassname_fieldname_get()
andclassname_fieldname_put()
operations to insert values into the object. The new values are stored in the database whenmco_trans_commit()
is called with the transaction handle.