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 - aofsmartfilter() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofSmartFilter()
 Get/Set the flag whether to resolve partially optimized filter records
 on the fly
------------------------------------------------------------------------------

Syntax

     aofSmartFilter( [<lResolve>] ) -> logical

     <lResolve>  Optional logical value determining whether or not
     an individual partially optimized system-owned filter record should be
     automatically resolved into a fully optimized system-owned filter
     record when that record is accessed. If <lResolve> is .T., then
     automatic filter record resolution will occur. If <lResolve> is .F.,
     then automatic filter record resolution will not occur. The default
     is .T.

Returns

     If a logical parameter is passed into this function, then returns
     the previous setting of whether automatic filter record resolution
     should take place. If no parameter is passed into this function,
     then returns the current setting of whether automatic filter record
     resolution should take place.

Description

     By default, Client Advantage Optimized Filters employs a technique known
     as smart filtering. This means that AOF "remembers" whether or not a
     record meets the system-owned filter condition. Once AOF retrieves a
     record and finds it does not meet the condition, it never again gets
     that record (technically speaking, it removes the record from the
     system-owned Client Advantage Optimized Filter).

     In almost all cases, this is desirable behavior and gives the best
     possible performance (even in cases where the condition is completely
     non-optimizable). However, in some cases involving complex relations,
     this behavior is not desirable.

     aofSmartFilter() provides control over whether or not Client AOF uses
     smart filtering with system-owned filters.

     Note:  Do not use this function or turn smart filtering off unless
     you need to.

Example

     USE customer INDEX state

     // Create a partially optimized system-owned filter
     aofSetFilter( 'state = "CA" .and. age > 25' )

     ? aofSmartFilter()         // Returns .T. (the default)

     // With smart filtering on, if the record positioned to via
     // this GO TOP operation has an age <= 25, then that record
     // will be removed from the Advantage Optimized Filter.
     GO TOP

     // With smart filtering on, if the record positioned to via
     // this SKIP operation has an age <= 25, then that record
     // will be removed from the Advantage Optimized Filter.
     SKIP

     // Turn smart filtering off
     aofSmartFilter( .F. )

     // With smart filtering off, if the record positioned to via
     // this SKIP operation has an age <= 25, then that record
     // will remain in the Advantage Optimized Filter.
     SKIP


See Also: aofResolvePartial()

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