Database Update Functions
[Database Functions]


Functions

FLMEXP RCODE FLMAPI FlmRecordAdd (HFDB hDb, FLMUINT uiContainerNum, FLMUINT *puiDrn, FlmRecord *pRecord, FLMUINT uiAutoTrans)
 Add a record to the database.
FLMEXP RCODE FLMAPI FlmRecordModify (HFDB hDb, FLMUINT uiContainerNum, FLMUINT uiDrn, FlmRecord *pRecord, FLMUINT uiAutoTrans)
 Modify a record in the database.
FLMEXP RCODE FLMAPI FlmRecordDelete (HFDB hDb, FLMUINT uiContainerNum, FLMUINT uiDrn, FLMUINT uiAutoTrans)
 Delete a record from the database.
FLMEXP RCODE FLMAPI FlmReserveNextDrn (HFDB hDb, FLMUINT uiContainerNum, FLMUINT *puiDrn)
 Reserve the next available DRN in a database container.
FLMEXP RCODE FLMAPI FlmFindUnusedDictDrn (HFDB hDb, FLMUINT uiStartDrn, FLMUINT uiEndDrn, FLMUINT *puiDrn)
 Find an unused DRN in the dictionary.
FLMEXP RCODE FLMAPI FlmAllocBlob (FlmBlob **ppBlob)
 Allocate a BLOB object that can then be used to create a new BLOB to store in a FlmRecord object.

Function Documentation

FLMEXP RCODE FLMAPI FlmAllocBlob FlmBlob **  ppBlob  ) 
 

Allocate a BLOB object that can then be used to create a new BLOB to store in a FlmRecord object.

Parameters:
ppBlob  Pointer to newly allocated BLOB object is returned here.

FLMEXP RCODE FLMAPI FlmFindUnusedDictDrn HFDB  hDb,
FLMUINT  uiStartDrn,
FLMUINT  uiEndDrn,
FLMUINT *  puiDrn
 

Find an unused DRN in the dictionary.

Parameters:
hDb  Database handle.
uiStartDrn  Beginning of range of DRNs to look for an non-used DRN.
uiEndDrn  Ending of range of DRNs to look for a non-used DRN.
puiDrn  Unused DRN, if any, is returned here.

FLMEXP RCODE FLMAPI FlmRecordAdd HFDB  hDb,
FLMUINT  uiContainerNum,
FLMUINT *  puiDrn,
FlmRecord pRecord,
FLMUINT  uiAutoTrans
 

Add a record to the database.

Parameters:
hDb  Database handle.
uiContainerNum  Container record is to be added to.
puiDrn  On input, *puiDrn contains the DRN to be assigned to the record. If *puiDrn == 0 FLAIM will assign the DRN - it will be one higher than the highest DRN that was ever assigned in this container. In this case, *puiDrn will return the DRN that was assigned.
pRecord  Record to be added to the database. NOTE: After this record has been added to the database, the object pointed to by pRecord will have been inserted into FLAIM's record cache (unless the FLM_DONT_INSERT_IN_CACHE flag is set in the uiAutoTrans parameter). Once the object is cached, it is marked as read-only. This prevents it from being altered by the application. If the application desires to use pRecord to make subsequent modifications to the record, it must call the copy() method (FlmRecord::copy()) to obtain a writeable copy of the object.
uiAutoTrans  This is a set of flags and a timeout that can be used to accomplish the following things:
  • FLM_AUTO_TRANS - Specifies that if there is not already an update transaction going, this operation should have one auto-started and auto-committed for it. If this flag is set, the lower 8 bits of the parameter is assumed to be the timeout for obtaining the lock. A value of FLM_NO_TIMEOUT may be ORed in to specify that the operation should wait forever to obtain the database lock
  • FLM_DO_IN_BACKGROUND - This flag is only applicable when adding or modifying an index definition record in the dictionary. It specifies that the operation is to be performed in a background thread after the transaction in which this operation is performed has been committed. If the transaction aborts, no background thread will be launched
  • FLM_DONT_INSERT_IN_CACHE - This flag specifies that the record is not to be inserted into FLAIM's record cache
  • FLM_SUSPENDED - This flag is only applicable when adding or modifying an index definition record in the dictionary. It specifies that the index is to be immediately suspended after it is added or modified. This means that the index will not be populated until it is explicitly resumed by the application (see FlmIndexResume()).

FLMEXP RCODE FLMAPI FlmRecordDelete HFDB  hDb,
FLMUINT  uiContainerNum,
FLMUINT  uiDrn,
FLMUINT  uiAutoTrans
 

Delete a record from the database.

Parameters:
hDb  Database handle.
uiContainerNum  Container number the record is to be deleted from.
uiDrn  DRN of record to be deleted.
uiAutoTrans  See documentation for the uiAutoTrans parameter in the FlmRecordAdd() function. NOTE: The only flag that applies to FlmRecordDelete() is the FLM_AUTO_TRANS flag.

FLMEXP RCODE FLMAPI FlmRecordModify HFDB  hDb,
FLMUINT  uiContainerNum,
FLMUINT  uiDrn,
FlmRecord pRecord,
FLMUINT  uiAutoTrans
 

Modify a record in the database.

Parameters:
hDb  Database handle.
uiContainerNum  Container number record is to be modified in.
uiDrn  DRN of record to be modified.
pRecord  Record that is to replace the existing record. This is basically a "blind" update - this record will replace, in its entirety, the existing record. NOTE: After this record has been modified in the database, the object pointed to by pRecord will have been inserted into FLAIM's record cache (unless the FLM_DONT_INSERT_IN_CACHE flag is set in the uiAutoTrans parameter). Once the object is cached, it is marked as read-only. This prevents it from being altered by the application. If the application desires to use pRecord to make additional modifications to the record, it must call the copy() method (FlmRecord::copy()) to obtain a writeable copy of the object.
uiAutoTrans  See documentation for the uiAutoTrans parameter in the FlmRecordAdd() function.

FLMEXP RCODE FLMAPI FlmReserveNextDrn HFDB  hDb,
FLMUINT  uiContainerNum,
FLMUINT *  puiDrn
 

Reserve the next available DRN in a database container.

This allows an application to get a DRN before calling FlmRecordAdd(). It has the same effect as passing a zero into FlmRecordAdd(), except that no record is added to the database. The DRN returned from this function may then be passed into FlmRecordAdd() to assign the DRN to the record being added.

Parameters:
hDb  Database handle.
uiContainerNum  Container number the DRN is to be reserved from.
puiDrn  The reserved DRN is returned here.


Generated on Wed Oct 4 12:11:43 2006 for FLAIM by  doxygen 1.4.6