Commit all binary member values in this, and any subclass objects, to the supplied binary datum repository. It is expected that the binary datum repository will that of the data object repository, this object is to be placed in (either in an INSERT or UPDATE operation). With binary members the litmus bit is only set by SetBinary(), which places a binary datum (presumed to be a new binary datum), in the member's core space. It is not set by retrieving the binary from a binary datum repository. In other words, the litmus bit is set if there is a new value, and not otherwise. This function checks the litmus bit before committing the datum to the target binary datum repository. Once the commit is done, the address (binary datum id), is placed in the in member's aux core space, from where it is used in the export of deltas and EDOs.

Return TypeFunction nameArguments
hzEcodehdbObject::CommitBinaries(hdbBinRepos*,)

Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp

Function Logic:

0:START 1:unknown 2:items 3:unknown 4:Return hzerr(E_NOINIT,No target binary datum repository) 5:unknown 6:Return hzerr(E_ARGUMENT,No data class) 7:unknown 8:Return E_OK 9:rc 10:Return rc

Function body:

hzEcode hdbObject::CommitBinaries (hdbBinRepos* pRepos)
{
   //  Commit all binary member values in this, and any subclass objects, to the supplied binary datum repository. It is expected that the binary datum repository will that of the
   //  data object repository, this object is to be placed in (either in an INSERT or UPDATE operation).
   //  
   //  With binary members the litmus bit is only set by SetBinary(), which places a binary datum (presumed to be a new binary datum), in the member's core space. It is not set by
   //  retrieving the binary from a binary datum repository. In other words, the litmus bit is set if there is a new value, and not otherwise.
   //  
   //  This function checks the litmus bit before committing the datum to the target binary datum repository. Once the commit is done, the address (binary datum id), is placed in
   //  the in member's aux core space, from where it is used in the export of deltas and EDOs.
   //  
   //  Arguments: 1) pMbr The member
   //     2) pRepos The target binary datum repository
   //  
   //  Returns: E_NOINIT If the object has not been initialized to a class
   //     E_ARGUMENT If no member is supplied
   //     E_CORRUPT If the supplied member number does not identify an object class member.
   //     E_TYPE  If the object class member is not atomic (is another class) or if the supplied atom has the wrong type.
   //     E_OK  If the object class member has been set to the supplied atom value.
   _hzfunc("hdbObject::CommitBinaries") ;
   hzEcode     rc = E_OK ; //  Return code
   if (!this)      hzexit(E_CORRUPT, "No instance") ;
   if (!pRepos)    return hzerr(E_NOINIT, "No target binary datum repository") ;
   if (!m_pClass)  return hzerr(E_ARGUMENT, "No data class") ;
   if (!m_pRoot)
       return E_OK ;
   rc = _commit_binaries_r(m_pRepos, pRepos, m_pRoot) ;
   //  threadLog("returned from commit_br\n") ;
   return rc ;
}