[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 sort()
 Physically reorder a database
------------------------------------------------------------------------------
 Prototype

     ERRCODE sort(
                    AREAP wa,
                    LPDBSORTINFO lpdbSortInfo
                  )

 Arguments

     wa is a pointer to self.

     lpdbSortInfo is a pointer to a structure containing information on
     how to sort the work area table.

 Description

     sort() performs a physical reordering of the database by copying records
     from the current work area to another database file in sorted order as
     specified in lpdbSortInfo.  sort() performs as much of its operation as
     possible in memory, then it spools to a uniquely named temporary disk
     file.  This temporary file can be as large as the size of the source
     database file.  It then overwrites the original database with the newly
     sorted data.

 Default Behavior

     You must implement the default behavior of this method through a
     subclass.

 Implementation Notes

     .  Since a sort operation must traverse the entire data store,
        the buffer for the current work area must call goCold() before any
        sort()  operation can take place.  Further, in a shared environment,
        you can only implement this method after the proper locks are
        established.

 Files  Header file is Rdd.api.


See Also: AREA DBSORTINFO goCold()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson