-
Notifications
You must be signed in to change notification settings - Fork 2
/
RC.h
84 lines (73 loc) · 1.3 KB
/
RC.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef RC_HH
#define RC_HH
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
typedef enum {
SUCCESS,
SQL_SYNTAX,
PF_EXIST,
PF_FILEERR,
PF_INVALIDNAME,
PF_WINDOWS,
PF_FHCLOSED,
PF_FHOPEN,
PF_PHCLOSED,
PF_PHOPEN,
PF_NOBUF,
PF_EOF,
PF_INVALIDPAGENUM,
PF_NOTINBUF,
PF_PAGEPINNED,
RM_FHCLOSED,
RM_FHOPENNED,
RM_INVALIDRECSIZE,
RM_INVALIDRID,
RM_FSCLOSED,
RM_NOMORERECINMEM,
RM_FSOPEN,
RM_EOF,
IX_INVALIDKEYSIZE,
IX_IHOPENNED,
IX_IHCLOSED,
IX_DELETE_NO_RID,
IX_DELETE_NO_KEY,
IX_CHILD_NODE_UNDERFLOW,
IX_CHILD_NODE_OVERFLOW,
IX_INVALIDKEY,
IX_NOMEM,
RM_NOMOREIDXINMEM,
IX_EOF,
IX_SCANCLOSED,
IX_ISCLOSED,
IX_NOMOREIDXINMEM,
IX_SCANOPENNED,
FAIL,
OS_FAIL,
DB_EXIST,
DB_NOT_EXIST,
NO_DB_OPENED,
DB_NAME_ILLEGAL,
TABLE_NOT_EXIST,
TABLE_EXIST,
TABLE_NAME_ILLEGAL,
ATTR_NOT_EXIST,
ATTR_EXIST,
TOO_MANY_ATTR,
INVALID_ATTRS,
INVALID_TYPES,
INVALID_VALUES,
INVALID_CONDITIONS,
FLIED_NOT_EXIST,//在不存在的字段上增加索引
FIELD_NAME_ILLEGAL,
FIELD_MISSING,//插入的时候字段不足
FIELD_REDUNDAN,//插入的时候字段太多
FIELD_TYPE_MISMATCH,//字段类型有误
RECORD_NOT_EXIST,//对一条不存在的记录进行删改时
INDEX_NAME_REPEAT,
INDEX_EXIST,//在指定字段上,已经存在索引了
INDEX_NOT_EXIST,
INDEX_NAME_ILLEGAL,
NOT_SELECT,
SELECT_SUCCESS,
}RC;
#endif