mirror of
https://github.com/fumiama/fumidb.git
synced 2026-06-08 20:10:25 +08:00
finish load table
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
// 返回:
|
||||
// NULL 失败,详见 errno
|
||||
// table 指向表头的指针
|
||||
void* create_table(int fd, char* buf, const char* name, uint16_t row_len, ...);
|
||||
void* create_table(int fd, char* buf, const char* name, int row_len, ...);
|
||||
|
||||
// 加载 ptr 位置的表
|
||||
// len(buf) >= 4096+8+2=4106
|
||||
@@ -47,7 +47,7 @@ int remove_table_index(int fd, void* table, uint16_t pos);
|
||||
// 返回:
|
||||
// 0 失败,详见 errno
|
||||
// ptr 本行插入的位置
|
||||
uint64_t insert_row(int fd, void* table, uint16_t row_len, ...);
|
||||
uint64_t insert_row(int fd, void* table, int row_len, ...);
|
||||
|
||||
// 根据主键的匹配值查找行
|
||||
// 如果主键不为 string,k 直接装填其值
|
||||
@@ -65,7 +65,7 @@ uint64_t find_row_by_pk(int fd, void* table, key_t k);
|
||||
// 返回:
|
||||
// 非 0 失败,详见 errno
|
||||
// 0 成功
|
||||
int find_row_by(int fd, void* table, int (*f)(uint64_t), uint16_t row_len, ...);
|
||||
int find_row_by(int fd, void* table, int (*f)(uint64_t), int row_len, ...);
|
||||
|
||||
// 根据主键的匹配值删除行
|
||||
// 如果主键不为 string,k 直接装填其值
|
||||
@@ -82,6 +82,6 @@ int remove_row_by_pk(int fd, void* table, key_t k);
|
||||
// 返回:
|
||||
// 非 0 失败,详见 errno
|
||||
// 0 成功
|
||||
int remove_row_by(int fd, void* table, uint16_t row_len, ...);
|
||||
int remove_row_by(int fd, void* table, int row_len, ...);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user