1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-11 21:50:41 +08:00

add types

This commit is contained in:
源文雨
2022-05-01 21:16:17 +08:00
parent eda10fba91
commit 67b9176615
17 changed files with 310 additions and 26 deletions

View File

@@ -3,19 +3,33 @@
#include <stdint.h>
#define HEADERSZ 256
// 初始化并写入数据库文件头
// 返回:
// 0 成功
// 1 write 失败
// EOF lseek 失败
int init_file_header_page(int fd);
// 获得数据库版本
uint16_t get_db_version(int fd);
// 设置 ptr of unused blk 字段
// 返回:
// 0 成功
// 1 write 失败
// EOF lseek 失败
int set_first_unused_block(int fd, uint64_t ptr);
// 获得 ptr of unused blk 字段
uint64_t get_first_unused_block(int fd);
// 设置 ptr of next table 字段
// 返回:
// 0 成功
// 1 write 失败
// EOF lseek 失败
int set_first_table(int fd, uint64_t ptr);
// 获得 ptr of next table 字段