|
/****************************************************************************
|
|
* This file is part of the project AqFinance.
|
|
* AqFinance (c) by 2007 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_DBDIR_L_H
|
|
#define AQDB_DBDIR_L_H
|
|
|
|
#define AQDB_DB_DIR_MAX_OPEN_TABLES 64
|
|
#define AQDB_DB_DIR_TID_SESSIONLOG (AQDB_DB_DIR_MAX_OPEN_TABLES+1)
|
|
#define AQDB_DB_DIR_TID_ROLLBACKLOG (AQDB_DB_DIR_MAX_OPEN_TABLES+2)
|
|
|
|
#define AQDB_DB_DIR_SESSION_FLAGS_ROLLBACK 0x00000001
|
|
|
|
|
|
#define AQDB_DBDIR_IDLIST_ENTRIES 256
|
|
|
|
|
|
#include <aqdatabase/aqdb_db.h>
|
|
|
|
#include "table_l.h"
|
|
|
|
|
|
AQDB_DB *AQDB_DbDir_new(const char *url);
|
|
|
|
const char *AQDB_DbDir_GetDataFolder(const AQDB_DB *db);
|
|
|
|
|
|
int AQDB_DbDir_IsInEditMode(const AQDB_DB *db);
|
|
int AQDB_DbDir_AdjustIdList(AQDB_DB *db, AQDB_ID tableId, GWEN_IDLIST64 *idl);
|
|
|
|
int AQDB_DbDir_ReadObjectFromSessionLog(AQDB_DB *db,
|
|
AQDB_ID tableId,
|
|
AQDB_ID objectId,
|
|
AQDB_OBJECT **pObject);
|
|
|
|
int AQDB_DbDir_FindTableByName(AQDB_DB *db,
|
|
const char *tname,
|
|
AQDB_DBDIR_TABLE **pTable);
|
|
|
|
|
|
int AQDB_DbDir_ReallyDeleteObject(AQDB_DB *db,
|
|
AQDB_ID tableId,
|
|
AQDB_ID objectId);
|
|
int AQDB_DbDir_ReallyWriteObject(AQDB_DB *db, const AQDB_OBJECT *object);
|
|
int AQDB_DbDir_ReallyAddObject(AQDB_DB *db,
|
|
AQDB_ID tableId,
|
|
AQDB_OBJECT *object);
|
|
|
|
int AQDB_DbDir_ReallyReadObject(AQDB_DB *db,
|
|
AQDB_ID tableId,
|
|
AQDB_ID objectId,
|
|
AQDB_OBJECT **pObject);
|
|
|
|
uint32_t AQDB_DbDir_GetSessionFlags(const AQDB_DB *db);
|
|
|
|
|
|
AQDB_OBJECT *AQDB_DbDir_Object_fromBuffer(AQDB_ID tableId,
|
|
AQDB_ID objectId,
|
|
uint32_t nfields,
|
|
const uint8_t *pStart,
|
|
uint32_t bsize);
|
|
|
|
int AQDB_DbDir_Object_toBuffer(const AQDB_OBJECT *o, GWEN_BUFFER *buf);
|
|
|
|
int AQDB_DbDir_GetColumnCount(AQDB_DB *db, AQDB_ID tableId);
|
|
|
|
|
|
int GWENHYWFAR_CB AQDB_DbDir_BeginEdit(AQDB_DB *db, uint32_t flags, const char *userName);
|
|
|
|
|
|
#endif
|