.
contact contact

Case insensitive indexes (B090130)

 
.
  The database was enhanced to support case insensitive indexes. When specified for an index, key comparison on strings is performed in a case insensitive manner.

To specify an index is case-insensitive, a new "CI" index option was added in schema, proschema and dbutil.

The example below shows the schema syntax to specify the EMPTY and CI options for an index named MATCHCODE:

MATCHCODE (CI,EMPTY) = NAME;
(note that the example specifies EMPTY and CI options together, but there is no dependency between those two unrelated options)

When using dbutil, the following syntax is used:

CHANGE IITEM indexName FLAGS CI,EMPTY;
In the image3k library, DBINFO mode 833 was enhanced to indicate if an index is case insensitive. Previous image3k versions always returned a 1 (for "case sensitive") in the respective array element of the DBINFO mode 833 result.

When using the Eloquence (not image3k) DBINFO mode 506 (added with B.07.10) may be used to obtain additional details for an index. When an index is case insensitive, the bit 4 (0x10) is set in the flags field if an index is case insensitive.

The following information is returned by the Eloquence DBINFO mode 506:

   char name[16];       index item name, 16 bytes
   int32  flags;        index item flags
                          bit 3 (0x08) indicates to 
                             not include empty items 
                             (EMPTY option)
                          bit 4 (0x10) indicates a 
                             case insensitive index
                             (CI option)
   int32  seg_cnt;      number of index segments

   For each index segment the following information is 
   returned

   int item32;          item number
   int start32;         offset info item (in bytes)
   int length32;        segment length (in bytes)
   int resvd32;         reserved

Backwards compatibility notes:

  • To use case insensitive indexes with B.07.10, the database server patch PE71-0801240 or newer must be installed before creating a database with this option. Otherwise the resulting index could be corrupted.

  • Image3k libraries before version B.07.10.10 (released with patch PE71-0801251) did not indicate if an index was case insensitive. DBINFO mode 833 always indicated an index to be case sensitive.

 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2009-01-23  
  Copyright © 2009 Marxmeier Software AG