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 v5.5 - aofhaspartials() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofHasPartials()
 Determine if the specified Client Advantage Optimized Filter is still
 partially optimized
------------------------------------------------------------------------------

Syntax

     aofHasPartials( <nHandle> ) -> logical

     <nHandle>  Handle to an existing filter.

Returns

     Returns .T. if the specified filter has NOT been fully optimized.
     Returns .F. if the filter is fully optimized.

Description

     aofHasPartials() returns whether or not the specified filter has not
     been fully optimized.  When a filter is created via the
     aofCreateFilter() function, and the filter expression is not fully
     optimizable, then a partially optimized filter will result.
     aofHasPartials() will return .T. if  the filter is only partially
     optimized. A partially optimized filter can be converted to a fully
     optimized filter via the aofResolvePartial() function. If a filter
     has been converted to a fully optimized filter, then aofHasPartials()
     will return .F.

     Use this function rather than aofGetOptLevel() to determine if the
     specified filter currently is fully optimized, because
     aofGetOptLevel() returns the optimization level of the filter when
     it was CREATED. aofHasPartials() returns the CURRENT state of
     optimization of the filter.

Example

     USE customer INDEX state

     // Create a partially optimized, user-owned filter
     nHandle := aofCreateFilter( "state = 'CA' .and. lastname > 'Smith'" )

     ? aofHasPartials( nHandle )     // Returns .T.

     // Convert partially optimized filter into a fully optimized filter
     aofResolvePartial( nHandle, ;
                        { || state = 'CA' .and. lastname > 'Smith' } )

     ? aofHasPartials( nHandle )     // Returns .F.

     aofFreeFilter( nHandle )


See Also: aofGetOptLevel() aofResolvePartial() aofCreateFilter()

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