int db::Table::apply_range (  ) 

Apply a range match.

Returns:
Precondition:
The table is in either DB_TABLE_RANGE_START or DB_TABLE_RANGE_END mode.
Range matching is used to limit the set of rows that are visible to the cursor. This is done by providing a minimum and maximum value to match on the current index. The table will only provide access to the rows that fall between the minimum and maximum values, inclusive.

The steps necessary to perform range matching are:

  1. Call set_sort_order to set the current index.
  2. Identify the first row that should be matched by calling set_range_start and then using set_field to set values for each field in the index.
  3. Identify the last row that should be matched by calling set_range_end and then use set_field similarly.
  4. Call apply_range to apply the range match and return to browsing mode.

To clear a range limitation, call set_range_start or set_range_end and provide no criteria before calling apply_range. To clear all range matching criteria, call clear_range.

See also:
set_range_start, set_range_end, clear_range, cancel


Copyright © 2005-2008 ITTIA®. All rights reserved.