|
/****************************************************************************
|
|
* This file is part of the project AqFinance.
|
|
* AqDataBase (c) by 2015 Martin Preuss, all rights reserved.
|
|
*
|
|
* The license for this file can be found in the file COPYING which you
|
|
* should have received along with this file.
|
|
****************************************************************************/
|
|
|
|
|
|
#ifndef AQDB_DBFILE_TABLE_P_H
|
|
#define AQDB_DBFILE_TABLE_P_H
|
|
|
|
|
|
#include "table_l.h"
|
|
|
|
|
|
#define AQDB_DBFILE_TABLE_OFFS_COLUMN_TABLE 0 /* 8 bytes (uint64_t) */
|
|
#define AQDB_DBFILE_TABLE_OFFS_OBJECT_TABLE 8 /* 8 bytes (uint64_t) */
|
|
#define AQDB_DBFILE_TABLE_OFFS_NAME 16 /* 64 bytes */
|
|
#define AQDB_DBFILE_TABLE_SIZE_NAME 64
|
|
|
|
|
|
|
|
struct AQDB_DBFILE_TABLE {
|
|
GWEN_LIST_ELEMENT(AQDB_DBFILE_TABLE)
|
|
|
|
/* data in file */
|
|
uint64_t offsetColumnTable;
|
|
uint64_t offsetObjectTable;
|
|
char *name;
|
|
|
|
/* runtime representation of some info from file */
|
|
AQFS_TABLE_LIST *tableListColumns;
|
|
AQFS_TABLE_LIST *tableListObjects;
|
|
|
|
/**
|
|
* Upon BeginEdit the current tableListObjects is copied into
|
|
* this field. This is then accessed by reading clients while
|
|
* a writing client modifies the tableListObjects. This makes sure that all
|
|
* readers still have a consistent database even while a writer is modifying it.
|
|
*/
|
|
AQFS_TABLE_LIST *savedTableListObjects;
|
|
|
|
|
|
/* runtime data */
|
|
AQDB_ID tableId;
|
|
uint32_t openFlags;
|
|
uint32_t flags;
|
|
|
|
AQDB_COLUMN_LIST *columnList;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|