-
Notifications
You must be signed in to change notification settings - Fork 0
/
reln.h
33 lines (28 loc) · 810 Bytes
/
reln.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
WeChat: cstutorcs
QQ: 749389476
Email: tutorcs@163.com
// reln.h ... interface to functions on Relations
// part of Multi-attribute Linear-hashed Files
// See reln.c for details on Reln type and functions
// Last modified by John Shepherd, July 2019
#ifndef RELN_H
#define RELN_H 1
typedef struct RelnRep *Reln;
#include "defs.h"
#include "tuple.h"
#include "page.h"
#include "chvec.h"
Status newRelation(char *name, Count nattr, Count npages, Count d, char *cv);
Reln openRelation(char *name, char *mode);
void closeRelation(Reln r);
Bool existsRelation(char *name);
PageID addToRelation(Reln r, Tuple t);
FILE *dataFile(Reln r);
FILE *ovflowFile(Reln r);
Count nattrs(Reln r);
Count npages(Reln r);
Count depth(Reln r);
Count splitp(Reln r);
ChVecItem *chvec(Reln r);
void relationStats(Reln r);
#endif