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 - ax_getaofrecordcount() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_GetAOFRecordCount()
 Returns the number of records that are included in the current active Server
 Advantage Optimized Filter
------------------------------------------------------------------------------

 Syntax

     AX_GetAOFRecordCount() -> numeric

 Returns

     Returns the number of records that are included in the current active
     Server Advantage Optimized Filter.  If the operation was unsuccessful,
     0 is returned, and AX_Error() will return information on why the
     operation failed.

 Description

     AX_GetAOFRecordCount() returns the number of records that are in the
     current active Server Advantage Optimized Filter.  In other words,
     AX_GetAOFRecordCount() returns the number of bits that are "on" in
     the bitmapped AOF filter.  A Server Advantage Optimized Filter is
     created via the AX_SetServerAOF() API.  If the current AOF was fully
     optimizable, then the returned value will also be equal to the number
     of records that pass the filter condition.  If the current AOF is only
     partially optimizable or non-optimizable, and the lResolve parameter
     was .T. in the call to AX_SetServerAOF(), then the returned value will
     also be equal to the number of records that pass the filter condition.
     This is because the .T. lResolve parameter causes the filter to be
     automatically resolved at build time to contain only those records
     that pass the filter.  If the current AOF is only partially optimizable
     or non-optimizable, and the lResolve parameter was .F. in the call
     to AX_SetServerAOF(), then the returned value will NOT be equal to
     the number of records that actually pass the filter condition.  This
     is because the .F. lResolve parameter causes the filter to be left in
     its partially optimized or non-optimized state.

     Note:  Filtering deleted records (SET DELETED ON) without an index
     built on "DELETED()" will have no effect on the optimization level.
     In other words, if the rest of the expression is fully optimized then
     the optimization level returned via AX_GetAOFOptLevel() will still be
     fully optimized. In this case, AX_GetAOFRecordCount() returns the
     number of records including the deleted records. To remove deleted
     records from AX_GetAOFRecordCount(), there must be an index built
     on "DELETED()".

 Example

     USE Accounts INDEX state VIA "DBFCDXAX"

     // Create an AOF on the server
     AX_SetServerAOF( "state == 'CA'", .F. )

     // Display the number of records contained in the AOF.  This value
     //   should be equal to the number of accounts in California.
     ? AX_GetAOFRecordCount()


See Also: AX_SetServerAOF() AX_GetAOFExpr() AX_GetAOFOptLevel()

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