Skip to content

Commit 6589b06

Browse files
committed
added:memory database supported
1 parent 84951c4 commit 6589b06

File tree

12 files changed

+521
-5
lines changed

12 files changed

+521
-5
lines changed

XEngine_Source/StorageModule_Database/Database_Define.h

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,107 @@ extern "C" bool Database_File_FileDelete(LPCXSTR lpszBuckKey = NULL, LPCXSTR lps
278278
意思:是否成功
279279
备注:返回假可能没有查找到,这条记录不存在.参数lpszFile和lpszMD5不能全为空
280280
*********************************************************************/
281-
extern "C" bool Database_File_FileQuery(XSTORAGECORE_DBFILE * **pppSt_ListFile, int* pInt_ListCount, LPCXSTR lpszTimeStart = NULL, LPCXSTR lpszTimeEnd = NULL, LPCXSTR lpszBuckKey = NULL, LPCXSTR lpszFilePath = NULL, LPCXSTR lpszFileName = NULL, LPCXSTR lpszHash = NULL, LPCXSTR lpszTableName = NULL);
281+
extern "C" bool Database_File_FileQuery(XSTORAGECORE_DBFILE * **pppSt_ListFile, int* pInt_ListCount, LPCXSTR lpszTimeStart = NULL, LPCXSTR lpszTimeEnd = NULL, LPCXSTR lpszBuckKey = NULL, LPCXSTR lpszFilePath = NULL, LPCXSTR lpszFileName = NULL, LPCXSTR lpszHash = NULL, LPCXSTR lpszTableName = NULL);
282+
/************************************************************************/
283+
/* 导出的内存数据库函数 */
284+
/************************************************************************/
285+
/********************************************************************
286+
函数名称:Database_Memory_Init
287+
函数功能:初始化存储服务数据库管理器
288+
参数.一:pStl_ListBucket
289+
In/Out:In
290+
类型:数据结构指针
291+
可空:N
292+
意思:BUCKET列表
293+
参数.二:nHashMode
294+
In/Out:In
295+
类型:整数型
296+
可空:N
297+
意思:文件HASH方法
298+
返回值
299+
类型:逻辑型
300+
意思:是否成功
301+
备注:
302+
*********************************************************************/
303+
extern "C" bool Database_Memory_Init(list<XENGINE_STORAGEBUCKET>* pStl_ListBucket, int nHashMode);
304+
/********************************************************************
305+
函数名称:Database_Memory_Destory
306+
函数功能:销毁数据库管理器
307+
返回值
308+
类型:逻辑型
309+
意思:是否成功
310+
备注:
311+
*********************************************************************/
312+
extern "C" bool Database_Memory_Destory();
313+
/********************************************************************
314+
函数名称:Database_Memory_FileInsert
315+
函数功能:插入一个文件数据到数据库中
316+
参数.一:pSt_DBManage
317+
In/Out:In
318+
类型:数据结构指针
319+
可空:N
320+
意思:要插入的数据信息
321+
返回值
322+
类型:逻辑型
323+
意思:是否成功
324+
备注:这个结构所有值都必须填充
325+
*********************************************************************/
326+
extern "C" bool Database_Memory_FileInsert(XSTORAGECORE_DBFILE* pSt_DBManage);
327+
/********************************************************************
328+
函数名称:Database_Memory_FileDelete
329+
函数功能:删除一个数据库文件信息
330+
参数.一:lpszFilePath
331+
In/Out:In
332+
类型:常量字符指针
333+
可空:Y
334+
意思:要删除的文件路径
335+
参数.二:lpszFileName
336+
In/Out:In
337+
类型:常量字符指针
338+
可空:Y
339+
意思:要删除的文件名称
340+
参数.三:lpszHash
341+
In/Out:In
342+
类型:常量字符指针
343+
可空:Y
344+
意思:要删除的文件HASH
345+
返回值
346+
类型:逻辑型
347+
意思:是否成功
348+
备注:参数不能全为空,不会删除文件
349+
*********************************************************************/
350+
extern "C" bool Database_Memory_FileDelete(LPCXSTR lpszFilePath = NULL, LPCXSTR lpszFileName = NULL, LPCXSTR lpszHash = NULL);
351+
/********************************************************************
352+
函数名称:Database_Memory_FileQuery
353+
函数功能:查询文件信息
354+
参数.一:pppSt_ListFile
355+
In/Out:Out
356+
类型:三级指针
357+
可空:N
358+
意思:导出查询到的文件列表,此函数需要调用基础库的内存释放函数
359+
参数.二:pInt_ListCount
360+
In/Out:Out
361+
类型:三级指针
362+
可空:N
363+
意思:导出文件个数
364+
参数.三:lpszFilePath
365+
In/Out:In
366+
类型:常量字符指针
367+
可空:Y
368+
意思:要查询的路径
369+
参数.四:lpszFileName
370+
In/Out:In
371+
类型:常量字符指针
372+
可空:Y
373+
意思:要查询的名称
374+
参数.五:lpszHash
375+
In/Out:In
376+
类型:常量字符指针
377+
可空:Y
378+
意思:要查询的文件HASH
379+
返回值
380+
类型:逻辑型
381+
意思:是否成功
382+
备注:返回假可能没有查找到,这条记录不存在.参数lpszFile和lpszHash不能全为空
383+
*********************************************************************/
384+
extern "C" bool Database_Memory_FileQuery(XSTORAGECORE_DBFILE*** pppSt_ListFile, int* pInt_ListCount, LPCXSTR lpszFilePath = NULL, LPCXSTR lpszFileName = NULL, LPCXSTR lpszHash = NULL);

0 commit comments

Comments
 (0)