This commit is contained in:
Hongze Cheng 2022-03-09 09:18:20 +00:00
parent 8d23a257b8
commit 7e586f4d49
2 changed files with 13 additions and 0 deletions

View File

@ -15,6 +15,16 @@
#include "tdbInt.h" #include "tdbInt.h"
int tdbPageCreate(int pageSize, SPage **ppPage, void *(*xMalloc)(void *, size_t), void *arg) {
// TODO
return 0;
}
int tdbPageDestroy(SPage *pPage, void (*xFree)(void *)) {
// TODO
return 0;
}
int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell) { int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell) {
// TODO // TODO
return 0; return 0;

View File

@ -39,6 +39,7 @@ struct SPage {
pthread_spinlock_t lock; pthread_spinlock_t lock;
u8 *pData; u8 *pData;
SPgid pgid; SPgid pgid;
int pageSize;
// Fields used by SPCache // Fields used by SPCache
TDB_PCACHE_PAGE TDB_PCACHE_PAGE
@ -95,6 +96,8 @@ struct SPage {
#endif #endif
// APIs // APIs
int tdbPageCreate(int pageSize, SPage **ppPage, void *(*xMalloc)(void *, size_t), void *arg);
int tdbPageDestroy(SPage *pPage, void (*xFree)(void *));
int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell); int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell);
int tdbPageDropCell(SPage *pPage, int idx); int tdbPageDropCell(SPage *pPage, int idx);