Implemented automatic EXPLAIN database maintenance.
[idzebra-moved-to-github.git] / index / zinfo.h
1 /*
2  * Copyright (C) 1994-1998, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: zinfo.h,v $
7  * Revision 1.4  1998-05-20 10:12:21  adam
8  * Implemented automatic EXPLAIN database maintenance.
9  * Modified Zebra to work with ASN.1 compiled version of YAZ.
10  *
11  * Revision 1.3  1998/03/05 08:45:13  adam
12  * New result set model and modular ranking system. Moved towards
13  * descent server API. System information stored as "SGML" records.
14  *
15  * Revision 1.2  1996/05/22 08:22:00  adam
16  * Added public ZebDatabaseInfo structure.
17  *
18  * Revision 1.1  1996/05/13 14:23:07  adam
19  * Work on compaction of set/use bytes in dictionary.
20  *
21  */
22 #ifndef ZINFO_H
23 #define ZINFO_H
24
25 #include <data1.h>
26 #include "recindex.h"
27
28 typedef struct zebraExplainInfo *ZebraExplainInfo;
29 typedef struct zebDatabaseInfo ZebDatabaseInfo;
30 ZebraExplainInfo zebraExplain_open (Records records, data1_handle dh,
31                                     Res res,
32                                     int writeFlag,
33                                     void *updateHandle,
34                                     int (*updateFunc)(void *handle,
35                                                       Record drec,
36                                                       data1_node *n));
37 void zebraExplain_close (ZebraExplainInfo zei, int writeFlag,
38                          int (*updateH)(Record drec, data1_node *n));
39 int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database);
40 int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database);
41 int zebraExplain_lookupSU (ZebraExplainInfo zei, int set, int use);
42 int zebraExplain_addSU (ZebraExplainInfo zei, int set, int use);
43 void zebraExplain_addSchema (ZebraExplainInfo zei, Odr_oid *oid);
44 void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num);
45 void zebraExplain_recordBytesIncrement (ZebraExplainInfo zei, int adjust_num);
46 int zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num);
47 void zebraExplain_loadAttsets (data1_handle dh, Res res);
48
49 typedef struct {
50     int recordSize;
51     int recordOffset;
52     int runNumber;
53 } RecordAttr;
54 RecordAttr *rec_init_attr (ZebraExplainInfo zei, Record rec);
55
56 #endif