Segment Modes
The segment modes based on absolute field number, also known as schema fields, are the preferred modes to use in the segment definition. The preferred segment modes are:
- CTSEG_SCHSEG
- CTSEG_USCHSEG
- CTSEG_VSCHSEG
- CTSEG_UVSCHSEG
- CTSEG_SCHSRL
You may OR in the mode CTSEG_DESCENDING to the segment mode to specify the descending sort order for a segment. You can also or in the segment mode CTSEG_ALTSEG to specify an alternate collating sequence for the segment.
Using the preferred segment modes makes c-treeDB based tables fully compatible with ISAM/Low Level applications and/or c-treeACE SQL applications.
c-treeDB Segment Modes
|
c-treeDB.NET Segment Modes
|
Explanation
|
CTSEG_SCHSEG
|
SCHSEG_SEG
|
Absolute field number
|
CTSEG_USCHSEG
|
USCHSEG_SEG
|
Absolute field number - uppercase
|
CTSEG_VSCHSEG
|
VSCHSEG_SEG
|
Absolute field number - pad strings
|
CTSEG_UVSCHSEG
|
UVSCHSEG_SEG
|
Absolute field number - pad strings upper
|
CTSEG_SCHSRL
|
SCHSRL_SEG
|
Absolute field number - auto increment
|
CTSEG_DESCENDING
|
DESCENDING_SEG
|
Descending segment mode
|
CTSEG_ALTSEG
|
ALTSEG_SEG
|
Alternative collating sequence
|
CTSEG_ENDSEG
|
ENDSEG_SEG
|
END segment mode
|
The other segment modes are kept for compatibility with existing c-treeACE applications. Advanced c-treeDB functions like ctdbAlterTable() may not work properly if the segment mode is not one of the preferred segment modes.
You may specify these segment modes with ctdbAddSegmentEx(), which expects an absolute record offset where the segment is to start instead of a field indicator, the length in bytes of the segment, and the segment mode.
c-treeDB Segment Modes
|
c-treeDB.NET Segment Modes
|
Explanation
|
CTSEG_REGSEG
|
REGSEG_SEG
|
Absolute byte offset - No transformation
|
CTSEG_INTSEG
|
INTSEG_SEG
|
Absolute byte offset - unsigned int/long
|
CTSEG_UREGSEG
|
UREGSEG_SEG
|
Absolute byte offset - uppercase
|
CTSEG_SRLSEG
|
SRLSEG_SEG
|
Absolute byte offset - auto increment
|
CTSEG_VARSEG
|
VARSEG_SEG
|
Relative field number
|
CTSEG_UVARSEG
|
UVARSEG_SEG
|
Relative field number - uppercase
|
CTSEG_SGNSEG
|
SGNSEG_SEG
|
Absolute byte offset - signed int/long
|
CTSEG_FLTSEG
|
FLTSEG_SEG
|
Absolute byte offset - float/double
|
CTSEG_DECSEG
|
DECSEG_SEG
|
Absolute byte offset - not yet implemented
|
CTSEG_BCDSEG
|
BCDSEG_SEG
|
Absolute byte offset - not yet implemented
|
CTSEG_DESCENDING
|
DESCENDING_SEG
|
Descending segment mode
|
CTSEG_ALTSEG
|
ALTSEG_SEG
|
Alternative collating sequence
|
c-treeDB.NET Segment Modes are defined in the SET_MODE enum.
|