Main Page   Class Hierarchy   Compound List   File List   Compound Members  

hashtab.h

00001 //-< HASHTAB.CPP >---------------------------------------------------*--------*
00002 // GigaBASE                  Version 1.0         (c) 1999  GARRET    *     ?  *
00003 // (Post Relational Database Management System)                      *   /\|  *
00004 //                                                                   *  /  \  *
00005 //                          Created:     20-Nov-98    K.A. Knizhnik  * / [] \ *
00006 //                          Last update: 10-Dec-98    K.A. Knizhnik  * GARRET *
00007 //-------------------------------------------------------------------*--------*
00008 // Extensible hash table interface
00009 //-------------------------------------------------------------------*--------*
00010 
00011 #ifndef __HASHTAB_H__
00012 #define __HASHTAB_H__
00013 
00014 BEGIN_GIGABASE_NAMESPACE
00015 
00016 class dbHashTableItem {
00017   public:
00018     oid_t next;
00019     oid_t record;
00020     nat4  hash;
00021 };
00022 
00023 const size_t dbInitHashTableSize = 16*1024-1;
00024 
00025 
00026 class GIGABASE_DLL_ENTRY dbHashTable {
00027     nat4  size;
00028     nat4  used;
00029     oid_t page;
00030 
00031     static unsigned hashCode(byte* key, int keylen);
00032     static int const keySize[];
00033 
00034   public:
00035     static oid_t allocate(dbDatabase* db, size_t nRows = 0);
00036 
00037     static void  insert(dbDatabase* db, oid_t hashId,
00038                         oid_t rowId, int type, int offs, size_t nRows);
00039 
00040     static void  remove(dbDatabase* db, oid_t hashId,
00041                         oid_t rowId, int type, int offs);
00042 
00043     static void  find(dbDatabase* db, oid_t hashId, dbSearchContext& sc);
00044 
00045     static void  drop(dbDatabase* db, oid_t hashId);
00046 
00047     static void  purge(dbDatabase* db, oid_t hashId);
00048 };
00049 
00050 END_GIGABASE_NAMESPACE
00051 
00052 #endif

Generated on Thu Feb 14 21:46:03 2008 for GigaBASE by doxygen1.2.18