Set the default transaction commit policy for this connection.
MCO_COMMIT_POLICY mco_disk_transaction_policy( /*IN*/ mco_db_h db, /*IN*/ MCO_COMMIT_POLICY policy);
db | The database handle that was established by mco_db_connect() |
policy |
The transaction commit policy to set for this connection |
This function sets the default transaction commit policy for this connection and returns the previous policy.
MCO_COMMIT_POLICY | The transaction policy was successfully set and the previous policy is returned |
Application snippet: const char * dbname = "SimpleDb"; int main(int argc, char* argv[]) { mco_db_h db; MCO_RET rc; mco_device_t dev[4]; mco_db_params_t db_params; MCO_COMMIT_POLICY commit_policy = MCO_COMMIT_SYNC_FLUSH; ... rc = mco_db_open_dev( dbname, simple_get_dictionary(), dev, 4, &db_params ); if ( MCO_S_OK != rc ) { ... // Explicitly set the commit policy to SYNC_FLUSH commit_policy = mco_disk_transaction_policy(db, commit_policy); ... } }