You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.4 KiB

9 months ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdio.h>
  4. #define DB_VERSION 0xabcd1234 // ��������ֵ��һ�£��������������ݿ�
  5. typedef struct {
  6. const char* name;
  7. uint32_t add;
  8. uint32_t itermSize;
  9. uint32_t itermMaxNum;
  10. } zhdb_table_t;
  11. typedef struct {
  12. uint32_t version;
  13. } zhdb_header_t;
  14. void zhdb_init();
  15. void zhdb_reg_table_info(const char* name, uint32_t itermSize, uint32_t itermMaxNum);
  16. void zhdb_before_run_prepare();
  17. void zhdb_read_table(const char* name, void* cache, uint32_t cachelen);
  18. void zhdb_write_item(uint32_t add, const char* data, size_t len);
  19. // add
  20. // --> readall
  21. // --> findNextPos
  22. // --> forceFindNextPos
  23. // --> write
  24. // void
  25. // void writetostorage();
  26. // readall()
  27. // sort
  28. // update()
  29. //+++++++++++++++++++++++++++++++++
  30. // cache (dirty)
  31. //+++++++++++++++++++++++++++++++++
  32. // storage
  33. //+++++++++++++++++++++++++++++++++
  34. //
  35. // Dao
  36. // find
  37. // getALL() -> table_add, table_size, iterm_size, iterm_num (Ԥ���Ŀռ�Խ��������ѯ��ʱ��Խ��)��
  38. // �����������ܱ�֤�豸��һ����
  39. // delete
  40. //
  41. //
  42. //
  43. // �ϵ�֮�󣬱������д洢����¼һЩ�ٲ����ǣ���¼��table�ṹ������
  44. // ��ҳ��ѯ��
  45. //
  46. // ���ڴ����ݽ����أ���ǧ����¼
  47. // ����ѯ����ɸѡ���ݣ������ڷ�ҳ����������
  48. // ��ҳʵ�ַ�����ͨ��������
  49. // ����ʵ�ְ�˳����ҳ
  50. //
  51. // tabl
  52. // table_add
  53. // table_size
  54. //
  55. // search all
  56. //
  57. // delete