src/db5_hdr.c File Reference

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

Detailed Description

Source - Database db5, meta-data.

Author:
Julien Blitte
Version:
0.1

Definition in file db5_hdr.c.


Function Documentation

uint32_t db5_hdr_count (  ) 

get current row count

Returns:
count of row in database

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

Returns:
true if successfull

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

Parameters:
delta the value to add to current count
Returns:
true if successfull

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

Returns:
true if successfull

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().

 All Classes Files Functions Variables Typedefs Defines

Generated on Mon Jan 11 00:15:07 2010 for db5fuse by  doxygen 1.6.1