⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 api_inte_struct.h

📁 我们自己写的miniSQL代码
💻 H
字号:
// api_inte_struct1.h: interface for the api_inte_struct class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_API_INTE_STRUCT_H__5F4CD1CA_09DB_425C_AC46_7DB9491CDDB2__INCLUDED_)
#define AFX_API_INTE_STRUCT1_H__5F4CD1CA_09DB_425C_AC46_7DB9491CDDB2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//	below add by waiter
struct table_info 
{
	int is_valid;					//标志是否有效,为1则为有效,否则无效;
	char table_name [20];			//建立的表的名字;
	char attribute_name [10][20];	//所建立的表中所包括的属性的名字;最多不超过10项;
	int type [10];					//每个属性的种类(char int float date)的一种;
	int type_length [10];			//每一项属性的数据所占据的字节数;
	int is_unique[10];				//标志在哪一个属性有完整性约束;;
	int ith_primary_key;			//标志在哪个属性上面建立主键;
	int n_attribute;				//标志所建立的表有几项属性;
};

// operation result
struct opn_res { 	
	int error_info;					// -1表示失败 , 1 表示成功操作 	int attr_count;
	int attr_count;					// 记录返回多少列
	char attr_name[10][20];
	int tuple_count; 	
	int tuple_length[10];
	char *query_res;  
};


struct st_where
{
	char table1[2][20];		// 如 where book.no = card.no 则要把book 提出来
	char attribute1[2][20]; //attribute name
	char table2[2][20];		// 如 where book.no = card.no 则要把card 提出来
	char attribute2[2][20]; //attribute name
	char operater[2][2];	// >, < , = , >= , <= , <>
	int linker;				// enum{ and , or }
};

//static definition
// set up these 3 block when first install
#define BLOCKUSAGE_BLOCKNO		( 0 )
#define TABLE_START_BLOCKNO		( 1 )
#define INDEX_START_BLOCKNO		( 2 )

#define BLOCKMAXSIZE		( 1022 )
#define BLOCK_NEXT_POINTER_POS	( 1023 * 4)

//end of static definition



//	above add by waiter


#endif // !defined(AFX_API_INTE_STRUCT_H__5F4CD1CA_09DB_425C_AC46_7DB9491CDDB2__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -