Eloquence B.07.00 Release Notes
Eloquence B.07.00 - Database Database functions[ Main document | Back ]
DBOPEN status codesDBOPEN has been changed to return a more specific status when it fails to open a database.
DBFIND mode 6 and 7The new DBFIND modes 6 and 7 have been introduced. Mode 6 and 7 are used to implement the TurboIMAGE TPI functionality (in the TurboIMAGE compatibility extension). This document describes the native Eloquence C language API.
int idb_find( dbid, qset, mode, status, qitem, key ) Arguments: dbid - database id qset - dataset name or number mode - see below status - status array (to receive status words qitem - item or iitem name or number key - pointer to key value Returns: completion code (same as status[0]) Modes: 1 - find chain head / subset 2 - find first record 3 - find last record 4 - find first record based on RE 5 - find last record based on RE 6 - find entries based on search list 7 - find first record based on search listMode 6 returns the number of matching entries in status element 6. Mode 7 only locates the first entry which satisfies the condition. Evaluating the number of matching entires requires additional work to read part of the index, so mode 7 should be used preferably when possible. With modes 6 and 7 the item argument must reference an index item. Either the index item number or name can be passed. With modes 6 and 7 the key argument points to a list of conditions to qualify the results. The argument must be 32 bit aligned. --------------------- | size (in bytes) | total size (not including this field) --------------------- | key op | struct key_op - - - - - - - - - - - | length | key length in bytes - - - - - - - - - - - | key | key data (padded to 4 byte boundary) | padded to 4 bytes | --------------------- | ... | padding of last block is optional ---------------------A single condition is expressed by the structure below: struct KeyOp { int8_t start_seg; // expression starts at this key segment int8_t op; // operator (see below) uint8_t flags; // flags (see below) int8_t reserved; // not used yet int32_t length; char data[1]; }The following operators are supported KEY_OP_NONE 0 invalid KEY_OP_EQ 1 == KEY_OP_NE 2 != KEY_OP_GE 3 >= KEY_OP_LE 4 <= KEY_OP_GT 5 > KEY_OP_LT 6 <The following flags are supported: KEY_OP_FLAGS_RE 0x01 // flag: regular expression In case a regular expression is used it needs to follow the rules described for DBFIND mode 4 and 5.
DBINFO mode 303DBINFO mode 303 has been introduced to return information on sort items while keeping backwards compatibility with mode 301.The following information is returned: struct info_303 { int count; // list entries struct { // for each path int set; // related set int ditem; // detail item no int sort_item; // sort item or 0 } path[1]; }; Please note: With the TurboIMAGE compatibility API this information is returned with mode 301. DBINFO mode 303 is not available. Please note: With the Eloquence programming language this information is returned with DBINFO mode 301. The sort item is returned in the previously reserved field of the path information.
DBINFO mode 505DBINFO mode 505 has been introduced to return a list of all data sets which contain a specific index item.The following information is returned: struct info_list { // 103, 104, 203, 204, 505 int count; // list entries int no[1]; // list data }; Please note: With the TurboIMAGE compatibility API this information is returned with mode 705.
© Copyright 2002-2003 Marxmeier Software AG. All rights reserved. Revision: 2003-03-19 |