Source - Database db5, meta-data. More...
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "check.h"
#include "db5_hdr.h"
#include "db5_types.h"
#include "file.h"
#include "logger.h"
Go to the source code of this file.
Defines | |
#define | DB5_HDR_COUNT_OFFSET 1040 |
Offset in database meta-data file. | |
Functions | |
bool | db5_hdr_init () |
initialize meta-database | |
bool | db5_hdr_free () |
free meta-database | |
uint32_t | db5_hdr_count () |
get current row count | |
bool | db5_hdr_grow (const int delta) |
update row number in meta-database |
Source - Database db5, meta-data.
Definition in file db5_hdr.c.
uint32_t db5_hdr_count | ( | ) |
get current row count
Definition at line 60 of file db5_hdr.c.
References add_log(), and ADDLOG_NOTICE.
Referenced by db5_count(), db5_dat_delete_row(), db5_dat_insert(), db5_dat_select_by_filename(), db5_index_index_column(), and db5_select_filename().
bool db5_hdr_free | ( | ) |
free meta-database
Definition at line 53 of file db5_hdr.c.
Referenced by db5_free(), and db5_init().
bool db5_hdr_grow | ( | const int | delta | ) |
update row number in meta-database
delta | the value to add to current count |
Definition at line 69 of file db5_hdr.c.
References add_log(), ADDLOG_FAIL, and DB5_HDR_COUNT_OFFSET.
Referenced by db5_dat_delete_row(), and db5_dat_insert().
bool db5_hdr_init | ( | ) |
initialize meta-database
Definition at line 29 of file db5_hdr.c.
References add_log(), ADDLOG_CRITICAL, CONFIG_DB5_DATA_DIR, CONFIG_DB5_HDR_FILE, DB5_HDR_COUNT_OFFSET, and file_fcaseopen().
Referenced by db5_init().