Share via


SORTORDERSPECEX [CEDB] (Compact 2013)

3/26/2014

This structure contains information about a sort order in a database.

Syntax

typedef struct _SORTORDERSPECEX {
  WORD wVersion;
  WORD wNumProps;
  WORD wKeyFlags;
  CEPROPID rgPropID[CEDB_MAXSORTPROP];
  DWORD rgdwFlags[CEDB_MAXSORTPROP];
} SORTORDERSPECEX; 

Members

  • wVersion
    Version of this structure. Applications must set wVersion to 1.
  • wNumProps
    Number of properties in this sort order, which must not be more than CEDB_MAXSORTPROP.
  • wKeyFlags
    Uniqueness indicator. This flag can be set to zero or CEDB_SORT_UNIQUE. CEDB_SORT_UNIQUE requires the key to be unique across all records in the database. It also requires all sort properties to be present in all records.
  • rgPropID
    Array of properties to be sorted on, by order of importance. See the description of a propid inside the CEPROPVAL [CEDB] structure.
  • rgdwFlags
    Sort flags that correspond to the properties in rgPropID. The following table shows possible values.

    Value

    Description

    CEDB_SORT_CASEINSENSITIVE

    Causes the sort operation to be case-insensitive. This value is valid only for strings.

    CEDB_SORT_DESCENDING

    Causes the sort to be done in descending order. By default, the sort is done in ascending order.

    CEDB_SORT_IGNOREKANATYPE

    Causes the sort operation to not differentiate between hiragana and katakana characters. This value is valid only for strings.

    CEDB_SORT_IGNORENONSPACE

    Causes the sort operation to ignore nonspacing characters, such as accents, diacritics, and vowel marks when sorting. This value is valid only for strings.

    CEDB_SORT_IGNORESYMBOLS

    Causes the sort operation to not recognize symbol values. This value is valid only for strings.

    CEDB_SORT_IGNOREWIDTH

    Causes the sort operation to not differentiate between a single-byte character and the same character as a double-byte character. This value is valid only for strings.

    CEDB_SORT_NONNULL

    Causes the sort operation to require the sort property to be present in all records.

    CEDB_SORT_UNKNOWNFIRST

    Causes the sort operation to place records that do not contain the sort property before all the other records.

Remarks

A sort order is a set of properties and flags that define the ordering of records in a database. A key for a record is the set of properties in that record that are indexed by the sort order.

For example, a single sort order may be indexed on two properties: Last Name and First Name. The sort order would contain the CEPROPIDs and flags of those two properties, and the key for each record would be the values of those two properties for that record. Records are ordered based on their keys.

Therefore, in this example ordering is done by Last Name, and then by First Name in cases where the Last Names are the same.

The CEDB_SORT_UNIQUE flag implies the CEDB_SORT_NONNULL flag for each sort property, meaning that when uniqueness is required, all records must include all of the sort properties. It is not necessary to specify both the CEDB_SORT_UNIQUE flag and the CEDB_SORT_NONNULL flag.

Requirements

Header

windbase.h

See Also

Reference

CEDB Structures
CeCreateDatabaseEx2 (CEDB)
CEDBASEINFOEX [CEDB]
CEPROPVAL [CEDB]