main.cpp

来自「DBMS(Database Management System)在当前的信息系统」· C++ 代码 · 共 59 行

CPP
59
字号
#include "common.h"
void print()
{
	vector<string> vHeader;
	char pStrCommand[300] = "create table liubing   (name varchar(20) not null primary , id text,id2 date, password int not null,check name between '23' and \"233\")"; 
	SplitCommand(pStrCommand,vHeader);
	
	
	for(int i =0 ;i<vHeader.size();i++)
	{
		printf("=> %s\n",vHeader[i].c_str());
	}

	printf("%d\n",QuerySQLType(vHeader));

	//_rmdir("\\data\\liubing");
	//CreateDataBase("liubing");
	//DropDatabase("liubing");
}
void Run()
{
	char strCommand[2048];
	printf("\nLiu SQL:\\>");
	gets( strCommand );

	while( true )
	{
	  ParseSQL(strCommand);
	  printf("\nLiu SQL:\\>");	 
	  gets( strCommand );
	}
}

void main()
{
	printf("欢迎使用LiuDBMS Ver1.0版本\n");
	Run();
/*	RecordNodeSet pRecord;
	OpenLiuDBMS("test1","liubing");
//	if(ExecSQL("create database mg",NULL))
//	{
//		printf("操作成功\n");
//	}
	if(ExecSQL("insert into test values ('liubing',23)",NULL))
	{
		printf("操作成功\n");
	}
	if(ExecSQL("select * from test",&pRecord))
	{
		printf("共找到%d条记录\n",pRecord.lCount);
	}

	CloseLiuDBMS();
*/
	getchar();

}

⌨️ 快捷键说明

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