-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQU_Manager.h
43 lines (33 loc) · 1.08 KB
/
QU_Manager.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
//
// Created by 唐艺峰 on 2018/12/20.
//
#ifndef HUST_BASE_KERNEL_QU_MANAGER_H
#define HUST_BASE_KERNEL_QU_MANAGER_H
#include "str.h"
#include "Condition_tool.h"
#include "SYS_Manager.h"
#define MAX_RECORD_LINES_NUM 5
typedef struct SelResult{
int col_num;
int row_num;
AttrType type[20]; //结果集各字段的数据类型
int length[20]; //结果集各字段值的长度
char fields[20][20];//最多二十个字段名,而且每个字段的长度不超过20
char ** res[MAX_RECORD_LINES_NUM]; //最多一百条记录
SelResult * next_res;
}SelResult;
typedef struct RIDSets {
RID * rids;
int * status; // 0 -> death 1 -> inactive 2 -> active
int num;
}RIDSets;
typedef struct ResultsSets {
bool * is_alive;
char ** data;
int num;
} ResultsSets;
void Init_Result(SelResult * res);
void Destory_Result(SelResult * res);
RC Query(char * sql,SelResult * res);
RC Select(int nSelAttrs,RelAttr **selAttrs,int nRelations,char **relations,int nConditions,Condition *conditions,SelResult * res);
#endif //HUST_BASE_KERNEL_QU_MANAGER_H