NCBI C++ ToolKit
Classes | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
BDB library files and cursors
+ Collaboration diagram for BDB library files and cursors:

Classes

class  CBDB_ConditionHandle
 File cursor condition handle. More...
 
class  CBDB_FileCursor
 Berkeley DB file cursor class. More...
 
class  CBDB_CursorGuard
 BDB Cursor guard. More...
 
class  CBDB_RawFile
 Raw file class wraps up basic Berkeley DB operations. More...
 
class  CBDB_MultiRowBuffer
 Multirow buffer for reading many rows in one call. More...
 
class  CBDB_File
 Berkeley DB file class. More...
 
class  CBDB_IdFile
 Berkeley DB file class optimized to work with tables having int as the primary key. More...
 
class  CBDB_FileDumper
 Utility class to convert DBD files into text files. More...
 

Typedefs

typedef unsigned long CBDB_FileCursor::TRecordCount
 
typedef CSimpleBuffer CBDB_RawFile::TBuffer
 typedef for raw buffer operations More...
 
typedef bool(* CBDB_RawFile::FContinueCompact) (void)
 Extended version of compact This version performs iterative compacting and uses a callback to request an exit. More...
 
typedef int CBDB_File::TUnifiedFieldIndex
 CBDB_File keeps data in two buffers (key buffer and data buffer). More...
 
typedef unsigned int CBDB_FileDumper::TBlobFormat
 

Enumerations

enum  CBDB_FileCursor::ECondition {
  CBDB_FileCursor::eNotSet , CBDB_FileCursor::eFirst , CBDB_FileCursor::eLast , CBDB_FileCursor::eEQ ,
  CBDB_FileCursor::eGT , CBDB_FileCursor::eGE , CBDB_FileCursor::eLT , CBDB_FileCursor::eLE
}
 
enum  CBDB_FileCursor::EFetchDirection { CBDB_FileCursor::eForward , CBDB_FileCursor::eBackward , CBDB_FileCursor::eCurrent , CBDB_FileCursor::eDefault }
 
enum  CBDB_FileCursor::ECursorUpdateType { CBDB_FileCursor::eReadUpdate , CBDB_FileCursor::eReadModifyUpdate }
 Type of locking when fetching records. More...
 
enum  CBDB_FileCursor::EMultiFetchMode { CBDB_FileCursor::eFetchAll , CBDB_FileCursor::eFetchGetBufferEnds }
 Fetch mode regulates multi-row fetches eFetchAll (default mode) when buffer ends, cursor automatically reads the next buffer eFetchGetBufferEnds - returns eBDB_MultiRowEnd every time cursor needs to read from disk. More...
 
enum  EBDB_ErrCode {
  eBDB_Ok , eBDB_NotFound , eBDB_KeyDup , eBDB_KeyEmpty ,
  eBDB_MultiRowEnd
}
 BDB Return codes. More...
 
enum  CBDB_RawFile::EOpenMode { CBDB_RawFile::eReadWrite , CBDB_RawFile::eReadOnly , CBDB_RawFile::eCreate , CBDB_RawFile::eReadWriteCreate }
 BDB file open mode. More...
 
enum  CBDB_RawFile::EDBType { CBDB_RawFile::eBtree , CBDB_RawFile::eQueue , CBDB_RawFile::eHash }
 Berkeley DB database type. More...
 
enum  CBDB_RawFile::EReallocMode { CBDB_RawFile::eReallocAllowed , CBDB_RawFile::eReallocForbidden }
 BLOB read mode, controld data buffer reallocation when there is not enough space in buffer. More...
 
enum  CBDB_RawFile::EDuplicateKeys { CBDB_RawFile::eDuplicatesDisable , CBDB_RawFile::eDuplicatesEnable }
 Control key duplicates in Btree. More...
 
enum  CBDB_RawFile::EIgnoreError { CBDB_RawFile::eIgnoreError , CBDB_RawFile::eThrowOnError }
 
enum  CBDB_RawFile::ECompact { CBDB_RawFile::eCompactNoFree , CBDB_RawFile::eCompactFreeExisting , CBDB_RawFile::eCompactFreeAll }
 BerkeleyDB compaction methods and flags. More...
 
enum  CBDB_RawFile::ECachePriority {
  CBDB_RawFile::eCache_Lowest , CBDB_RawFile::eCache_Low , CBDB_RawFile::eCache_Default , CBDB_RawFile::eCache_High ,
  CBDB_RawFile::eCache_Highest
}
 Set the priority for this database's pages in the buffer cache This is generally a temporary advisement, and works only if an environment is used. More...
 
enum  CBDB_File::EAfterWrite { CBDB_File::eKeepData , CBDB_File::eDiscardData }
 
enum  CBDB_FileDumper::EPrintFieldNames { CBDB_FileDumper::ePrintNames , CBDB_FileDumper::eDropNames }
 
enum  CBDB_FileDumper::EValueFormatting { CBDB_FileDumper::eNoQuotes , CBDB_FileDumper::eQuoteStrings , CBDB_FileDumper::eQuoteAll }
 Field value formatting controls. More...
 
enum  CBDB_FileDumper::EBlobFormatting { CBDB_FileDumper::eBlobSummary = (1 << 0) , CBDB_FileDumper::eBlobAll = (1 << 1) , CBDB_FileDumper::eBlobAsHex = (1 << 2) , CBDB_FileDumper::eBlobAsTxt = (1 << 3) }
 BLOB value formatting controls. More...
 

Functions

CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (int val)
 
CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (unsigned int val)
 
CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (float val)
 
CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (double val)
 
CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (const char *val)
 
CBDB_ConditionHandleCBDB_ConditionHandle::operator<< (const string &val)
 
 CBDB_ConditionHandle::CBDB_ConditionHandle (CBDB_FC_Condition &cond)
 
 CBDB_ConditionHandle::~CBDB_ConditionHandle ()
 
 CBDB_FileCursor::CBDB_FileCursor (CBDB_File &dbf, ECursorUpdateType utype=eReadUpdate)
 
 CBDB_FileCursor::CBDB_FileCursor (CBDB_File &dbf, CBDB_Transaction &trans, ECursorUpdateType utype=eReadUpdate)
 
 CBDB_FileCursor::~CBDB_FileCursor ()
 
void CBDB_FileCursor::InitMultiFetch (size_t buffer_size, EMultiFetchMode mfm=eFetchAll)
 Init multi-row fetch. More...
 
void CBDB_FileCursor::SetCondition (ECondition cond_from, ECondition cond_to=eNotSet)
 Set search condition(type of interval) More...
 
void CBDB_FileCursor::SetFetchDirection (EFetchDirection fdir)
 
EFetchDirection CBDB_FileCursor::GetFetchDirection () const
 
EFetchDirection CBDB_FileCursor::GetReverseFetchDirection () const
 
void CBDB_FileCursor::ReverseFetchDirection ()
 
EBDB_ErrCode CBDB_FileCursor::FetchFirst ()
 
EBDB_ErrCode CBDB_FileCursor::FetchFirst (void **buf, size_t buf_size, CBDB_RawFile::EReallocMode allow_realloc)
 Fetch BLOB. More...
 
EBDB_ErrCode CBDB_FileCursor::FetchFirst (CBDB_RawFile::TBuffer *buf)
 Fetch BLOB. More...
 
EBDB_ErrCode CBDB_FileCursor::Fetch (EFetchDirection fdir=eDefault)
 Fetch record. More...
 
EBDB_ErrCode CBDB_FileCursor::Fetch (EFetchDirection fdir, void **buf, size_t buf_size, CBDB_RawFile::EReallocMode allow_realloc)
 Fetch BLOB. More...
 
EBDB_ErrCode CBDB_FileCursor::Fetch (CBDB_RawFile::TBuffer *buf, EFetchDirection fdir=eDefault)
 Fetch BLOB. More...
 
EBDB_ErrCode CBDB_FileCursor::Update (CBDB_File::EAfterWrite write_flag=CBDB_File::eDiscardData)
 
EBDB_ErrCode CBDB_FileCursor::Delete (CBDB_File::EIgnoreError on_error=CBDB_File::eThrowOnError)
 
EBDB_ErrCode CBDB_FileCursor::UpdateBlob (const void *data, size_t size, CBDB_File::EAfterWrite write_flag=CBDB_File::eDiscardData)
 
const void * CBDB_FileCursor::GetLastMultiFetchData () const
 Get data pointer from last fetch (only when in multifetch mode) More...
 
size_t CBDB_FileCursor::GetLastMultiFetchDataLen () const
 Get data length from last fetch (only when in multifetch mode) More...
 
TRecordCount CBDB_FileCursor::KeyDupCount () const
 
CBDB_FileCBDB_FileCursor::GetDBFile ()
 Return database file on which cursor is based. More...
 
void CBDB_FileCursor::Close ()
 Close underlying cursor. More...
 
void CBDB_FileCursor::ReOpen (CBDB_Transaction *trans)
 Reopen cursor after Close. More...
 
bool CBDB_FileCursor::IsOpen () const
 TRUE when cursor open. More...
 
bool CBDB_FileCursor::TestTo () const
 Test "TO" search criteria. Return "true" if current value satisfies it. More...
 
void CBDB_FileCursor::ResetFirstFetched ()
 Set m_FirstFetched field to FALSE. More...
 
IBDB_FieldConvertCBDB_FileCursor::GetFieldConvert (CBDB_BufferManager &buf, unsigned int n)
 Return next field's IBDB_FieldConvert interface (hidden cast to non-public parent class) More...
 
 CBDB_FileCursor::CBDB_FileCursor (const CBDB_FileCursor &)
 forbidden More...
 
CBDB_FileCursorCBDB_FileCursor::operator= (const CBDB_FileCursor &)
 
void CBDB_FileCursor::x_FetchFirst_Prolog (unsigned int &flag)
 
 CBDB_CursorGuard::CBDB_CursorGuard (CBDB_FileCursor &cur)
 
 CBDB_CursorGuard::~CBDB_CursorGuard ()
 
 CBDB_CursorGuard::CBDB_CursorGuard (CBDB_CursorGuard &)
 
CBDB_CursorGuardCBDB_CursorGuard::operator= (const CBDB_CursorGuard &)
 
 CBDB_RawFile::CBDB_RawFile (EDuplicateKeys dup_keys=eDuplicatesDisable, EDBType db_type=eBtree)
 
virtual CBDB_RawFile::~CBDB_RawFile ()
 
void CBDB_RawFile::SetEnv (CBDB_Env &env)
 Associate file with environment. More...
 
CBDB_EnvCBDB_RawFile::GetEnv ()
 Get pointer on file environment Return NULL if no environment has been set. More...
 
void CBDB_RawFile::Open (const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
 Open file with specified access mode. More...
 
void CBDB_RawFile::Open (const string &filename, const string &database, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
 Open file with specified filename and database name. More...
 
void CBDB_RawFile::Attach (CBDB_RawFile &bdb_file)
 Attach class to external BerkeleyDB file instance. More...
 
void CBDB_RawFile::Close ()
 Close file. More...
 
void CBDB_RawFile::Reopen (EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
 Reopen database file. (Should be already open). More...
 
void CBDB_RawFile::Remove (const string &filename, const string &database=kEmptyStr)
 Remove the database specified by the filename and database arguments. More...
 
unsigned int CBDB_RawFile::Truncate ()
 Empty the database. Return number of records removed. More...
 
unsigned int CBDB_RawFile::SafeTruncate ()
 Workaround for truncate of large databases. More...
 
void CBDB_RawFile::Rename (const string &fname, const string &old_name, const string &new_name)
 Rename a database. NOTE: This cannot be called on an opened file. More...
 
void CBDB_RawFile::Compact (ECompact compact_type=eCompactNoFree, int target_fill_pct=0)
 Compact the database. More...
 
void CBDB_RawFile::CompactEx (FContinueCompact compact_callback, ECompact compact_type=eCompactNoFree, int target_fill_pct=0)
 
void CBDB_RawFile::SetPageSize (unsigned int page_size)
 
unsigned int CBDB_RawFile::GetPageSize ()
 
void CBDB_RawFile::SetCacheSize (unsigned int cache_size)
 Set Berkeley DB memory cache size for the file (default is 256K). More...
 
void CBDB_RawFile::RevSplitOff ()
 Turn OFF reverse splitting. More...
 
void CBDB_RawFile::DisableCmpOverride ()
 Disable BTREE comparison override. More...
 
void CBDB_RawFile::SetCachePriority (ECachePriority priority)
 
const stringCBDB_RawFile::FileName () const
 
const stringCBDB_RawFile::Database () const
 
virtual void CBDB_RawFile::SetCmp (DB *)=0
 Set comparison function. More...
 
virtual void CBDB_RawFile::SetHash (DB *)
 Set hash function. More...
 
bool CBDB_RawFile::IsOpen () const
 Return TRUE if the file is open. More...
 
bool CBDB_RawFile::IsAttached () const
 
bool CBDB_RawFile::IsByteSwapped () const
 Return TRUE if the if the underlying database files were created on an architecture of the different byte order. More...
 
bool CBDB_RawFile::DuplicatesAllowed () const
 Return TRUE if file can contain duplicate keys. More...
 
EDuplicateKeys CBDB_RawFile::GetDupKeysMode () const
 Return the key duplicate mode value. More...
 
const stringCBDB_RawFile::GetFileName () const
 Return file name. More...
 
EOpenMode CBDB_RawFile::GetOpenMode () const
 Return the file open mode. More...
 
void CBDB_RawFile::Sync ()
 Flush any cached information to disk. More...
 
unsigned CBDB_RawFile::CountRecs (bool bFast=false)
 Compute database statistic, return number of records. More...
 
void CBDB_RawFile::PrintStat (CNcbiOstream &out)
 Print database statistics. More...
 
virtual void CBDB_RawFile::SetTransaction (ITransaction *trans)
 Establish transaction association. More...
 
virtual void CBDB_RawFile::RemoveTransaction (ITransaction *trans)
 Remove transaction association (must be established by SetTransaction. More...
 
virtual ITransactionCBDB_RawFile::GetTransaction ()
 Get current transaction. More...
 
CBDB_TransactionCBDB_RawFile::GetBDBTransaction ()
 Get current transaction. More...
 
unsigned CBDB_RawFile::GetRecLen () const
 Get record length Works for fixed length record DBs only (Queue) More...
 
void CBDB_RawFile::SetHashFillFactor (unsigned h_ffactor)
 Set hash table density (fill factor) More...
 
void CBDB_RawFile::SetHashNelem (unsigned h_nelem)
 Set an estimate of hash table final size. More...
 
void CBDB_RawFile::DisableHashOverride ()
 Disable hash method override (Berkeley DB will use it's own default hashing method) More...
 
void CBDB_RawFile::SetBtreeMinKeysPerPage (unsigned int keys_per_page)
 Set the minimum number of keys per page (BTREE access methods only) More...
 
unsigned int CBDB_RawFile::GetBtreeMinKeysPerPage ()
 
void CBDB_RawFile::SetCompressor (ICompression *compressor, EOwnership own=eTakeOwnership)
 Set record compressor. More...
 
 CBDB_RawFile::CBDB_RawFile (const CBDB_RawFile &)
 forbidden More...
 
CBDB_RawFileCBDB_RawFile::operator= (const CBDB_RawFile &)
 
void CBDB_RawFile::x_Open (const char *filename, const char *database, EOpenMode open_mode, bool support_dirty_read, unsigned rec_len)
 
void CBDB_RawFile::x_Create (const char *filename, const char *database)
 
void CBDB_RawFile::x_Close (EIgnoreError close_mode)
 
void CBDB_RawFile::x_CreateDB (unsigned rec_len)
 Create m_DB member, set page, cache parameters. More...
 
void CBDB_RawFile::x_SetTransaction (CBDB_Transaction *trans)
 Set current transaction. More...
 
void CBDB_RawFile::x_RemoveTransaction (CBDB_Transaction *trans)
 
DB_TXNCBDB_RawFile::GetTxn ()
 Get transaction handler. More...
 
DBCCBDB_RawFile::CreateCursor (CBDB_Transaction *trans=0, unsigned int flags=0) const
 Create DB cursor. More...
 
int CBDB_RawFile::x_DB_Fetch (DBT *key, DBT *data, unsigned flags)
 Internal override for DB->get(...) This method overrides destination buffer and uses compressor: Should only be used with DB_DBT_USERMEM flag. More...
 
int CBDB_RawFile::x_DBC_Fetch (DBC *dbc, DBT *key, DBT *data, unsigned flags)
 Internal override for DBC->c_get(...) This method overrides destination buffer and uses compressor: Should only be used with DB_DBT_USERMEM flag. More...
 
int CBDB_RawFile::x_DB_Put (DBT *key, DBT *data, unsigned flags)
 Override for DB->put(...) Handles compression. More...
 
int CBDB_RawFile::x_DB_CPut (DBC *dbc, DBT *key, DBT *data, unsigned flags)
 Override for DBC->c_put(...) Handles compression. More...
 
int CBDB_RawFile::x_FetchBufferDecompress (DBT *data, void *usr_data)
 
virtual void CBDB_RawFile::x_SetByteSwapped (bool bswp)
 Set byte order swapping. More...
 
 CBDB_MultiRowBuffer::CBDB_MultiRowBuffer (size_t buf_size)
 
 CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer ()
 
const void * CBDB_MultiRowBuffer::GetLastDataPtr () const
 Get data buffer pointer from last cursor read. More...
 
size_t CBDB_MultiRowBuffer::GetLastDataLen () const
 Get BLOB length from last cursor read. More...
 
void CBDB_MultiRowBuffer::InitDBT ()
 
void CBDB_MultiRowBuffer::MultipleInit ()
 
 CBDB_MultiRowBuffer::CBDB_MultiRowBuffer (const CBDB_MultiRowBuffer &)
 
CBDB_MultiRowBufferCBDB_MultiRowBuffer::operator= (const CBDB_MultiRowBuffer &)
 
 CBDB_File::CBDB_File (EDuplicateKeys dup_keys=eDuplicatesDisable, EDBType db_type=eBtree)
 
void CBDB_File::Open (const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
 Open file with specified access mode. More...
 
void CBDB_File::Open (const string &filename, const string &database, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
 Open file with specified filename and database name. More...
 
void CBDB_File::Reopen (EOpenMode open_mode, bool support_dirty_read=false)
 Reopen the db file. More...
 
void CBDB_File::Attach (CBDB_File &db_file)
 Attach external Berkeley DB file. More...
 
EBDB_ErrCode CBDB_File::Fetch ()
 Fetches the record corresponding to the current key value. More...
 
EBDB_ErrCode CBDB_File::FetchForUpdate ()
 Fetche the record corresponding to the current key value. More...
 
EBDB_ErrCode CBDB_File::Insert (EAfterWrite write_flag=eDiscardData)
 Insert new record. More...
 
unsigned CBDB_File::Append (EAfterWrite write_flag=eDiscardData)
 Append record to the queue (works only for DB_QUEUE database type) More...
 
EBDB_ErrCode CBDB_File::Delete (EIgnoreError on_error=eThrowOnError)
 Delete record corresponding to the current key value. More...
 
EBDB_ErrCode CBDB_File::UpdateInsert (EAfterWrite write_flag=eDiscardData)
 Update record corresponding to the current key value. More...
 
void CBDB_File::BindKey (const char *field_name, CBDB_Field *key_field, size_t buf_size=0)
 
void CBDB_File::BindData (const char *field_name, CBDB_Field *data_field, size_t buf_size=0, ENullable is_null=eNullable)
 
void CBDB_File::DuplicateStructure (const CBDB_File &dbf)
 Create the same fieldset as in dbf and bind them to the current file. More...
 
const CBDB_BufferManagerCBDB_File::GetKeyBuffer () const
 Get Buffer manager for key section of the file. More...
 
const CBDB_BufferManagerCBDB_File::GetDataBuffer () const
 Get Buffer manager for data section of the file. More...
 
CBDB_BufferManagerCBDB_File::GetKeyBuffer ()
 Get Buffer manager for key section of the file. More...
 
CBDB_BufferManagerCBDB_File::GetDataBuffer ()
 Get Buffer manager for data section of the file. More...
 
void CBDB_File::SetFieldCompareLimit (unsigned int n_fields)
 Sets maximum number of key fields participating in comparison Should be less than total number of key fields. More...
 
DBTCBDB_File::CloneDBT_Key ()
 Create new copy of m_DBT_Key. More...
 
static void CBDB_File::DestroyDBT_Clone (DBT *dbt)
 Free the DBT structure created by CloneDBT_Key. More...
 
void CBDB_File::SetLegacyStringsCheck (bool value)
 Set C-str detection. More...
 
TUnifiedFieldIndex CBDB_File::GetFieldIdx (const string &name) const
 Get field index by name. More...
 
const CBDB_FieldCBDB_File::GetField (TUnifiedFieldIndex idx) const
 Return field by field index. More...
 
CBDB_FieldCBDB_File::GetField (TUnifiedFieldIndex idx)
 
void CBDB_File::SetFieldOwnership (bool own_fields)
 Fields deletion is managed by the class when own_fields is TRUE. More...
 
bool CBDB_File::IsOwnFields () const
 Return fields ownership flag. More...
 
void CBDB_File::CopyFrom (const CBDB_File &dbf)
 Copy record (fields) from another BDB file (MUST have the same structure) More...
 
void CBDB_File::Verify (const char *filename, const char *database, FILE *backup)
 Run database verification (DB->verify) More...
 
void CBDB_File::EnablePrefixCompression ()
 Turn ON prefix compression. More...
 
void CBDB_File::Discard ()
 Unpack internal record buffers. More...
 
virtual void CBDB_File::SetCmp (DB *)
 Set comparison function. More...
 
EBDB_ErrCode CBDB_File::ReadCursor (DBC *dbc, unsigned int bdb_flag)
 Read DB cursor. More...
 
EBDB_ErrCode CBDB_File::ReadCursor (DBC *dbc, unsigned int bdb_flag, void **buf, size_t buf_size, EReallocMode allow_realloc)
 Read DB cursor (BLOB) More...
 
EBDB_ErrCode CBDB_File::ReadCursor (DBC *dbc, unsigned int bdb_flag, TBuffer *buf)
 Read DB cursor (BLOB) More...
 
EBDB_ErrCode CBDB_File::ReadCursor (DBC *dbc, unsigned int bdb_flag, CBDB_MultiRowBuffer *multirow_buf, bool multirow_only)
 Multiple-row read into a buffer Buffer is to be traversed using DB_MULTIPLE_KEY_NEXT (BerkeleyDB) More...
 
EBDB_ErrCode CBDB_File::WriteCursor (DBC *dbc, unsigned int bdb_flag, EAfterWrite write_flag)
 Write DB cursor. More...
 
EBDB_ErrCode CBDB_File::WriteCursor (const void *data, size_t size, DBC *dbc, unsigned int bdb_flag, EAfterWrite write_flag)
 Write BLOB to DB cursor. More...
 
EBDB_ErrCode CBDB_File::DeleteCursor (DBC *dbc, EIgnoreError)
 Delete DB cursor. More...
 
void CBDB_File::CheckNullDataConstraint () const
 Check if all NOT NULL fields are assigned. More...
 
void CBDB_File::DisableDataBufProcessing ()
 Function disables processing of m_DBT_data. More...
 
void CBDB_File::DisableNull ()
 Disable NULL/not NULL in data fields (Performance tweak, call before BindData) More...
 
void CBDB_File::DisableDataPacking ()
 Disable packing of variable length fields in the data buffer (Call after BindData) More...
 
EBDB_ErrCode CBDB_File::x_Fetch (unsigned int flags)
 Wrapper around get operation. More...
 
virtual void CBDB_File::x_SetByteSwapped (bool bswp)
 Set byte order swapping. More...
 
 CBDB_File::CBDB_File (const CBDB_File &)
 forbidden More...
 
CBDB_FileCBDB_File::operator= (const CBDB_File &)
 
void CBDB_File::x_StartRead ()
 Record reading prolog function. More...
 
void CBDB_File::x_EndRead ()
 Record reading epilog function. More...
 
EBDB_ErrCode CBDB_File::x_Write (unsigned int flags, EAfterWrite write_flag, DBC *dbc=0)
 
void CBDB_File::x_CheckConstructBuffers ()
 
void CBDB_File::x_ConstructKeyBuf ()
 
void CBDB_File::x_ConstructDataBuf ()
 
static int CBDB_File::x_CompareShim (DB *db, const DBT *dbt1, const DBT *dbt2, size_t *locp)
 
 CBDB_IdFile::CBDB_IdFile ()
 
virtual void CBDB_IdFile::SetCmp (DB *db)
 Set comparison function. More...
 
CBDB_File::TUnifiedFieldIndex BDB_GetUFieldIdx (int fidx, bool key)
 Make field index in CBDB_File format. More...
 
 CBDB_FileDumper::CBDB_FileDumper (const string &col_separator="\t")
 Constructor. More...
 
 CBDB_FileDumper::CBDB_FileDumper (const CBDB_FileDumper &fdump)
 
 CBDB_FileDumper::~CBDB_FileDumper ()
 
CBDB_FileDumperCBDB_FileDumper::operator= (const CBDB_FileDumper &fdump)
 
void CBDB_FileDumper::SetColumnSeparator (const string &col_separator)
 
void CBDB_FileDumper::SetColumnNames (EPrintFieldNames print_names)
 Control field names printing. More...
 
void CBDB_FileDumper::SetValueFormatting (EValueFormatting vf)
 
void CBDB_FileDumper::SetBlobFormat (TBlobFormat bf)
 
TBlobFormat CBDB_FileDumper::GetBlobFormat () const
 
void CBDB_FileDumper::Dump (const string &dump_file_name, CBDB_File &db)
 Convert BDB file into text file. More...
 
void CBDB_FileDumper::Dump (CNcbiOstream &out, CBDB_File &db)
 Convert BDB file into text and write it into the specified stream. More...
 
void CBDB_FileDumper::Dump (CNcbiOstream &out, CBDB_FileCursor &cur)
 Dump BDB cursor to stream. More...
 
unsigned CBDB_FileDumper::GetRecordsDumped () const
 Return number of records processed by Dump. More...
 
void CBDB_FileDumper::SetQuery (const string &query_str)
 Set query filter. More...
 
void CBDB_FileDumper::SetBlobDumpFile (const string &fname)
 Set BLOB dump file name. More...
 
void CBDB_FileDumper::SetOutFile (CBDB_File *out_dbf)
 Set reference on output file (mode when all dumped records are put into a separate database) Class does not take ownership on out_dbf. More...
 
void CBDB_FileDumper::PrintHeader (CNcbiOstream &out, const CBDB_BufferManager *key, const CBDB_BufferManager *data)
 
void CBDB_FileDumper::x_SetQuoteFlags (vector< unsigned > *flags, const CBDB_BufferManager &bman)
 
void CBDB_FileDumper::x_DumpFields (CNcbiOstream &out, const CBDB_BufferManager &bman, const vector< unsigned > &quote_flags, bool is_key)
 

Variables

CBDB_FC_ConditionCBDB_ConditionHandle::m_Condition
 
CBDB_FileCBDB_FileCursor::m_Dbf
 Reference on the "mother" file. More...
 
CBDB_ConditionHandle CBDB_FileCursor::From
 
CBDB_ConditionHandle CBDB_FileCursor::To
 
DBCCBDB_FileCursor::m_DBC
 Berkeley DB DBC thing. More...
 
ECondition CBDB_FileCursor::m_CondFrom
 From condition proxy-object. More...
 
ECondition CBDB_FileCursor::m_CondTo
 To condition proxy-object. More...
 
EFetchDirection CBDB_FileCursor::m_FetchDirection
 Fetch direction (forward/backward) More...
 
bool CBDB_FileCursor::m_FirstFetched
 Flag if FetchFirst is already been done. More...
 
unsigned int CBDB_FileCursor::m_FetchFlags
 Type of locking (conventional or RMW) More...
 
CBDB_MultiRowBufferCBDB_FileCursor::m_MultiRowBuf
 Buffer class for multiple fetch. More...
 
EMultiFetchMode CBDB_FileCursor::m_MultiFetchMode
 Multifetch control mode. More...
 
bool CBDB_FileCursor::m_LastMultiFetchSuccess
 when true, last multifetch was successfull More...
 
CBDB_FileCursorCBDB_CursorGuard::m_Cur
 
static const char CBDB_RawFile::kDefaultDatabase [] = "_table"
 
EDBType CBDB_RawFile::m_DB_Type
 
DBCBDB_RawFile::m_DB
 
DBTCBDB_RawFile::m_DBT_Key
 
DBTCBDB_RawFile::m_DBT_Data
 
CBDB_EnvCBDB_RawFile::m_Env
 
CBDB_TransactionCBDB_RawFile::m_Trans
 
int CBDB_RawFile::m_TransAssociation
 
unsigned CBDB_RawFile::m_RecLen
 
unsigned CBDB_RawFile::m_H_ffactor
 
unsigned CBDB_RawFile::m_H_nelem
 
unsigned CBDB_RawFile::m_BT_minkey
 
AutoPtr< ICompressionCBDB_RawFile::m_Compressor
 Record compressor. More...
 
TBuffer CBDB_RawFile::m_CompressBuffer
 
bool CBDB_RawFile::m_DB_Attached
 TRUE if m_DB doesn't belong here. More...
 
bool CBDB_RawFile::m_ByteSwapped
 TRUE if file created on a diff.arch. More...
 
bool CBDB_RawFile::m_RevSplitOff
 TRUE if reverse splitting is off. More...
 
bool CBDB_RawFile::m_CmpOverride
 TRUE - NCBI BDB sets its own cmp. More...
 
string CBDB_RawFile::m_FileName
 filename More...
 
string CBDB_RawFile::m_Database
 db name in file (optional) More...
 
unsigned CBDB_RawFile::m_PageSize
 
unsigned CBDB_RawFile::m_CacheSize
 
EDuplicateKeys CBDB_RawFile::m_DuplicateKeys
 
EOpenMode CBDB_RawFile::m_OpenMode
 
static const int CBDB_RawFile::kOpenFileMask = 0664
 
DBTCBDB_MultiRowBuffer::m_Data_DBT
 Temp DBT for multiple fetch. More...
 
void * CBDB_MultiRowBuffer::m_Buf
 Multiple row buffer. More...
 
size_t CBDB_MultiRowBuffer::m_BufSize
 buffer size More...
 
void * CBDB_MultiRowBuffer::m_BufPtr
 current buffer position More...
 
void * CBDB_MultiRowBuffer::m_LastKey
 Last key pointer returned by DB_MULTIPLE_KEY_NEXT. More...
 
void * CBDB_MultiRowBuffer::m_LastData
 Last data pointer returned by DB_MULTIPLE_KEY_NEXT. More...
 
size_t CBDB_MultiRowBuffer::m_LastKeyLen
 
size_t CBDB_MultiRowBuffer::m_LastDataLen
 
unique_ptr< CBDB_BufferManagerCBDB_File::m_KeyBuf
 
unique_ptr< CBDB_BufferManagerCBDB_File::m_DataBuf
 
bool CBDB_File::m_BufsAttached
 
bool CBDB_File::m_BufsCreated
 
bool CBDB_File::m_DataBufDisabled
 
bool CBDB_File::m_LegacyString
 
bool CBDB_File::m_OwnFields
 
bool CBDB_File::m_DisabledNull
 
bool CBDB_File::m_PrefixCompress
 TRUE if prefix compression ON. More...
 
CBDB_FieldInt4 CBDB_IdFile::IdKey
 
string CBDB_FileDumper::m_ColumnSeparator
 
string CBDB_FileDumper::m_BlobDumpFname
 
EPrintFieldNames CBDB_FileDumper::m_PrintNames
 
EValueFormatting CBDB_FileDumper::m_ValueFormatting
 
TBlobFormat CBDB_FileDumper::m_BlobFormat
 
unsigned int CBDB_FileDumper::m_RecordsDumped
 
string CBDB_FileDumper::m_QueryStr
 
CBDB_QueryCBDB_FileDumper::m_Query
 
CBDB_FileCBDB_FileDumper::m_OutFile
 

Friends

class CBDB_ConditionHandle::CBDB_FileCursor
 
class CBDB_FileCursor::CBDB_FC_Condition
 
class CBDB_RawFile::CBDB_FileCursor
 
class CBDB_MultiRowBuffer::CBDB_File
 
class CBDB_File::CBDB_FileCursor
 

Detailed Description

Typedef Documentation

◆ FContinueCompact

typedef bool(* CBDB_RawFile::FContinueCompact) (void)

Extended version of compact This version performs iterative compacting and uses a callback to request an exit.

Definition at line 182 of file bdb_file.hpp.

◆ TBlobFormat

Definition at line 100 of file bdb_filedump.hpp.

◆ TBuffer

typedef for raw buffer operations

Definition at line 125 of file bdb_file.hpp.

◆ TRecordCount

typedef unsigned long CBDB_FileCursor::TRecordCount

Definition at line 122 of file bdb_cursor.hpp.

◆ TUnifiedFieldIndex

CBDB_File keeps data in two buffers (key buffer and data buffer).

TUnifiedFieldIndex is used to address fields in a non-ambigiuos manner. Negative index addresses fields in the key buffer, positive - data buffer Numbers are 1 based, 0 - means non-existing field

Definition at line 542 of file bdb_file.hpp.

Enumeration Type Documentation

◆ EAfterWrite

Enumerator
eKeepData 

Keep the inserted data for a while.

eDiscardData 

Invalidate the inserted data immediately after write.

Definition at line 478 of file bdb_file.hpp.

◆ EBDB_ErrCode

BDB Return codes.

Enumerator
eBDB_Ok 
eBDB_NotFound 
eBDB_KeyDup 
eBDB_KeyEmpty 
eBDB_MultiRowEnd 

Definition at line 57 of file bdb_file.hpp.

◆ EBlobFormatting

BLOB value formatting controls.

See also
SetBlobFormatting
Enumerator
eBlobSummary 
eBlobAll 
eBlobAsHex 
eBlobAsTxt 

Definition at line 92 of file bdb_filedump.hpp.

◆ ECachePriority

Set the priority for this database's pages in the buffer cache This is generally a temporary advisement, and works only if an environment is used.

Enumerator
eCache_Lowest 
eCache_Low 
eCache_Default 
eCache_High 
eCache_Highest 

Definition at line 205 of file bdb_file.hpp.

◆ ECompact

BerkeleyDB compaction methods and flags.

Enumerator
eCompactNoFree 
eCompactFreeExisting 
eCompactFreeAll 

Definition at line 112 of file bdb_file.hpp.

◆ ECondition

Enumerator
eNotSet 
eFirst 
eLast 
eEQ 
eGT 
eGE 
eLT 
eLE 

Definition at line 98 of file bdb_cursor.hpp.

◆ ECursorUpdateType

Type of locking when fetching records.

Enumerator
eReadUpdate 

Default mode: optional update after read.

eReadModifyUpdate 

Use DB_RMW (write locking) on fetch.

Definition at line 117 of file bdb_cursor.hpp.

◆ EDBType

Berkeley DB database type.

Enumerator
eBtree 
eQueue 
eHash 

Definition at line 86 of file bdb_file.hpp.

◆ EDuplicateKeys

Control key duplicates in Btree.

Enumerator
eDuplicatesDisable 
eDuplicatesEnable 

Definition at line 101 of file bdb_file.hpp.

◆ EFetchDirection

Enumerator
eForward 
eBackward 
eCurrent 
eDefault 

Definition at line 109 of file bdb_cursor.hpp.

◆ EIgnoreError

Enumerator
eIgnoreError 
eThrowOnError 

Definition at line 106 of file bdb_file.hpp.

◆ EMultiFetchMode

Fetch mode regulates multi-row fetches eFetchAll (default mode) when buffer ends, cursor automatically reads the next buffer eFetchGetBufferEnds - returns eBDB_MultiRowEnd every time cursor needs to read from disk.

Enumerator
eFetchAll 
eFetchGetBufferEnds 

Definition at line 137 of file bdb_cursor.hpp.

◆ EOpenMode

BDB file open mode.

Enumerator
eReadWrite 
eReadOnly 
eCreate 

implies 'eReadWrite' too

eReadWriteCreate 

read-write, create if it doesn't exist

Definition at line 78 of file bdb_file.hpp.

◆ EPrintFieldNames

Enumerator
ePrintNames 
eDropNames 

Definition at line 68 of file bdb_filedump.hpp.

◆ EReallocMode

BLOB read mode, controld data buffer reallocation when there is not enough space in buffer.

Enumerator
eReallocAllowed 
eReallocForbidden 

Definition at line 95 of file bdb_file.hpp.

◆ EValueFormatting

Field value formatting controls.

See also
SetValueFormatting
Enumerator
eNoQuotes 
eQuoteStrings 
eQuoteAll 

Definition at line 80 of file bdb_filedump.hpp.

Function Documentation

◆ Append()

unsigned CBDB_File::Append ( EAfterWrite  write_flag = eDiscardData)

Append record to the queue (works only for DB_QUEUE database type)

Returns
record number (auto increment)

Definition at line 1479 of file bdb_file.cpp.

References flags, CBDB_RawFile::m_DBT_Key, and CBDB_File::x_Write().

Referenced by CBDB_BLobFile::Append().

◆ Attach() [1/2]

void CBDB_File::Attach ( CBDB_File db_file)

Attach external Berkeley DB file.

Note: Should be already open.

Definition at line 1366 of file bdb_file.cpp.

References CBDB_RawFile::Attach(), CBDB_File::m_LegacyString, CBDB_File::SetLegacyStringsCheck(), and CBDB_File::x_CheckConstructBuffers().

Referenced by db_map_base< K, T >::iterator_base::open_cursor().

◆ Attach() [2/2]

void CBDB_RawFile::Attach ( CBDB_RawFile bdb_file)

Attach class to external BerkeleyDB file instance.

Note: Should be already open.

Definition at line 196 of file bdb_file.cpp.

References CBDB_RawFile::Close(), CBDB_RawFile::m_DB, and CBDB_RawFile::m_DB_Attached.

Referenced by CBDB_File::Attach().

◆ BDB_GetUFieldIdx()

CBDB_File::TUnifiedFieldIndex BDB_GetUFieldIdx ( int  fidx,
bool  key 
)
inline

Make field index in CBDB_File format.

Definition at line 710 of file bdb_file.hpp.

References _ASSERT, and ncbi::grid::netcache::search::fields::key.

Referenced by BDB_find_field(), and CBDB_File::GetFieldIdx().

◆ BindData()

void CBDB_File::BindData ( const char *  field_name,
CBDB_Field data_field,
size_t  buf_size = 0,
ENullable  is_null = eNullable 
)

◆ BindKey()

void CBDB_File::BindKey ( const char *  field_name,
CBDB_Field key_field,
size_t  buf_size = 0 
)

◆ CBDB_ConditionHandle()

CBDB_ConditionHandle::CBDB_ConditionHandle ( CBDB_FC_Condition cond)
protected

Definition at line 143 of file bdb_cursor.cpp.

◆ CBDB_CursorGuard() [1/2]

CBDB_CursorGuard::CBDB_CursorGuard ( CBDB_CursorGuard )
private

◆ CBDB_CursorGuard() [2/2]

CBDB_CursorGuard::CBDB_CursorGuard ( CBDB_FileCursor cur)
inline

Definition at line 290 of file bdb_cursor.hpp.

◆ CBDB_File() [1/2]

CBDB_File::CBDB_File ( const CBDB_File )
private

forbidden

◆ CBDB_File() [2/2]

CBDB_File::CBDB_File ( EDuplicateKeys  dup_keys = eDuplicatesDisable,
EDBType  db_type = eBtree 
)

Definition at line 1241 of file bdb_file.cpp.

◆ CBDB_FileCursor() [1/3]

CBDB_FileCursor::CBDB_FileCursor ( CBDB_File dbf,
CBDB_Transaction trans,
ECursorUpdateType  utype = eReadUpdate 
)

◆ CBDB_FileCursor() [2/3]

CBDB_FileCursor::CBDB_FileCursor ( CBDB_File dbf,
ECursorUpdateType  utype = eReadUpdate 
)

◆ CBDB_FileCursor() [3/3]

CBDB_FileCursor::CBDB_FileCursor ( const CBDB_FileCursor )
private

forbidden

◆ CBDB_FileDumper() [1/2]

CBDB_FileDumper::CBDB_FileDumper ( const CBDB_FileDumper fdump)

Definition at line 59 of file bdb_filedump.cpp.

◆ CBDB_FileDumper() [2/2]

CBDB_FileDumper::CBDB_FileDumper ( const string col_separator = "\t")

Constructor.

Parameters
col_separatorColumn separator

Definition at line 48 of file bdb_filedump.cpp.

◆ CBDB_IdFile()

CBDB_IdFile::CBDB_IdFile ( )

Definition at line 2078 of file bdb_file.cpp.

References CBDB_File::BindKey(), and CBDB_IdFile::IdKey.

◆ CBDB_MultiRowBuffer() [1/2]

CBDB_MultiRowBuffer::CBDB_MultiRowBuffer ( const CBDB_MultiRowBuffer )
private

◆ CBDB_MultiRowBuffer() [2/2]

CBDB_MultiRowBuffer::CBDB_MultiRowBuffer ( size_t  buf_size)

Definition at line 88 of file bdb_file.cpp.

◆ CBDB_RawFile() [1/2]

CBDB_RawFile::CBDB_RawFile ( const CBDB_RawFile )
private

forbidden

◆ CBDB_RawFile() [2/2]

CBDB_RawFile::CBDB_RawFile ( EDuplicateKeys  dup_keys = eDuplicatesDisable,
EDBType  db_type = eBtree 
)

◆ CheckNullDataConstraint()

void CBDB_File::CheckNullDataConstraint ( ) const
inlineprotected

Check if all NOT NULL fields are assigned.

Throw an exception if constraint check failed.

Definition at line 783 of file bdb_file.hpp.

References CBDB_File::m_DataBuf, and CBDB_File::m_DisabledNull.

Referenced by CBDB_File::Insert(), CBDB_File::UpdateInsert(), and CBDB_File::WriteCursor().

◆ CloneDBT_Key()

DBT * CBDB_File::CloneDBT_Key ( )

Create new copy of m_DBT_Key.

Caller is responsible for proper deletion. See also: DestroyDBT_Clone

Definition at line 1438 of file bdb_file.cpp.

References CBDB_RawFile::m_DBT_Key, malloc(), CBDB_File::x_EndRead(), and CBDB_File::x_StartRead().

Referenced by CBDB_BLobFile::CreateReader(), CBDB_BLobFile::CreateReaderWriter(), and CBDB_BLobFile::CreateStream().

◆ Close() [1/2]

void CBDB_FileCursor::Close ( void  )

Close underlying cursor.

All associated buffers remain, so cursor can be quickly reopened.

Definition at line 233 of file bdb_cursor.cpp.

References CBDB_FileCursor::m_DBC.

Referenced by CBDB_FileCursor::ReOpen(), CBDB_CursorGuard::~CBDB_CursorGuard(), and CBDB_FileCursor::~CBDB_FileCursor().

◆ Close() [2/2]

void CBDB_RawFile::Close ( void  )

Close file.

Definition at line 191 of file bdb_file.cpp.

References CBDB_RawFile::eThrowOnError, and CBDB_RawFile::x_Close().

Referenced by CBDB_RawFile::Attach(), CBDB_RawFile::Open(), and CBDB_File::Open().

◆ Compact()

void CBDB_RawFile::Compact ( ECompact  compact_type = eCompactNoFree,
int  target_fill_pct = 0 
)

Compact the database.

The target fill percent per page can be supplied, to allow for known expansion

Definition at line 497 of file bdb_file.cpp.

References CBDB_RawFile::CompactEx(), and s_DefaultCompactCallback().

◆ CompactEx()

void CBDB_RawFile::CompactEx ( FContinueCompact  compact_callback,
ECompact  compact_type = eCompactNoFree,
int  target_fill_pct = 0 
)

◆ CopyFrom()

void CBDB_File::CopyFrom ( const CBDB_File dbf)

Copy record (fields) from another BDB file (MUST have the same structure)

Definition at line 1648 of file bdb_file.cpp.

References CBDB_BufferManager::CopyFrom(), CBDB_File::GetDataBuffer(), CBDB_File::GetKeyBuffer(), and ncbi::grid::netcache::search::fields::key.

Referenced by CBDB_FileDumper::Dump().

◆ CountRecs()

unsigned CBDB_RawFile::CountRecs ( bool  bFast = false)

Compute database statistic, return number of records.

(Can be time consuming)

Definition at line 836 of file bdb_file.cpp.

References BDB_CHECK, CBDB_RawFile::FileName(), flags, free(), CBDB_RawFile::GetBDBTransaction(), CBDB_Transaction::GetTxn(), and CBDB_RawFile::m_DB.

Referenced by CBDB_Cache::Purge().

◆ CreateCursor()

DBC * CBDB_RawFile::CreateCursor ( CBDB_Transaction trans = 0,
unsigned int  flags = 0 
) const
protected

◆ Database()

const string & CBDB_RawFile::Database ( ) const
inline

Definition at line 747 of file bdb_file.hpp.

References CBDB_RawFile::m_Database.

◆ Delete() [1/2]

EBDB_ErrCode CBDB_FileCursor::Delete ( CBDB_File::EIgnoreError  on_error = CBDB_File::eThrowOnError)

◆ Delete() [2/2]

EBDB_ErrCode CBDB_File::Delete ( EIgnoreError  on_error = eThrowOnError)

◆ DeleteCursor()

EBDB_ErrCode CBDB_File::DeleteCursor ( DBC dbc,
EIgnoreError  on_error 
)
protected

Delete DB cursor.

Definition at line 1985 of file bdb_file.cpp.

References BDB_CHECK, dbc, eBDB_Ok, CBDB_RawFile::eIgnoreError, and CBDB_RawFile::FileName().

Referenced by CBDB_FileCursor::Delete().

◆ DestroyDBT_Clone()

void CBDB_File::DestroyDBT_Clone ( DBT dbt)
static

Free the DBT structure created by CloneDBT_Key.

Definition at line 1458 of file bdb_file.cpp.

References free(), and NULL.

Referenced by CBDB_BlobReaderWriter::~CBDB_BlobReaderWriter(), and CBDB_BLobStream::~CBDB_BLobStream().

◆ DisableCmpOverride()

void CBDB_RawFile::DisableCmpOverride ( )
inline

Disable BTREE comparison override.

Definition at line 200 of file bdb_file.hpp.

References CBDB_RawFile::m_CmpOverride.

◆ DisableDataBufProcessing()

void CBDB_File::DisableDataBufProcessing ( )
inlineprotected

Function disables processing of m_DBT_data.

This function can be used when creating custom BDB file data structures (BLOB storage, etc.) Caller takes full responsibility for filling m_DBT_Data with correct values.

Definition at line 630 of file bdb_file.hpp.

References CBDB_File::m_DataBufDisabled.

Referenced by CBDB_BLobFile::CBDB_BLobFile().

◆ DisableDataPacking()

void CBDB_File::DisableDataPacking ( )
protected

Disable packing of variable length fields in the data buffer (Call after BindData)

Definition at line 1641 of file bdb_file.cpp.

References CBDB_File::m_DataBuf.

Referenced by CBDB_File::Open().

◆ DisableHashOverride()

void CBDB_RawFile::DisableHashOverride ( )
inline

Disable hash method override (Berkeley DB will use it's own default hashing method)

Definition at line 278 of file bdb_file.hpp.

References CBDB_RawFile::m_CmpOverride.

◆ DisableNull()

void CBDB_File::DisableNull ( )
inlineprotected

Disable NULL/not NULL in data fields (Performance tweak, call before BindData)

Definition at line 634 of file bdb_file.hpp.

References CBDB_File::m_DisabledNull.

Referenced by SCache_AttrDB::SCache_AttrDB(), SCache_IdIDX::SCache_IdIDX(), and SVolumesDB::SVolumesDB().

◆ Discard()

void CBDB_File::Discard ( void  )
protected

Unpack internal record buffers.

Definition at line 1518 of file bdb_file.cpp.

References CBDB_File::m_DataBuf, and CBDB_File::m_KeyBuf.

Referenced by CBDB_File::Delete(), and CBDB_File::x_Write().

◆ Dump() [1/3]

void CBDB_FileDumper::Dump ( CNcbiOstream out,
CBDB_File db 
)

Convert BDB file into text and write it into the specified stream.

Definition at line 117 of file bdb_filedump.cpp.

References CBDB_FileDumper::Dump(), CBDB_FileCursor::eFirst, out(), and CBDB_FileCursor::SetCondition().

◆ Dump() [2/3]

void CBDB_FileDumper::Dump ( CNcbiOstream out,
CBDB_FileCursor cur 
)

◆ Dump() [3/3]

void CBDB_FileDumper::Dump ( const string dump_file_name,
CBDB_File db 
)

Convert BDB file into text file.

Definition at line 105 of file bdb_filedump.cpp.

References BDB_THROW, and out().

Referenced by CBDB_FileDumper::Dump(), and CBDB_FileDumperApp::Dump().

◆ DuplicatesAllowed()

bool CBDB_RawFile::DuplicatesAllowed ( ) const
inline

Return TRUE if file can contain duplicate keys.

Definition at line 236 of file bdb_file.hpp.

References CBDB_RawFile::eDuplicatesEnable, and CBDB_RawFile::m_DuplicateKeys.

Referenced by CBDB_File::Insert(), and CBDB_RawFile::x_CreateDB().

◆ DuplicateStructure()

void CBDB_File::DuplicateStructure ( const CBDB_File dbf)

Create the same fieldset as in dbf and bind them to the current file.

Definition at line 1662 of file bdb_file.cpp.

References _ASSERT, CBDB_File::GetDataBuffer(), CBDB_File::GetKeyBuffer(), CBDB_File::m_DataBuf, CBDB_File::m_KeyBuf, CBDB_File::x_ConstructDataBuf(), and CBDB_File::x_ConstructKeyBuf().

◆ EnablePrefixCompression()

void CBDB_File::EnablePrefixCompression ( )
inline

Turn ON prefix compression.

Should be turned on for string based keys. (not LString)

Definition at line 574 of file bdb_file.hpp.

References CBDB_File::m_PrefixCompress.

◆ Fetch() [1/4]

EBDB_ErrCode CBDB_File::Fetch ( )
inline

◆ Fetch() [2/4]

EBDB_ErrCode CBDB_FileCursor::Fetch ( CBDB_RawFile::TBuffer buf,
EFetchDirection  fdir = eDefault 
)

◆ Fetch() [3/4]

EBDB_ErrCode CBDB_FileCursor::Fetch ( EFetchDirection  fdir,
void **  buf,
size_t  buf_size,
CBDB_RawFile::EReallocMode  allow_realloc 
)

◆ Fetch() [4/4]

EBDB_ErrCode CBDB_FileCursor::Fetch ( EFetchDirection  fdir = eDefault)

Fetch record.

Note
When fetching current record (eCurrent) and record has been deleted by other thread or program return code is eBDB_KeyEmpty

Definition at line 665 of file bdb_cursor.cpp.

References _ASSERT, eBDB_MultiRowEnd, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eDefault, CBDB_FileCursor::eEQ, CBDB_FileCursor::eFetchAll, CBDB_FileCursor::eFetchGetBufferEnds, CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::From, CBDB_FC_Condition::GetBuffer(), CBDB_FC_Condition::GetFieldsAssigned(), CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_FetchDirection, CBDB_FileCursor::m_FetchFlags, CBDB_FileCursor::m_FirstFetched, CBDB_File::m_KeyBuf, CBDB_FileCursor::m_LastMultiFetchSuccess, CBDB_FileCursor::m_MultiFetchMode, CBDB_FileCursor::m_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FC_Condition::ResetUnassigned(), s_FDir2DBFlag(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::To.

Referenced by BDB_iterate_file(), CBDB_Cache::BlobCheckIn(), BuildZipIndex(), db_map_base< K, T >::iterator_base::check_open_cursor(), SBDB_BvStore_Id< TBV >::ComputeBitCountMap(), CBDB_Cache::DropBlob(), CBDB_FileDumper::Dump(), CBDB_Volumes::EnumerateVolumes(), CAsnCacheStore::EnumIndex(), CAsnCacheStore::EnumSeqIds(), CBDB_Cache::EvaluateTimeLine(), db_map_base< K, T >::iterator_base::fetch_next(), db_map_base< K, T >::iterator_base::fetch_prev(), CBlobMetaDB::FetchMeta(), CBDB_BvStore< TBV >::FetchToBuffer(), CBDB_Cache::GetBlobAccess(), CAsnCacheStore::GetGiCount(), CBDB_Cache::GetReadStream(), db_map_base< K, T >::iterator_base::go_end(), CBDB_MatrixBvStore< TBV, TM >::LoadMatrixDescriptions(), CBDB_Cache::Open(), PrintPhoneBook(), CBDB_Cache::Purge(), CBDB_Cache::Read(), SBDB_BvStore_Id< TBV >::ReadIds(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), CCacheIndexCopyApp::Run(), CBDB_FileScanner::Scan(), SearchPhoneBook(), CBDB_Cache::x_DropBlob(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), CAsnSubCacheCreateApplication::x_LocateBlobsInCache(), CBDB_Cache::x_Store(), CBDB_Cache::x_TruncateDB(), CBDB_Cache::x_UpdateAccessTime(), and CReadIndexSpeedApp::x_WalkIndex().

◆ FetchFirst() [1/3]

EBDB_ErrCode CBDB_FileCursor::FetchFirst ( )

◆ FetchFirst() [2/3]

EBDB_ErrCode CBDB_FileCursor::FetchFirst ( CBDB_RawFile::TBuffer buf)

◆ FetchFirst() [3/3]

EBDB_ErrCode CBDB_FileCursor::FetchFirst ( void **  buf,
size_t  buf_size,
CBDB_RawFile::EReallocMode  allow_realloc 
)

◆ FetchForUpdate()

EBDB_ErrCode CBDB_File::FetchForUpdate ( )

Fetche the record corresponding to the current key value.

Acquire write lock instead of read lock when doing the retrieval. Meaningful only in the presence of transactions.

Definition at line 1432 of file bdb_file.cpp.

References CBDB_File::x_Fetch().

◆ FileName()

const string & CBDB_RawFile::FileName ( ) const
inline

◆ GetBDBTransaction()

CBDB_Transaction* CBDB_RawFile::GetBDBTransaction ( )
inline

◆ GetBlobFormat()

TBlobFormat CBDB_FileDumper::GetBlobFormat ( ) const
inline

Definition at line 103 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_BlobFormat.

◆ GetBtreeMinKeysPerPage()

unsigned int CBDB_RawFile::GetBtreeMinKeysPerPage ( )

◆ GetDataBuffer() [1/2]

CBDB_BufferManager* CBDB_File::GetDataBuffer ( )
inline

Get Buffer manager for data section of the file.

Definition at line 522 of file bdb_file.hpp.

References CBDB_File::m_DataBuf.

◆ GetDataBuffer() [2/2]

const CBDB_BufferManager* CBDB_File::GetDataBuffer ( ) const
inline

Get Buffer manager for data section of the file.

Definition at line 516 of file bdb_file.hpp.

References CBDB_File::m_DataBuf.

Referenced by BDB_find_field(), CBDB_File::CopyFrom(), CBDB_FileDumper::Dump(), and CBDB_File::DuplicateStructure().

◆ GetDBFile()

CBDB_File& CBDB_FileCursor::GetDBFile ( )
inline

Return database file on which cursor is based.

Definition at line 218 of file bdb_cursor.hpp.

References CBDB_FileCursor::m_Dbf.

Referenced by CBDB_FileDumper::Dump().

◆ GetDupKeysMode()

EDuplicateKeys CBDB_RawFile::GetDupKeysMode ( ) const
inline

Return the key duplicate mode value.

Definition at line 239 of file bdb_file.hpp.

References CBDB_RawFile::m_DuplicateKeys.

Referenced by db_map_base< K, T >::iterator_base::check_open_cursor().

◆ GetEnv()

CBDB_Env* CBDB_RawFile::GetEnv ( void  )
inline

Get pointer on file environment Return NULL if no environment has been set.

Definition at line 138 of file bdb_file.hpp.

References CBDB_RawFile::m_Env.

Referenced by BDB_batch_delete_recs(), and CBDB_FileCursor::CBDB_FileCursor().

◆ GetFetchDirection()

EFetchDirection CBDB_FileCursor::GetFetchDirection ( ) const
inline

Definition at line 160 of file bdb_cursor.hpp.

References CBDB_FileCursor::m_FetchDirection.

◆ GetField() [1/2]

CBDB_Field & CBDB_File::GetField ( TUnifiedFieldIndex  idx)

Definition at line 1621 of file bdb_file.cpp.

References _ASSERT, buffer, CBDB_File::m_DataBuf, and CBDB_File::m_KeyBuf.

◆ GetField() [2/2]

const CBDB_Field & CBDB_File::GetField ( TUnifiedFieldIndex  idx) const

Return field by field index.

Parameters
idxfield index
Returns
field reference

Definition at line 1599 of file bdb_file.cpp.

References _ASSERT, buffer, CBDB_File::m_DataBuf, and CBDB_File::m_KeyBuf.

Referenced by CScannerFunctorArgN::GetArguments().

◆ GetFieldConvert()

IBDB_FieldConvert & CBDB_FileCursor::GetFieldConvert ( CBDB_BufferManager buf,
unsigned int  n 
)
inlineprotected

Return next field's IBDB_FieldConvert interface (hidden cast to non-public parent class)

Definition at line 320 of file bdb_cursor.hpp.

References buf, and n.

Referenced by CBDB_FC_Condition::GetUnassignedField().

◆ GetFieldIdx()

CBDB_File::TUnifiedFieldIndex CBDB_File::GetFieldIdx ( const string name) const

Get field index by name.

Parameters
namefield name to find (case insensitive)
Returns
Field index (0 if not found)
See also
TUnifiedFieldIndex

Definition at line 1580 of file bdb_file.cpp.

References BDB_GetUFieldIdx(), CBDB_File::m_DataBuf, and CBDB_File::m_KeyBuf.

Referenced by CQueryTreeFieldResolveFunc::operator()().

◆ GetFileName()

const string& CBDB_RawFile::GetFileName ( void  ) const
inline

Return file name.

Definition at line 242 of file bdb_file.hpp.

References CBDB_RawFile::m_FileName.

Referenced by IndexABioseq(), and CReadIndexSpeedApp::x_PreReadIndex().

◆ GetKeyBuffer() [1/2]

CBDB_BufferManager* CBDB_File::GetKeyBuffer ( )
inline

Get Buffer manager for key section of the file.

Definition at line 519 of file bdb_file.hpp.

References CBDB_File::m_KeyBuf.

◆ GetKeyBuffer() [2/2]

const CBDB_BufferManager* CBDB_File::GetKeyBuffer ( ) const
inline

◆ GetLastDataLen()

size_t CBDB_MultiRowBuffer::GetLastDataLen ( ) const
inline

Get BLOB length from last cursor read.

Definition at line 418 of file bdb_file.hpp.

References CBDB_MultiRowBuffer::m_LastDataLen.

Referenced by CBDB_FileCursor::GetLastMultiFetchDataLen().

◆ GetLastDataPtr()

const void* CBDB_MultiRowBuffer::GetLastDataPtr ( ) const
inline

Get data buffer pointer from last cursor read.

Definition at line 416 of file bdb_file.hpp.

References CBDB_MultiRowBuffer::m_LastData.

Referenced by CBDB_FileCursor::GetLastMultiFetchData().

◆ GetLastMultiFetchData()

const void * CBDB_FileCursor::GetLastMultiFetchData ( ) const

Get data pointer from last fetch (only when in multifetch mode)

Definition at line 305 of file bdb_cursor.cpp.

References _ASSERT, CBDB_MultiRowBuffer::GetLastDataPtr(), and CBDB_FileCursor::m_MultiRowBuf.

◆ GetLastMultiFetchDataLen()

size_t CBDB_FileCursor::GetLastMultiFetchDataLen ( ) const

Get data length from last fetch (only when in multifetch mode)

Definition at line 313 of file bdb_cursor.cpp.

References _ASSERT, CBDB_MultiRowBuffer::GetLastDataLen(), and CBDB_FileCursor::m_MultiRowBuf.

◆ GetOpenMode()

EOpenMode CBDB_RawFile::GetOpenMode ( ) const
inline

Return the file open mode.

Definition at line 245 of file bdb_file.hpp.

References CBDB_RawFile::m_OpenMode.

◆ GetPageSize()

unsigned int CBDB_RawFile::GetPageSize ( )

Definition at line 820 of file bdb_file.cpp.

References BDB_CHECK, CBDB_RawFile::m_DB, and CBDB_RawFile::m_PageSize.

◆ GetRecLen()

unsigned CBDB_RawFile::GetRecLen ( ) const
inline

Get record length Works for fixed length record DBs only (Queue)

Definition at line 733 of file bdb_file.hpp.

References _ASSERT, CBDB_RawFile::eQueue, CBDB_RawFile::m_DB_Type, and CBDB_RawFile::m_RecLen.

Referenced by CBDB_BLobFile::Append().

◆ GetRecordsDumped()

unsigned CBDB_FileDumper::GetRecordsDumped ( ) const
inline

Return number of records processed by Dump.

Definition at line 115 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_RecordsDumped.

Referenced by CBDB_FileDumperApp::Dump().

◆ GetReverseFetchDirection()

CBDB_FileCursor::EFetchDirection CBDB_FileCursor::GetReverseFetchDirection ( ) const
inline

◆ GetTransaction()

ITransaction * CBDB_RawFile::GetTransaction ( )
virtual

Get current transaction.

Implements ITransactional.

Definition at line 614 of file bdb_file.cpp.

References CBDB_RawFile::m_Trans.

◆ GetTxn()

DB_TXN * CBDB_RawFile::GetTxn ( )
protected

◆ InitDBT()

void CBDB_MultiRowBuffer::InitDBT ( )
protected

◆ InitMultiFetch()

void CBDB_FileCursor::InitMultiFetch ( size_t  buffer_size,
EMultiFetchMode  mfm = eFetchAll 
)

◆ Insert()

EBDB_ErrCode CBDB_File::Insert ( EAfterWrite  write_flag = eDiscardData)

◆ IsAttached()

bool CBDB_RawFile::IsAttached ( ) const
inline

◆ IsByteSwapped()

bool CBDB_RawFile::IsByteSwapped ( ) const
inline

Return TRUE if the if the underlying database files were created on an architecture of the different byte order.

Definition at line 233 of file bdb_file.hpp.

References CBDB_RawFile::m_ByteSwapped.

Referenced by CBDB_LobFile::Fetch(), CBDB_File::Reopen(), CBDB_LobFile::SetCmp(), CBDB_IdFile::SetCmp(), and CBDB_LobFile::x_Put().

◆ IsOpen() [1/2]

bool CBDB_FileCursor::IsOpen ( void  ) const

TRUE when cursor open.

Definition at line 258 of file bdb_cursor.cpp.

References CBDB_FileCursor::m_DBC.

◆ IsOpen() [2/2]

bool CBDB_RawFile::IsOpen ( void  ) const
inline

Return TRUE if the file is open.

Definition at line 754 of file bdb_file.hpp.

References CBDB_RawFile::m_FileName.

Referenced by CBDB_File::BindData(), CBDB_File::BindKey(), CBDB_File::Open(), and CBDB_RawFile::Rename().

◆ IsOwnFields()

bool CBDB_File::IsOwnFields ( ) const
inline

Return fields ownership flag.

Definition at line 563 of file bdb_file.hpp.

References CBDB_File::m_OwnFields.

◆ KeyDupCount()

CBDB_FileCursor::TRecordCount CBDB_FileCursor::KeyDupCount ( ) const

Definition at line 358 of file bdb_cursor.cpp.

References BDB_ERRNO_THROW, BDB_THROW, and CBDB_FileCursor::m_DBC.

◆ MultipleInit()

void CBDB_MultiRowBuffer::MultipleInit ( )
protected

Definition at line 114 of file bdb_file.cpp.

References CBDB_MultiRowBuffer::m_BufPtr, and CBDB_MultiRowBuffer::m_Data_DBT.

Referenced by CBDB_File::ReadCursor().

◆ Open() [1/4]

void CBDB_RawFile::Open ( const string filename,
const string database,
EOpenMode  open_mode,
bool  support_dirty_read = false,
unsigned  rec_len = 0 
)

Open file with specified filename and database name.

(Berkeley DB supports having several database tables in one file.)

Definition at line 298 of file bdb_file.cpp.

References CBDB_RawFile::Close(), database, CBDB_RawFile::m_Database, CBDB_RawFile::m_FileName, and CBDB_RawFile::x_Open().

◆ Open() [2/4]

void CBDB_File::Open ( const string filename,
const string database,
EOpenMode  open_mode,
bool  support_dirty_read = false,
unsigned  rec_len = 0 
)

Open file with specified filename and database name.

(Berkeley DB supports having several database tables in one file.)

Definition at line 1320 of file bdb_file.cpp.

References CBDB_RawFile::Close(), database, CBDB_File::DisableDataPacking(), CBDB_RawFile::eQueue, CBDB_RawFile::IsOpen(), CBDB_File::m_DataBuf, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Type, CBDB_File::m_KeyBuf, CBDB_RawFile::Open(), and CBDB_File::x_CheckConstructBuffers().

◆ Open() [3/4]

void CBDB_RawFile::Open ( const string filename,
EOpenMode  open_mode,
bool  support_dirty_read = false,
unsigned  rec_len = 0 
)
inline

Open file with specified access mode.

Definition at line 724 of file bdb_file.hpp.

References kEmptyStr.

Referenced by LoadBLOB_Table(), CBDB_File::Open(), and PrintBLOB_Table().

◆ Open() [4/4]

void CBDB_File::Open ( const string filename,
EOpenMode  open_mode,
bool  support_dirty_read = false,
unsigned  rec_len = 0 
)
inline

◆ operator<<() [1/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( const char *  val)

◆ operator<<() [2/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( const string val)

◆ operator<<() [3/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( double  val)

◆ operator<<() [4/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( float  val)

◆ operator<<() [5/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( int  val)

◆ operator<<() [6/6]

CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< ( unsigned int  val)

◆ operator=() [1/6]

CBDB_CursorGuard& CBDB_CursorGuard::operator= ( const CBDB_CursorGuard )
private

◆ operator=() [2/6]

CBDB_File& CBDB_File::operator= ( const CBDB_File )
private

◆ operator=() [3/6]

CBDB_FileCursor& CBDB_FileCursor::operator= ( const CBDB_FileCursor )
private

◆ operator=() [4/6]

CBDB_FileDumper & CBDB_FileDumper::operator= ( const CBDB_FileDumper fdump)

◆ operator=() [5/6]

CBDB_MultiRowBuffer& CBDB_MultiRowBuffer::operator= ( const CBDB_MultiRowBuffer )
private

◆ operator=() [6/6]

CBDB_RawFile& CBDB_RawFile::operator= ( const CBDB_RawFile )
private

◆ PrintHeader()

void CBDB_FileDumper::PrintHeader ( CNcbiOstream out,
const CBDB_BufferManager key,
const CBDB_BufferManager data 
)
protected

◆ PrintStat()

void CBDB_RawFile::PrintStat ( CNcbiOstream out)

◆ ReadCursor() [1/4]

EBDB_ErrCode CBDB_File::ReadCursor ( DBC dbc,
unsigned int  bdb_flag 
)
protected

◆ ReadCursor() [2/4]

EBDB_ErrCode CBDB_File::ReadCursor ( DBC dbc,
unsigned int  bdb_flag,
CBDB_MultiRowBuffer multirow_buf,
bool  multirow_only 
)
protected

◆ ReadCursor() [3/4]

EBDB_ErrCode CBDB_File::ReadCursor ( DBC dbc,
unsigned int  bdb_flag,
TBuffer buf 
)
protected

◆ ReadCursor() [4/4]

EBDB_ErrCode CBDB_File::ReadCursor ( DBC dbc,
unsigned int  bdb_flag,
void **  buf,
size_t  buf_size,
EReallocMode  allow_realloc 
)
protected

◆ Remove()

void CBDB_RawFile::Remove ( const string filename,
const string database = kEmptyStr 
)

Remove the database specified by the filename and database arguments.

Definition at line 361 of file bdb_file.cpp.

References BDB_CHECK, BDB_THROW, database, CBDB_Env::GetEnv(), CBDB_RawFile::m_DB_Attached, CBDB_RawFile::m_Env, and CDB_guard::release().

Referenced by CBDB_RawFile::x_Open().

◆ RemoveTransaction()

void CBDB_RawFile::RemoveTransaction ( ITransaction trans)
virtual

Remove transaction association (must be established by SetTransaction.

Implements ITransactional.

Definition at line 608 of file bdb_file.cpp.

References CBDB_Transaction::CastTransaction(), and CBDB_RawFile::x_RemoveTransaction().

◆ Rename()

void CBDB_RawFile::Rename ( const string fname,
const string old_name,
const string new_name 
)

Rename a database. NOTE: This cannot be called on an opened file.

Definition at line 345 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, eUnknown, file, CBDB_RawFile::IsOpen(), CBDB_RawFile::m_DB, and NCBI_THROW.

◆ ReOpen()

void CBDB_FileCursor::ReOpen ( CBDB_Transaction trans)

◆ Reopen() [1/2]

void CBDB_File::Reopen ( EOpenMode  open_mode,
bool  support_dirty_read = false 
)

◆ Reopen() [2/2]

void CBDB_RawFile::Reopen ( EOpenMode  open_mode,
bool  support_dirty_read = false,
unsigned  rec_len = 0 
)

Reopen database file. (Should be already open).

Definition at line 325 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, BDB_THROW, CBDB_RawFile::m_Database, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Attached, CBDB_RawFile::m_FileName, and CBDB_RawFile::x_Open().

Referenced by CBDB_File::Reopen().

◆ ResetFirstFetched()

void CBDB_FileCursor::ResetFirstFetched ( )
inlineprotected

Set m_FirstFetched field to FALSE.

Definition at line 313 of file bdb_cursor.hpp.

References CBDB_FileCursor::m_FirstFetched.

Referenced by CBDB_FC_Condition::IncFieldsAssigned().

◆ ReverseFetchDirection()

void CBDB_FileCursor::ReverseFetchDirection ( )
inline

◆ RevSplitOff()

void CBDB_RawFile::RevSplitOff ( )

Turn OFF reverse splitting.

Definition at line 573 of file bdb_file.cpp.

References CBDB_RawFile::m_RevSplitOff.

◆ SafeTruncate()

unsigned int CBDB_RawFile::SafeTruncate ( )

Workaround for truncate of large databases.

Executes out of transaction, and as such cannot be rolled back/

Definition at line 429 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, CBDB_Env::CreateTxn(), done, CBDB_RawFile::FileName(), CBDB_ErrnoException::IsNoMem(), ncbi::grid::netcache::search::fields::key, CBDB_RawFile::m_DB, CBDB_RawFile::m_Env, n, NULL, and CBDB_RawFile::SetTransaction().

◆ SetBlobDumpFile()

void CBDB_FileDumper::SetBlobDumpFile ( const string fname)
inline

Set BLOB dump file name.

Definition at line 121 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_BlobDumpFname.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetBlobFormat()

void CBDB_FileDumper::SetBlobFormat ( TBlobFormat  bf)
inline

Definition at line 178 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_BlobFormat.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetBtreeMinKeysPerPage()

void CBDB_RawFile::SetBtreeMinKeysPerPage ( unsigned int  keys_per_page)

Set the minimum number of keys per page (BTREE access methods only)

Definition at line 980 of file bdb_file.cpp.

References _ASSERT, CBDB_RawFile::eBtree, CBDB_RawFile::m_BT_minkey, CBDB_RawFile::m_DB_Type, and max().

◆ SetCachePriority()

void CBDB_RawFile::SetCachePriority ( ECachePriority  priority)

Definition at line 241 of file bdb_file.cpp.

◆ SetCacheSize()

void CBDB_RawFile::SetCacheSize ( unsigned int  cache_size)

◆ SetCmp() [1/3]

void CBDB_File::SetCmp ( DB db)
protectedvirtual

Set comparison function.

Default implementation installs bdb_types based function. Can be overloaded for some specific cases.

Implements CBDB_RawFile.

Reimplemented in CBDB_IdFile.

Definition at line 1559 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, BDB_compare_prefix(), CBDB_RawFile::eBtree, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Type, CBDB_File::m_KeyBuf, CBDB_File::m_PrefixCompress, and CBDB_File::x_CompareShim().

◆ SetCmp() [2/3]

virtual void CBDB_RawFile::SetCmp ( DB )
pure virtual

Set comparison function.

Default implementation installs bdb_types based function. Can be overloaded for some specific cases.

Implemented in CBDB_IdFile, CBDB_File, and CBDB_LobFile.

Referenced by CBDB_RawFile::x_CreateDB().

◆ SetCmp() [3/3]

void CBDB_IdFile::SetCmp ( DB db)
virtual

Set comparison function.

Default implementation installs bdb_types based function. Can be overloaded for some specific cases.

Reimplemented from CBDB_File.

Definition at line 2096 of file bdb_file.cpp.

References _ASSERT, BDB_ByteSwap_Int4Compare(), BDB_CHECK, BDB_Int4Compare(), CBDB_RawFile::IsByteSwapped(), and CBDB_RawFile::m_DB.

◆ SetColumnNames()

void CBDB_FileDumper::SetColumnNames ( EPrintFieldNames  print_names)
inline

Control field names printing.

Definition at line 166 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_PrintNames.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetColumnSeparator()

void CBDB_FileDumper::SetColumnSeparator ( const string col_separator)
inline

Definition at line 160 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_ColumnSeparator.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetCompressor()

void CBDB_RawFile::SetCompressor ( ICompression compressor,
EOwnership  own = eTakeOwnership 
)

Set record compressor.

Record compression should only be used if we do not use partial record storage and retrieval.

Definition at line 255 of file bdb_file.cpp.

References CBDB_RawFile::m_Compressor, and AutoPtr< X, Del >::reset().

◆ SetCondition()

void CBDB_FileCursor::SetCondition ( ECondition  cond_from,
ECondition  cond_to = eNotSet 
)

Set search condition(type of interval)

Note
SetCondition resets cursor value assignments (From, To) so should be always called before "cur.From << value ..."

Definition at line 263 of file bdb_cursor.cpp.

References BDB_THROW, CBDB_FileCursor::eBackward, CBDB_FileCursor::eEQ, CBDB_FileCursor::eForward, CBDB_FileCursor::eGE, CBDB_FileCursor::eGT, CBDB_FileCursor::eLast, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FileCursor::eNotSet, CBDB_FileCursor::From, CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_CondTo, CBDB_FileCursor::m_FetchDirection, CBDB_FileCursor::m_FirstFetched, CBDB_FC_Condition::ResetUnassigned(), and CBDB_FileCursor::To.

Referenced by CBDB_RangeMap< TBV >::AddRange(), BDB_iterate_file(), CBDB_Cache::BlobCheckIn(), BuildZipIndex(), SBDB_BvStore_Id< TBV >::ComputeBitCountMap(), CBDB_Cache::DropBlob(), CBDB_FileDumper::Dump(), CBDB_FileDumperApp::Dump(), CAsnCacheStore::EnumIndex(), CAsnCacheStore::EnumSeqIds(), CBDB_Cache::EvaluateTimeLine(), CBlobMetaDB::FetchMeta(), CBDB_Cache::GetBlobAccess(), CAsnCacheStore::GetGiCount(), CBDB_Cache::GetReadStream(), CBDB_Cache::HasBlobs(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::LoadIdDeMux(), CBDB_MatrixBvStore< TBV, TM >::LoadMatrixDescriptions(), CBDB_Cache::Open(), db_map_base< K, T >::iterator_base::open_cursor(), PrintPhoneBook(), CBDB_Cache::Purge(), CBDB_Cache::Read(), SBDB_BvStore_Id< TBV >::ReadIds(), CBDB_Cache::RegisterOverflow(), CBDB_RangeMap< TBV >::Remap(), CBDB_Cache::Remove(), CBDB_FileScanner::Scan(), SearchPhoneBook(), CBDB_Cache::x_DropBlob(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), CAsnSubCacheCreateApplication::x_LocateBlobsInCache(), CBDB_Cache::x_Store(), CBDB_Cache::x_TruncateDB(), CBDB_Cache::x_UpdateAccessTime(), and CReadIndexSpeedApp::x_WalkIndex().

◆ SetEnv()

void CBDB_RawFile::SetEnv ( CBDB_Env env)

Associate file with environment.

Should be called before file opening.

Definition at line 203 of file bdb_file.cpp.

References env, and CBDB_RawFile::m_Env.

Referenced by CBDB_Cache::Open(), CBDB_ExtBlobStore< TBV >::Open(), and CBDB_Cache::Verify().

◆ SetFetchDirection()

void CBDB_FileCursor::SetFetchDirection ( EFetchDirection  fdir)
inline

Definition at line 327 of file bdb_cursor.hpp.

References CBDB_FileCursor::m_FetchDirection.

◆ SetFieldCompareLimit()

void CBDB_File::SetFieldCompareLimit ( unsigned int  n_fields)
inline

Sets maximum number of key fields participating in comparison Should be less than total number of key fields.

Definition at line 790 of file bdb_file.hpp.

References CBDB_File::m_KeyBuf.

◆ SetFieldOwnership()

void CBDB_File::SetFieldOwnership ( bool  own_fields)

Fields deletion is managed by the class when own_fields is TRUE.

Definition at line 1254 of file bdb_file.cpp.

References CBDB_File::m_DataBuf, CBDB_File::m_KeyBuf, and CBDB_File::m_OwnFields.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetHash()

void CBDB_RawFile::SetHash ( DB db)
virtual

Set hash function.

Default implementation installs bdb_types based function. Can be overloaded for some specific cases.

Reimplemented in CBDB_IdBlobFile.

Definition at line 973 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, BDB_Hash(), CBDB_RawFile::eHash, and CBDB_RawFile::m_DB_Type.

Referenced by CBDB_RawFile::x_CreateDB().

◆ SetHashFillFactor()

void CBDB_RawFile::SetHashFillFactor ( unsigned  h_ffactor)

Set hash table density (fill factor)

Definition at line 961 of file bdb_file.cpp.

References _ASSERT, CBDB_RawFile::eHash, CBDB_RawFile::m_DB_Type, and CBDB_RawFile::m_H_ffactor.

◆ SetHashNelem()

void CBDB_RawFile::SetHashNelem ( unsigned  h_nelem)

Set an estimate of hash table final size.

Definition at line 967 of file bdb_file.cpp.

References _ASSERT, CBDB_RawFile::eHash, CBDB_RawFile::m_DB_Type, and CBDB_RawFile::m_H_nelem.

◆ SetLegacyStringsCheck()

void CBDB_File::SetLegacyStringsCheck ( bool  value)

Set C-str detection.

Definition at line 1373 of file bdb_file.cpp.

References CBDB_File::m_DataBuf, CBDB_File::m_KeyBuf, CBDB_File::m_LegacyString, and value.

Referenced by CBDB_File::Attach().

◆ SetOutFile()

void CBDB_FileDumper::SetOutFile ( CBDB_File out_dbf)
inline

Set reference on output file (mode when all dumped records are put into a separate database) Class does not take ownership on out_dbf.

Definition at line 126 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_OutFile.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetPageSize()

void CBDB_RawFile::SetPageSize ( unsigned int  page_size)

Definition at line 811 of file bdb_file.cpp.

References _ASSERT, BDB_THROW, CBDB_RawFile::m_DB, and CBDB_RawFile::m_PageSize.

Referenced by CAsnIndex::CAsnIndex().

◆ SetQuery()

void CBDB_FileDumper::SetQuery ( const string query_str)

Set query filter.

Definition at line 95 of file bdb_filedump.cpp.

References BDB_ParseQuery(), CBDB_FileDumper::m_Query, and CBDB_FileDumper::m_QueryStr.

Referenced by CBDB_FileDumperApp::Dump().

◆ SetTransaction()

void CBDB_RawFile::SetTransaction ( ITransaction trans)
virtual

◆ SetValueFormatting()

void CBDB_FileDumper::SetValueFormatting ( EValueFormatting  vf)
inline

Definition at line 172 of file bdb_filedump.hpp.

References CBDB_FileDumper::m_ValueFormatting.

Referenced by CBDB_FileDumperApp::Dump().

◆ Sync()

void CBDB_RawFile::Sync ( )

Flush any cached information to disk.

Definition at line 829 of file bdb_file.cpp.

References BDB_CHECK, CBDB_RawFile::FileName(), and CBDB_RawFile::m_DB.

◆ TestTo()

bool CBDB_FileCursor::TestTo ( ) const
protected

◆ Truncate()

unsigned int CBDB_RawFile::Truncate ( )

Empty the database. Return number of records removed.

Definition at line 390 of file bdb_file.cpp.

References _ASSERT, BDB_CHECK, CBDB_RawFile::FileName(), CBDB_RawFile::GetTxn(), and CBDB_RawFile::m_DB.

Referenced by CBDB_Cache::x_TruncateDB().

◆ Update()

EBDB_ErrCode CBDB_FileCursor::Update ( CBDB_File::EAfterWrite  write_flag = CBDB_File::eDiscardData)

◆ UpdateBlob()

EBDB_ErrCode CBDB_FileCursor::UpdateBlob ( const void *  data,
size_t  size,
CBDB_File::EAfterWrite  write_flag = CBDB_File::eDiscardData 
)

◆ UpdateInsert()

EBDB_ErrCode CBDB_File::UpdateInsert ( EAfterWrite  write_flag = eDiscardData)

Update record corresponding to the current key value.

If record does not exist it will be inserted.

Definition at line 1489 of file bdb_file.cpp.

References CBDB_File::CheckNullDataConstraint(), and CBDB_File::x_Write().

Referenced by IndexABioseq(), CAsnSubCacheCreateApplication::IndexNewBlobsInSubCache(), and CBDB_BLobFile::UpdateInsert().

◆ Verify()

void CBDB_File::Verify ( const char *  filename,
const char *  database,
FILE *  backup 
)

Run database verification (DB->verify)

Definition at line 1393 of file bdb_file.cpp.

References database, CBDB_RawFile::m_DB, CBDB_File::m_KeyBuf, CBDB_File::x_CheckConstructBuffers(), and CBDB_RawFile::x_CreateDB().

Referenced by CBDB_Cache::Verify().

◆ WriteCursor() [1/2]

EBDB_ErrCode CBDB_File::WriteCursor ( const void *  data,
size_t  size,
DBC dbc,
unsigned int  bdb_flag,
EAfterWrite  write_flag 
)
protected

◆ WriteCursor() [2/2]

EBDB_ErrCode CBDB_File::WriteCursor ( DBC dbc,
unsigned int  bdb_flag,
EAfterWrite  write_flag 
)
protected

Write DB cursor.

Definition at line 1961 of file bdb_file.cpp.

References CBDB_File::CheckNullDataConstraint(), dbc, and CBDB_File::x_Write().

Referenced by CBDB_FileCursor::Update(), and CBDB_FileCursor::UpdateBlob().

◆ x_CheckConstructBuffers()

void CBDB_File::x_CheckConstructBuffers ( )
private

◆ x_Close()

void CBDB_RawFile::x_Close ( EIgnoreError  close_mode)
protected

◆ x_CompareShim()

static int CBDB_File::x_CompareShim ( DB db,
const DBT dbt1,
const DBT dbt2,
size_t *  locp 
)
staticprivate

Referenced by CBDB_File::SetCmp().

◆ x_ConstructDataBuf()

void CBDB_File::x_ConstructDataBuf ( )
private

◆ x_ConstructKeyBuf()

void CBDB_File::x_ConstructKeyBuf ( )
private

◆ x_Create()

void CBDB_RawFile::x_Create ( const char *  filename,
const char *  database 
)
protected

◆ x_CreateDB()

void CBDB_RawFile::x_CreateDB ( unsigned  rec_len)
protected

◆ x_DB_CPut()

int CBDB_RawFile::x_DB_CPut ( DBC dbc,
DBT key,
DBT data,
unsigned  flags 
)
protected

◆ x_DB_Fetch()

int CBDB_RawFile::x_DB_Fetch ( DBT key,
DBT data,
unsigned  flags 
)
protected

Internal override for DB->get(...) This method overrides destination buffer and uses compressor: Should only be used with DB_DBT_USERMEM flag.

Definition at line 1038 of file bdb_file.cpp.

References _ASSERT, CSimpleBufferT< T, ResizeStrategy >::data(), flags, AutoPtr< X, Del >::get(), CBDB_RawFile::GetTxn(), ncbi::grid::netcache::search::fields::key, CBDB_RawFile::m_CompressBuffer, CBDB_RawFile::m_Compressor, CBDB_RawFile::m_DB, CSimpleBufferT< T, ResizeStrategy >::resize_mem(), and CBDB_RawFile::x_FetchBufferDecompress().

Referenced by CBDB_File::x_Fetch().

◆ x_DB_Put()

int CBDB_RawFile::x_DB_Put ( DBT key,
DBT data,
unsigned  flags 
)
protected

◆ x_DBC_Fetch()

int CBDB_RawFile::x_DBC_Fetch ( DBC dbc,
DBT key,
DBT data,
unsigned  flags 
)
protected

Internal override for DBC->c_get(...) This method overrides destination buffer and uses compressor: Should only be used with DB_DBT_USERMEM flag.

Definition at line 1067 of file bdb_file.cpp.

References CSimpleBufferT< T, ResizeStrategy >::data(), dbc, flags, AutoPtr< X, Del >::get(), ncbi::grid::netcache::search::fields::key, CBDB_RawFile::m_CompressBuffer, CBDB_RawFile::m_Compressor, CSimpleBufferT< T, ResizeStrategy >::resize_mem(), and CBDB_RawFile::x_FetchBufferDecompress().

Referenced by CBDB_File::ReadCursor().

◆ x_DumpFields()

void CBDB_FileDumper::x_DumpFields ( CNcbiOstream out,
const CBDB_BufferManager bman,
const vector< unsigned > &  quote_flags,
bool  is_key 
)
private

◆ x_EndRead()

void CBDB_File::x_EndRead ( )
private

◆ x_Fetch()

EBDB_ErrCode CBDB_File::x_Fetch ( unsigned int  flags)
protected

◆ x_FetchBufferDecompress()

int CBDB_RawFile::x_FetchBufferDecompress ( DBT data,
void *  usr_data 
)
protected

◆ x_FetchFirst_Prolog()

void CBDB_FileCursor::x_FetchFirst_Prolog ( unsigned int flag)
private

◆ x_Open()

void CBDB_RawFile::x_Open ( const char *  filename,
const char *  database,
EOpenMode  open_mode,
bool  support_dirty_read,
unsigned  rec_len 
)
protected

◆ x_RemoveTransaction()

void CBDB_RawFile::x_RemoveTransaction ( CBDB_Transaction trans)
protected

Definition at line 595 of file bdb_file.cpp.

References CBDB_RawFile::m_Trans.

Referenced by CBDB_RawFile::RemoveTransaction().

◆ x_SetByteSwapped() [1/2]

void CBDB_RawFile::x_SetByteSwapped ( bool  bswp)
protectedvirtual

Set byte order swapping.

Can be overloaded on derived classes

Note
When overloading DO call parent::x_SetByteSwapped

Reimplemented in CBDB_File.

Definition at line 955 of file bdb_file.cpp.

References CBDB_RawFile::m_ByteSwapped.

Referenced by CBDB_RawFile::x_Open(), and CBDB_File::x_SetByteSwapped().

◆ x_SetByteSwapped() [2/2]

void CBDB_File::x_SetByteSwapped ( bool  bswp)
protectedvirtual

Set byte order swapping.

Can be overloaded on derived classes

Note
When overloading DO call parent::x_SetByteSwapped

Reimplemented from CBDB_RawFile.

Definition at line 1384 of file bdb_file.cpp.

References CBDB_File::m_DataBuf, CBDB_File::m_KeyBuf, and CBDB_RawFile::x_SetByteSwapped().

◆ x_SetQuoteFlags()

void CBDB_FileDumper::x_SetQuoteFlags ( vector< unsigned > *  flags,
const CBDB_BufferManager bman 
)
private

◆ x_SetTransaction()

void CBDB_RawFile::x_SetTransaction ( CBDB_Transaction trans)
protected

◆ x_StartRead()

void CBDB_File::x_StartRead ( )
private

◆ x_Write()

EBDB_ErrCode CBDB_File::x_Write ( unsigned int  flags,
EAfterWrite  write_flag,
DBC dbc = 0 
)
private

◆ ~CBDB_ConditionHandle()

CBDB_ConditionHandle::~CBDB_ConditionHandle ( )
protected

Definition at line 148 of file bdb_cursor.cpp.

References CBDB_ConditionHandle::m_Condition.

◆ ~CBDB_CursorGuard()

CBDB_CursorGuard::~CBDB_CursorGuard ( )
inline

Definition at line 291 of file bdb_cursor.hpp.

References CBDB_FileCursor::Close(), and CBDB_CursorGuard::m_Cur.

◆ ~CBDB_FileCursor()

CBDB_FileCursor::~CBDB_FileCursor ( )

Definition at line 207 of file bdb_cursor.cpp.

References CBDB_FileCursor::Close(), and CBDB_FileCursor::m_MultiRowBuf.

◆ ~CBDB_FileDumper()

CBDB_FileDumper::~CBDB_FileDumper ( )

Definition at line 72 of file bdb_filedump.cpp.

References CBDB_FileDumper::m_Query.

◆ ~CBDB_MultiRowBuffer()

CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer ( )

Definition at line 100 of file bdb_file.cpp.

References CBDB_MultiRowBuffer::m_Buf, and CBDB_MultiRowBuffer::m_Data_DBT.

◆ ~CBDB_RawFile()

CBDB_RawFile::~CBDB_RawFile ( )
virtual

Variable Documentation

◆ From

CBDB_ConditionHandle CBDB_FileCursor::From

◆ IdKey

CBDB_FieldInt4 CBDB_IdFile::IdKey

Definition at line 689 of file bdb_file.hpp.

Referenced by CBDB_IdFile::CBDB_IdFile().

◆ kDefaultDatabase

const char CBDB_RawFile::kDefaultDatabase = "_table"
static

Definition at line 75 of file bdb_file.hpp.

◆ kOpenFileMask

const int CBDB_RawFile::kOpenFileMask = 0664
staticprivate

Definition at line 400 of file bdb_file.hpp.

Referenced by CBDB_RawFile::x_Create(), and CBDB_RawFile::x_Open().

◆ m_BlobDumpFname

string CBDB_FileDumper::m_BlobDumpFname
protected

◆ m_BlobFormat

TBlobFormat CBDB_FileDumper::m_BlobFormat
protected

◆ m_BT_minkey

unsigned CBDB_RawFile::m_BT_minkey
protected

◆ m_Buf

void* CBDB_MultiRowBuffer::m_Buf
protected

Multiple row buffer.

Definition at line 427 of file bdb_file.hpp.

Referenced by CBDB_MultiRowBuffer::InitDBT(), and CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer().

◆ m_BufPtr

void* CBDB_MultiRowBuffer::m_BufPtr
protected

current buffer position

Definition at line 429 of file bdb_file.hpp.

Referenced by CBDB_MultiRowBuffer::MultipleInit(), and CBDB_File::ReadCursor().

◆ m_BufsAttached

bool CBDB_File::m_BufsAttached
private

Definition at line 669 of file bdb_file.hpp.

Referenced by CBDB_File::x_CheckConstructBuffers().

◆ m_BufsCreated

bool CBDB_File::m_BufsCreated
private

Definition at line 670 of file bdb_file.hpp.

Referenced by CBDB_File::x_CheckConstructBuffers().

◆ m_BufSize

size_t CBDB_MultiRowBuffer::m_BufSize
protected

buffer size

Definition at line 428 of file bdb_file.hpp.

Referenced by CBDB_MultiRowBuffer::InitDBT().

◆ m_ByteSwapped

bool CBDB_RawFile::m_ByteSwapped
private

TRUE if file created on a diff.arch.

Definition at line 390 of file bdb_file.hpp.

Referenced by CBDB_RawFile::IsByteSwapped(), CBDB_RawFile::x_Open(), and CBDB_RawFile::x_SetByteSwapped().

◆ m_CacheSize

unsigned CBDB_RawFile::m_CacheSize
private

Definition at line 396 of file bdb_file.hpp.

Referenced by CBDB_RawFile::SetCacheSize(), and CBDB_RawFile::x_CreateDB().

◆ m_CmpOverride

bool CBDB_RawFile::m_CmpOverride
private

TRUE - NCBI BDB sets its own cmp.

Definition at line 392 of file bdb_file.hpp.

Referenced by CBDB_RawFile::DisableCmpOverride(), CBDB_RawFile::DisableHashOverride(), and CBDB_RawFile::x_CreateDB().

◆ m_ColumnSeparator

string CBDB_FileDumper::m_ColumnSeparator
protected

◆ m_CompressBuffer

TBuffer CBDB_RawFile::m_CompressBuffer
protected

◆ m_Compressor

AutoPtr<ICompression> CBDB_RawFile::m_Compressor
protected

◆ m_CondFrom

ECondition CBDB_FileCursor::m_CondFrom
private

◆ m_Condition

CBDB_FC_Condition& CBDB_ConditionHandle::m_Condition
protected

◆ m_CondTo

ECondition CBDB_FileCursor::m_CondTo
private

To condition proxy-object.

Definition at line 268 of file bdb_cursor.hpp.

Referenced by CBDB_FileCursor::SetCondition(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::x_FetchFirst_Prolog().

◆ m_Cur

CBDB_FileCursor& CBDB_CursorGuard::m_Cur
private

Definition at line 296 of file bdb_cursor.hpp.

Referenced by CBDB_CursorGuard::~CBDB_CursorGuard().

◆ m_Data_DBT

DBT* CBDB_MultiRowBuffer::m_Data_DBT
protected

◆ m_Database

string CBDB_RawFile::m_Database
private

db name in file (optional)

Definition at line 394 of file bdb_file.hpp.

Referenced by CBDB_RawFile::Database(), CBDB_RawFile::Open(), CBDB_RawFile::Reopen(), and CBDB_RawFile::x_Close().

◆ m_DataBuf

unique_ptr<CBDB_BufferManager> CBDB_File::m_DataBuf
private

◆ m_DataBufDisabled

bool CBDB_File::m_DataBufDisabled
private

◆ m_DB

DB* CBDB_RawFile::m_DB
protected

◆ m_DB_Attached

bool CBDB_RawFile::m_DB_Attached
private

◆ m_DB_Type

EDBType CBDB_RawFile::m_DB_Type
protected

◆ m_DBC

DBC* CBDB_FileCursor::m_DBC
private

◆ m_Dbf

CBDB_File& CBDB_FileCursor::m_Dbf
protected

◆ m_DBT_Data

DBT* CBDB_RawFile::m_DBT_Data
protected

◆ m_DBT_Key

DBT* CBDB_RawFile::m_DBT_Key
protected

◆ m_DisabledNull

bool CBDB_File::m_DisabledNull
private

◆ m_DuplicateKeys

EDuplicateKeys CBDB_RawFile::m_DuplicateKeys
private

Definition at line 397 of file bdb_file.hpp.

Referenced by CBDB_RawFile::DuplicatesAllowed(), and CBDB_RawFile::GetDupKeysMode().

◆ m_Env

CBDB_Env* CBDB_RawFile::m_Env
protected

◆ m_FetchDirection

EFetchDirection CBDB_FileCursor::m_FetchDirection
private

◆ m_FetchFlags

unsigned int CBDB_FileCursor::m_FetchFlags
private

Type of locking (conventional or RMW)

Definition at line 274 of file bdb_cursor.hpp.

Referenced by CBDB_FileCursor::CBDB_FileCursor(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), and CBDB_FileCursor::InitMultiFetch().

◆ m_FileName

string CBDB_RawFile::m_FileName
private

◆ m_FirstFetched

bool CBDB_FileCursor::m_FirstFetched
private

Flag if FetchFirst is already been done.

Definition at line 272 of file bdb_cursor.hpp.

Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::ResetFirstFetched(), CBDB_FileCursor::SetCondition(), and CBDB_FileCursor::x_FetchFirst_Prolog().

◆ m_H_ffactor

unsigned CBDB_RawFile::m_H_ffactor
protected

Definition at line 381 of file bdb_file.hpp.

Referenced by CBDB_RawFile::SetHashFillFactor(), and CBDB_RawFile::x_CreateDB().

◆ m_H_nelem

unsigned CBDB_RawFile::m_H_nelem
protected

Definition at line 382 of file bdb_file.hpp.

Referenced by CBDB_RawFile::SetHashNelem(), and CBDB_RawFile::x_CreateDB().

◆ m_KeyBuf

unique_ptr<CBDB_BufferManager> CBDB_File::m_KeyBuf
private

◆ m_LastData

void* CBDB_MultiRowBuffer::m_LastData
protected

Last data pointer returned by DB_MULTIPLE_KEY_NEXT.

Definition at line 431 of file bdb_file.hpp.

Referenced by CBDB_MultiRowBuffer::GetLastDataPtr(), and CBDB_File::ReadCursor().

◆ m_LastDataLen

size_t CBDB_MultiRowBuffer::m_LastDataLen
protected

Definition at line 433 of file bdb_file.hpp.

Referenced by CBDB_MultiRowBuffer::GetLastDataLen(), and CBDB_File::ReadCursor().

◆ m_LastKey

void* CBDB_MultiRowBuffer::m_LastKey
protected

Last key pointer returned by DB_MULTIPLE_KEY_NEXT.

Definition at line 430 of file bdb_file.hpp.

Referenced by CBDB_File::ReadCursor().

◆ m_LastKeyLen

size_t CBDB_MultiRowBuffer::m_LastKeyLen
protected

Definition at line 432 of file bdb_file.hpp.

Referenced by CBDB_File::ReadCursor().

◆ m_LastMultiFetchSuccess

bool CBDB_FileCursor::m_LastMultiFetchSuccess
private

when true, last multifetch was successfull

Definition at line 280 of file bdb_cursor.hpp.

Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), and CBDB_FileCursor::InitMultiFetch().

◆ m_LegacyString

bool CBDB_File::m_LegacyString
private

◆ m_MultiFetchMode

EMultiFetchMode CBDB_FileCursor::m_MultiFetchMode
private

Multifetch control mode.

Definition at line 278 of file bdb_cursor.hpp.

Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), and CBDB_FileCursor::InitMultiFetch().

◆ m_MultiRowBuf

CBDB_MultiRowBuffer* CBDB_FileCursor::m_MultiRowBuf
private

◆ m_OpenMode

EOpenMode CBDB_RawFile::m_OpenMode
private

Definition at line 398 of file bdb_file.hpp.

Referenced by CBDB_RawFile::GetOpenMode(), and CBDB_RawFile::x_Open().

◆ m_OutFile

CBDB_File* CBDB_FileDumper::m_OutFile
protected

◆ m_OwnFields

bool CBDB_File::m_OwnFields
private

◆ m_PageSize

unsigned CBDB_RawFile::m_PageSize
private

◆ m_PrefixCompress

bool CBDB_File::m_PrefixCompress
private

TRUE if prefix compression ON.

Definition at line 675 of file bdb_file.hpp.

Referenced by CBDB_File::EnablePrefixCompression(), and CBDB_File::SetCmp().

◆ m_PrintNames

EPrintFieldNames CBDB_FileDumper::m_PrintNames
protected

◆ m_Query

CBDB_Query* CBDB_FileDumper::m_Query
protected

◆ m_QueryStr

string CBDB_FileDumper::m_QueryStr
protected

Definition at line 150 of file bdb_filedump.hpp.

Referenced by CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetQuery().

◆ m_RecLen

unsigned CBDB_RawFile::m_RecLen
protected

◆ m_RecordsDumped

unsigned int CBDB_FileDumper::m_RecordsDumped
protected

◆ m_RevSplitOff

bool CBDB_RawFile::m_RevSplitOff
private

TRUE if reverse splitting is off.

Definition at line 391 of file bdb_file.hpp.

Referenced by CBDB_RawFile::RevSplitOff(), and CBDB_RawFile::x_CreateDB().

◆ m_Trans

CBDB_Transaction* CBDB_RawFile::m_Trans
protected

◆ m_TransAssociation

int CBDB_RawFile::m_TransAssociation
protected

Definition at line 379 of file bdb_file.hpp.

Referenced by CBDB_RawFile::x_SetTransaction(), and CBDB_RawFile::~CBDB_RawFile().

◆ m_ValueFormatting

EValueFormatting CBDB_FileDumper::m_ValueFormatting
protected

◆ To

CBDB_ConditionHandle CBDB_FileCursor::To

Friends

◆ CBDB_FC_Condition

friend class CBDB_FC_Condition
friend

Definition at line 282 of file bdb_cursor.hpp.

◆ CBDB_File

friend class CBDB_File
friend

Definition at line 435 of file bdb_file.hpp.

◆ CBDB_FileCursor [1/3]

friend class CBDB_FileCursor
friend

Definition at line 84 of file bdb_cursor.hpp.

◆ CBDB_FileCursor [2/3]

friend class CBDB_FileCursor
friend

Definition at line 402 of file bdb_file.hpp.

◆ CBDB_FileCursor [3/3]

friend class CBDB_FileCursor
friend

Definition at line 677 of file bdb_file.hpp.

Modified on Sat Mar 02 10:54:18 2024 by modify_doxy.py rev. 669887