Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - aoffilterinfo() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofFilterInfo()
 Get information about a Client Advantage Optimized Filter
------------------------------------------------------------------------------

Syntax 

     aofFilterInfo( [<nHandle>] ) -> array

     <nHandle>  Optional handle to an existing filter. If a handle
     is specified, then aofFilterInfo() returns information about a
     user-owned filter. If no handle is passed, then aofFilterInfo()
     returns information about the system-owned filter.

Returns

     A single dimensional array containing information about the
     specified user-owned filter or the system-owned filter.

Description

     aofFilterInfo() returns a seven element array with information about
     a Client Advantage Optimized Filter.  The first element of the array
     contains the entire filter expression.  The second element contains
     the non-optimized part of the filter expression, if applicable.  The
     third element contains the optimization level of the filter:
     0 = not optimized, 1 = partially optimized, and 2 = fully optimized.
     The fourth element is the number of records that are in the filter.
     The fifth element is the maximum record number possible in the
     filter.  The sixth element is the filter's owner: 1 = system-owned
     filter, 2 = user-owned filter. The seventh element is the current
     record number positioned to in the filter.

     Note:  Use the following constants defined in AOF.CH to reference
     the elements of the info array:
     #define INFO_EXPR        1  // Complete filter expression
     #define INFO_NONEXPR     2  // Non-optimized part of the expression
     #define INFO_OPTLVL      3  // Optimization level: 0=None, 1=Partial,
                                 //    2=Full
     #define INFO_COUNT       4  // Number of records in filter
     #define INFO_SIZE        5  // Maximum record number possible in the
                                 //    filter
     #define INFO_OWNER       6  // Filter Owner, 1=System, 2=User
     #define INFO_POS         7  // Current record positioned to in the filter

Example

     USE Customer via "DBFCDXAX" INDEX state

     // Create a user-owned filter
     nHandle := aofCreateFilter( 'State = "CA" .and. Age = 25' )

     // Get information about the filter
     aInfo := aofFilterInfo( nHandle )

     ? "Filter information"
     ? "------------------"
     ? aInfo[ INFO_EXPR    ]      //  STATE="CA".AND.AGE=25
     ? aInfo[ INFO_NONEXPR ]      //  AGE=25
     ? aInfo[ INFO_OPTLVL  ]      //  1
     ? aInfo[ INFO_COUNT   ]      //  100
     ? aInfo[ INFO_SIZE    ]      //  10000
     ? aInfo[ INFO_OWNER   ]      //  2
     ? aInfo[ INFO_POS     ]      //  1

     // Free the user-owned filter
     aofFreeFilter( nHandle )




Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson