When sorting ASCII strings, the alphabetic order of strings is by default case-sensitive. If it is important to order rows by case-insensitive character comparison, i.e. where the lowercase and uppercase letters in the same position are sorted equally, the
case_insensitive
orignore_case
keywords can be used on index definitions in the database schema. For example, to specify that indexby_name
on string filedname
will use case-insensitive comparison, use a declaration like the following in the schema file:tree<name case_insensitive asc> by_name;or
tree<name ignore_case asc> by_name;Also, for eXtremeDB source code licensees, the
MCO_CFG_SUPPORT_CASE_INSENSITIVE_CHAR_CMP
configuration option is available as a C preprocessor define intarget/mcolib/mcocfg.h
. Its default value is 1. If its value is changed to 0 in an eXtremeDB build, then all indexes will use case sensitive comparison no matter whether they are declared with thecase_insensitive
keyword in the schema file or not; i.e. this redefinition of theMCO_CFG_SUPPORT_CASE_INSENSITIVE_CHAR_CMP
constant will override the effects ofcase_insensitive
keyword.To be clear, the following settings will have the stated results:
Value of
MCO_CFG_SUPPORT_CASE
_INSENSITIVE_CHAR_CMP
Schema declaration Resulting index comparison defined as 1 (default) without case_insensitive
case sensitive defined as 1 (default) with case_insensitive
case insensitive redefined as 0 (special build) without case_insensitive
case sensitive redefined as 0 (special build) with case_insensitive
case sensitive (Object code licensees can request a special build of eXtremeDB libraries from McObject Support.)