NCBI C++ ToolKit
|
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 |
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 |
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.
typedef unsigned int CBDB_FileDumper::TBlobFormat |
Definition at line 100 of file bdb_filedump.hpp.
typedef CSimpleBuffer CBDB_RawFile::TBuffer |
typedef for raw buffer operations
Definition at line 125 of file bdb_file.hpp.
typedef unsigned long CBDB_FileCursor::TRecordCount |
Definition at line 122 of file bdb_cursor.hpp.
typedef int CBDB_File::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.
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.
enum 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.
BLOB value formatting controls.
Enumerator | |
---|---|
eBlobSummary | |
eBlobAll | |
eBlobAsHex | |
eBlobAsTxt |
Definition at line 92 of file bdb_filedump.hpp.
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.
BerkeleyDB compaction methods and flags.
Enumerator | |
---|---|
eCompactNoFree | |
eCompactFreeExisting | |
eCompactFreeAll |
Definition at line 112 of file bdb_file.hpp.
Enumerator | |
---|---|
eNotSet | |
eFirst | |
eLast | |
eEQ | |
eGT | |
eGE | |
eLT | |
eLE |
Definition at line 98 of file bdb_cursor.hpp.
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.
Berkeley DB database type.
Enumerator | |
---|---|
eBtree | |
eQueue | |
eHash |
Definition at line 86 of file bdb_file.hpp.
Control key duplicates in Btree.
Enumerator | |
---|---|
eDuplicatesDisable | |
eDuplicatesEnable |
Definition at line 101 of file bdb_file.hpp.
Enumerator | |
---|---|
eForward | |
eBackward | |
eCurrent | |
eDefault |
Definition at line 109 of file bdb_cursor.hpp.
Enumerator | |
---|---|
eIgnoreError | |
eThrowOnError |
Definition at line 106 of file bdb_file.hpp.
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.
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.
Enumerator | |
---|---|
ePrintNames | |
eDropNames |
Definition at line 68 of file bdb_filedump.hpp.
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.
Field value formatting controls.
Enumerator | |
---|---|
eNoQuotes | |
eQuoteStrings | |
eQuoteAll |
Definition at line 80 of file bdb_filedump.hpp.
unsigned CBDB_File::Append | ( | EAfterWrite | write_flag = eDiscardData | ) |
Append record to the queue (works only for DB_QUEUE database type)
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().
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().
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().
|
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().
void CBDB_File::BindData | ( | const char * | field_name, |
CBDB_Field * | data_field, | ||
size_t | buf_size = 0 , |
||
ENullable | is_null = eNullable |
||
) |
Definition at line 1296 of file bdb_file.cpp.
References _ASSERT, eNullable, CBDB_RawFile::IsOpen(), CBDB_File::m_DataBuf, CBDB_File::m_DisabledNull, CBDB_Field::SetDataSize(), CBDB_Field::SetName(), CBDB_Field::SetNullable(), and CBDB_File::x_ConstructDataBuf().
Referenced by CAsnIndex::CAsnIndex(), CBDB_BlobDictionary< Key >::CBDB_BlobDictionary(), CBDB_PropertyDictionary< PropKey, PropValue >::CBDB_PropertyDictionary(), CBDB_FileDumperApp::Dump(), db_map_base< K, T >::File::File(), SCache_AttrDB::SCache_AttrDB(), SCache_IdIDX::SCache_IdIDX(), SPhoneBookDB::SPhoneBookDB(), and SVolumesDB::SVolumesDB().
void CBDB_File::BindKey | ( | const char * | field_name, |
CBDB_Field * | key_field, | ||
size_t | buf_size = 0 |
||
) |
Definition at line 1281 of file bdb_file.cpp.
References _ASSERT, CBDB_RawFile::IsOpen(), CBDB_File::m_KeyBuf, CBDB_Field::SetDataSize(), and CBDB_Field::SetName().
Referenced by CAsnIndex::CAsnIndex(), CBDB_BlobDictionary< Key >::CBDB_BlobDictionary(), CBDB_BlobStoreDict< TBV >::CBDB_BlobStoreDict(), CBDB_IdBlobFile::CBDB_IdBlobFile(), CBDB_IdFile::CBDB_IdFile(), CBDB_MatrixBvStore< TBV, TM >::CBDB_MatrixBvStore(), CBDB_PropertyDictionary< PropKey, PropValue >::CBDB_PropertyDictionary(), CBDB_RangeMap< TBV >::CBDB_RangeMap(), CBlobMetaDB::CBlobMetaDB(), CBDB_FileDumperApp::Dump(), db_map_base< K, T >::File::File(), SBDB_BvStore_Id< TBV >::SBDB_BvStore_Id(), SCache_AttrDB::SCache_AttrDB(), SCache_IdIDX::SCache_IdIDX(), SDemoDB::SDemoDB(), SPhoneBookDB::SPhoneBookDB(), SPhoneBookZipIDX::SPhoneBookZipIDX(), and SVolumesDB::SVolumesDB().
|
protected |
Definition at line 143 of file bdb_cursor.cpp.
|
private |
|
inline |
Definition at line 290 of file bdb_cursor.hpp.
CBDB_File::CBDB_File | ( | EDuplicateKeys | dup_keys = eDuplicatesDisable , |
EDBType | db_type = eBtree |
||
) |
Definition at line 1241 of file bdb_file.cpp.
CBDB_FileCursor::CBDB_FileCursor | ( | CBDB_File & | dbf, |
CBDB_Transaction & | trans, | ||
ECursorUpdateType | utype = eReadUpdate |
||
) |
Definition at line 183 of file bdb_cursor.cpp.
References CBDB_RawFile::CreateCursor(), env, CBDB_FileCursor::eReadModifyUpdate, CBDB_RawFile::GetEnv(), CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, and CBDB_FileCursor::m_FetchFlags.
CBDB_FileCursor::CBDB_FileCursor | ( | CBDB_File & | dbf, |
ECursorUpdateType | utype = eReadUpdate |
||
) |
Definition at line 161 of file bdb_cursor.cpp.
References CBDB_RawFile::CreateCursor(), env, CBDB_FileCursor::eReadModifyUpdate, CBDB_RawFile::GetBDBTransaction(), CBDB_RawFile::GetEnv(), CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, and CBDB_FileCursor::m_FetchFlags.
|
private |
forbidden
CBDB_FileDumper::CBDB_FileDumper | ( | const CBDB_FileDumper & | fdump | ) |
Definition at line 59 of file bdb_filedump.cpp.
Constructor.
col_separator | Column separator |
Definition at line 48 of file bdb_filedump.cpp.
CBDB_IdFile::CBDB_IdFile | ( | ) |
Definition at line 2078 of file bdb_file.cpp.
References CBDB_File::BindKey(), and CBDB_IdFile::IdKey.
|
private |
CBDB_MultiRowBuffer::CBDB_MultiRowBuffer | ( | size_t | buf_size | ) |
Definition at line 88 of file bdb_file.cpp.
|
private |
forbidden
CBDB_RawFile::CBDB_RawFile | ( | EDuplicateKeys | dup_keys = eDuplicatesDisable , |
EDBType | db_type = eBtree |
||
) |
Definition at line 126 of file bdb_file.cpp.
References CBDB_RawFile::eDuplicatesDisable, CBDB_RawFile::eQueue, CBDB_RawFile::m_DB_Type, CBDB_RawFile::m_DBT_Data, and CBDB_RawFile::m_DBT_Key.
|
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().
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().
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().
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().
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().
void CBDB_RawFile::CompactEx | ( | FContinueCompact | compact_callback, |
ECompact | compact_type = eCompactNoFree , |
||
int | target_fill_pct = 0 |
||
) |
Definition at line 504 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, CBDB_RawFile::eCompactFreeAll, CBDB_RawFile::eCompactFreeExisting, CBDB_RawFile::eCompactNoFree, CBDB_RawFile::FileName(), flags, CBDB_RawFile::GetTxn(), i, Info(), LOG_POST_X, CBDB_RawFile::m_DB, max(), and NULL.
Referenced by CBDB_RawFile::Compact().
Copy record (fields) from another BDB file (MUST have the same structure)
Definition at line 1648 of file bdb_file.cpp.
References data, CBDB_File::GetDataBuffer(), CBDB_File::GetKeyBuffer(), and ncbi::grid::netcache::search::fields::key.
Referenced by CBDB_FileDumper::Dump().
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().
|
protected |
Create DB cursor.
Definition at line 933 of file bdb_file.cpp.
References BDB_CHECK, BDB_THROW, CBDB_RawFile::FileName(), flags, CBDB_Transaction::GetTxn(), and CBDB_RawFile::m_DB.
Referenced by CBDB_FileCursor::CBDB_FileCursor(), and CBDB_FileCursor::ReOpen().
Definition at line 747 of file bdb_file.hpp.
References CBDB_RawFile::m_Database.
EBDB_ErrCode CBDB_FileCursor::Delete | ( | CBDB_File::EIgnoreError | on_error = CBDB_File::eThrowOnError | ) |
Definition at line 349 of file bdb_cursor.cpp.
References BDB_THROW, CBDB_File::DeleteCursor(), CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, and CBDB_FileCursor::m_MultiRowBuf.
Referenced by CBDB_Cache::DropBlob().
EBDB_ErrCode CBDB_File::Delete | ( | EIgnoreError | on_error = eThrowOnError | ) |
Delete record corresponding to the current key value.
Definition at line 1496 of file bdb_file.cpp.
References BDB_CHECK, CBDB_File::Discard(), eBDB_NotFound, eBDB_Ok, CBDB_RawFile::eIgnoreError, CBDB_RawFile::FileName(), CBDB_RawFile::GetTxn(), CBDB_RawFile::m_DB, CBDB_RawFile::m_DBT_Key, and CBDB_File::m_KeyBuf.
Referenced by BDB_batch_delete_recs(), DeletePhoneBookRecord(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SaveIdDeMux(), and CBDB_Cache::x_DropBlob().
|
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().
|
static |
Free the DBT structure created by CloneDBT_Key.
Definition at line 1458 of file bdb_file.cpp.
Referenced by CBDB_BlobReaderWriter::~CBDB_BlobReaderWriter(), and CBDB_BLobStream::~CBDB_BLobStream().
|
inline |
Disable BTREE comparison override.
Definition at line 200 of file bdb_file.hpp.
References CBDB_RawFile::m_CmpOverride.
|
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().
|
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().
|
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.
|
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().
|
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().
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().
void CBDB_FileDumper::Dump | ( | CNcbiOstream & | out, |
CBDB_FileCursor & | cur | ||
) |
Dump BDB cursor to stream.
Definition at line 138 of file bdb_filedump.cpp.
References buf, buffer, CBDB_File::CopyFrom(), CBDB_BLobFile::CreateStream(), data, eBDB_Ok, CBDB_FileDumper::eBlobAll, CBDB_FileDumper::eBlobAsHex, CBDB_FileDumper::ePrintNames, CBDB_FileCursor::Fetch(), CBDB_File::GetDataBuffer(), CBDB_FileCursor::GetDBFile(), CBDB_File::GetKeyBuffer(), hex(), i, CBDB_File::Insert(), ncbi::grid::netcache::search::fields::key, kNullStr, CBDB_BLobFile::LobSize(), CBDB_FileDumper::m_BlobDumpFname, CBDB_FileDumper::m_BlobFormat, CBDB_FileDumper::m_ColumnSeparator, CBDB_FileDumper::m_OutFile, CBDB_FileDumper::m_PrintNames, CBDB_FileDumper::m_Query, CBDB_FileDumper::m_RecordsDumped, NcbiEndl, out(), CBDB_FileDumper::PrintHeader(), CBDB_Query::ResetQueryClause(), ncbi::grid::netcache::search::fields::size, CBDB_FileScanner::StaticEvaluate(), trunc, CBDB_FileDumper::x_DumpFields(), and CBDB_FileDumper::x_SetQuoteFlags().
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().
|
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().
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().
|
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.
|
inline |
Fetches the record corresponding to the current key value.
Definition at line 471 of file bdb_file.hpp.
References CBDB_File::x_Fetch().
Referenced by CBDB_Cache::DropBlobWithExpCheck(), CBDB_BLobFile::Fetch(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobId(), CBDB_Cache::Open(), PrintPhoneBookRecord(), SearchPhoneBook(), and CBDB_Cache::x_FetchBlobAttributes().
EBDB_ErrCode CBDB_FileCursor::Fetch | ( | CBDB_RawFile::TBuffer * | buf, |
EFetchDirection | fdir = eDefault |
||
) |
Fetch BLOB.
Definition at line 782 of file bdb_cursor.cpp.
References _ASSERT, buf, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eDefault, CBDB_FileCursor::eEQ, 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_FirstFetched, CBDB_File::m_KeyBuf, CBDB_FileCursor::m_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FC_Condition::ResetUnassigned(), s_FDir2DBFlag(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::To.
EBDB_ErrCode CBDB_FileCursor::Fetch | ( | EFetchDirection | fdir, |
void ** | buf, | ||
size_t | buf_size, | ||
CBDB_RawFile::EReallocMode | allow_realloc | ||
) |
Fetch BLOB.
Definition at line 729 of file bdb_cursor.cpp.
References _ASSERT, buf, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eDefault, CBDB_FileCursor::eEQ, 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_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FC_Condition::ResetUnassigned(), s_FDir2DBFlag(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::To.
EBDB_ErrCode CBDB_FileCursor::Fetch | ( | EFetchDirection | fdir = eDefault | ) |
Fetch record.
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().
EBDB_ErrCode CBDB_FileCursor::FetchFirst | ( | ) |
Definition at line 447 of file bdb_cursor.cpp.
References _ASSERT, eBDB_MultiRowEnd, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_FileCursor::eFetchAll, CBDB_FileCursor::eFetchGetBufferEnds, CBDB_FileCursor::eGT, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FileCursor::From, CBDB_FC_Condition::GetBuffer(), CBDB_FC_Condition::GetFieldsAssigned(), CBDB_FC_Condition::IsComplete(), CBDB_FC_Condition::m_Buf, CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_FetchFlags, CBDB_File::m_KeyBuf, CBDB_FileCursor::m_LastMultiFetchSuccess, CBDB_FileCursor::m_MultiFetchMode, CBDB_FileCursor::m_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::x_FetchFirst_Prolog().
Referenced by CBDB_RangeMap< TBV >::AddRange(), CBDB_FileCursor::Fetch(), CBDB_Cache::HasBlobs(), and CBDB_RangeMap< TBV >::Remap().
EBDB_ErrCode CBDB_FileCursor::FetchFirst | ( | CBDB_RawFile::TBuffer * | buf | ) |
Fetch BLOB.
Definition at line 587 of file bdb_cursor.cpp.
References _ASSERT, buf, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_FileCursor::eGT, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FileCursor::From, CBDB_FC_Condition::GetBuffer(), CBDB_FC_Condition::GetFieldsAssigned(), CBDB_FC_Condition::IsComplete(), CBDB_FC_Condition::m_Buf, CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_FetchFlags, CBDB_File::m_KeyBuf, CBDB_FileCursor::m_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::x_FetchFirst_Prolog().
EBDB_ErrCode CBDB_FileCursor::FetchFirst | ( | void ** | buf, |
size_t | buf_size, | ||
CBDB_RawFile::EReallocMode | allow_realloc | ||
) |
Fetch BLOB.
Definition at line 527 of file bdb_cursor.cpp.
References _ASSERT, buf, eBDB_NotFound, eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_FileCursor::eGT, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FileCursor::From, CBDB_FC_Condition::GetBuffer(), CBDB_FC_Condition::GetFieldsAssigned(), CBDB_FC_Condition::IsComplete(), CBDB_FC_Condition::m_Buf, CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_FetchFlags, CBDB_File::m_KeyBuf, CBDB_FileCursor::m_MultiRowBuf, CBDB_File::ReadCursor(), CBDB_FileCursor::TestTo(), and CBDB_FileCursor::x_FetchFirst_Prolog().
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().
Definition at line 740 of file bdb_file.hpp.
References CBDB_RawFile::m_FileName.
Referenced by CBDB_RawFile::CompactEx(), CBDB_RawFile::CountRecs(), CBDB_RawFile::CreateCursor(), CBDB_File::Delete(), CBDB_File::DeleteCursor(), CBDB_LobFile::Fetch(), CBDB_LobFile::GetData(), CBDB_RawFile::PrintStat(), CBDB_File::ReadCursor(), CBDB_RawFile::SafeTruncate(), CBDB_RawFile::Sync(), CBDB_RawFile::Truncate(), CBDB_RawFile::x_CreateDB(), CBDB_File::x_Fetch(), CBDB_LobFile::x_Put(), and CBDB_File::x_Write().
|
inline |
Get current transaction.
Definition at line 264 of file bdb_file.hpp.
References CBDB_RawFile::m_Trans.
Referenced by CBDB_FileCursor::CBDB_FileCursor(), CBDB_RawFile::CountRecs(), CBDB_RawFile::PrintStat(), and CBDB_FileCursor::ReOpen().
|
inline |
Definition at line 103 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_BlobFormat.
unsigned int CBDB_RawFile::GetBtreeMinKeysPerPage | ( | ) |
Definition at line 986 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, CBDB_RawFile::eBtree, CBDB_RawFile::m_BT_minkey, CBDB_RawFile::m_DB, and CBDB_RawFile::m_DB_Type.
|
inline |
Get Buffer manager for data section of the file.
Definition at line 522 of file bdb_file.hpp.
References CBDB_File::m_DataBuf.
|
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().
|
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().
|
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().
|
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().
|
inline |
Definition at line 160 of file bdb_cursor.hpp.
References CBDB_FileCursor::m_FetchDirection.
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.
const CBDB_Field & CBDB_File::GetField | ( | TUnifiedFieldIndex | idx | ) | const |
Return field by field index.
idx | field index |
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().
|
inlineprotected |
Return next field's IBDB_FieldConvert interface (hidden cast to non-public parent class)
Definition at line 320 of file bdb_cursor.hpp.
Referenced by CBDB_FC_Condition::GetUnassignedField().
CBDB_File::TUnifiedFieldIndex CBDB_File::GetFieldIdx | ( | const string & | name | ) | const |
Get field index by name.
name | field name to find (case insensitive) |
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()().
Return file name.
Definition at line 242 of file bdb_file.hpp.
References CBDB_RawFile::m_FileName.
Referenced by IndexABioseq(), and CReadIndexSpeedApp::x_PreReadIndex().
|
inline |
Get Buffer manager for key section of the file.
Definition at line 519 of file bdb_file.hpp.
References CBDB_File::m_KeyBuf.
|
inline |
Get Buffer manager for key section of the file.
Definition at line 513 of file bdb_file.hpp.
References CBDB_File::m_KeyBuf.
Referenced by BDB_batch_delete_recs(), BDB_find_field(), BDB_get_rowid(), CBDB_File::CopyFrom(), CBDB_FileDumper::Dump(), CBDB_FileDumperApp::Dump(), and CBDB_File::DuplicateStructure().
|
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().
|
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().
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.
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.
|
inline |
Return the file open mode.
Definition at line 245 of file bdb_file.hpp.
References CBDB_RawFile::m_OpenMode.
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.
|
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().
|
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().
|
inline |
Definition at line 334 of file bdb_cursor.hpp.
References CBDB_FileCursor::eBackward, CBDB_FileCursor::eForward, and CBDB_FileCursor::m_FetchDirection.
|
virtual |
Get current transaction.
Implements ITransactional.
Definition at line 614 of file bdb_file.cpp.
References CBDB_RawFile::m_Trans.
|
protected |
Get transaction handler.
Function returns NULL if no transaction has been set.
Definition at line 248 of file bdb_file.cpp.
References CBDB_Transaction::GetTxn(), and CBDB_RawFile::m_Trans.
Referenced by CBDB_RawFile::CompactEx(), CBDB_BLobFile::CreateReader(), CBDB_BLobFile::CreateReaderWriter(), CBDB_BLobFile::CreateStream(), CBDB_File::Delete(), CBDB_RawFile::Truncate(), CBDB_RawFile::x_DB_Fetch(), and CBDB_RawFile::x_DB_Put().
|
protected |
Definition at line 106 of file bdb_file.cpp.
References CBDB_MultiRowBuffer::m_Buf, CBDB_MultiRowBuffer::m_BufSize, and CBDB_MultiRowBuffer::m_Data_DBT.
Referenced by CBDB_File::ReadCursor().
void CBDB_FileCursor::InitMultiFetch | ( | size_t | buffer_size, |
EMultiFetchMode | mfm = eFetchAll |
||
) |
Init multi-row fetch.
buffer_size | Size of fetch buffer (at least one page size, multiple of 1024 bytes in size) |
Definition at line 213 of file bdb_cursor.cpp.
References _ASSERT, CBDB_FileCursor::m_FetchFlags, CBDB_FileCursor::m_LastMultiFetchSuccess, CBDB_FileCursor::m_MultiFetchMode, CBDB_FileCursor::m_MultiRowBuf, and NULL.
Referenced by CBDB_Cache::Open(), CCacheIndexCopyApp::Run(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), CAsnSubCacheCreateApplication::x_LocateBlobsInCache(), and CReadIndexSpeedApp::x_WalkIndex().
EBDB_ErrCode CBDB_File::Insert | ( | EAfterWrite | write_flag = eDiscardData | ) |
Insert new record.
Definition at line 1466 of file bdb_file.cpp.
References CBDB_File::CheckNullDataConstraint(), CBDB_RawFile::DuplicatesAllowed(), flags, and CBDB_File::x_Write().
Referenced by CBDB_Cache::BlobCheckIn(), BuildZipIndex(), CBDB_FileDumper::Dump(), CBDB_BLobFile::Insert(), LoadPhoneBook(), CBDB_Cache::Open(), and CBDB_Cache::RegisterOverflow().
|
inline |
Definition at line 760 of file bdb_file.hpp.
References CBDB_RawFile::m_DB_Attached.
Referenced by db_map_base< K, T >::iterator_base::open_cursor().
|
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().
bool CBDB_FileCursor::IsOpen | ( | void | ) | const |
TRUE when cursor open.
Definition at line 258 of file bdb_cursor.cpp.
References CBDB_FileCursor::m_DBC.
|
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().
|
inline |
Return fields ownership flag.
Definition at line 563 of file bdb_file.hpp.
References CBDB_File::m_OwnFields.
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.
|
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().
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().
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().
|
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().
|
inline |
Open file with specified access mode.
Definition at line 774 of file bdb_file.hpp.
Referenced by BuildZipIndex(), CDumpASNIndex::CDumpASNIndex(), CBDB_FileDumperApp::Dump(), CAsnSubCacheCreateApplication::IndexNewBlobsInSubCache(), LoadDemoDB(), LoadPhoneBook(), CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), PrintDemoDB(), PrintPhoneBook(), CPrimeCacheApplication::Run(), CReadIndexSpeedApp::Run(), CBDB_PhoneBookDemo2::Run(), CBDB_PhoneBookDemo3::Run(), CBDB_MergeTest::Run(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), and CAsnSubCacheCreateApplication::x_LocateBlobsInCache().
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | const char * | val | ) |
Definition at line 893 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetString(), and val.
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | const string & | val | ) |
Definition at line 902 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetStdString(), and val.
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | double | val | ) |
Definition at line 884 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetDouble(), and val.
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | float | val | ) |
Definition at line 875 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetFloat(), and val.
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | int | val | ) |
Definition at line 857 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetInt(), and val.
CBDB_ConditionHandle & CBDB_ConditionHandle::operator<< | ( | unsigned int | val | ) |
Definition at line 866 of file bdb_cursor.cpp.
References CBDB_FC_Condition::GetUnassignedField(), CBDB_FC_Condition::IncFieldsAssigned(), CBDB_ConditionHandle::m_Condition, IBDB_FieldConvert::SetUint(), and val.
|
private |
|
private |
CBDB_FileDumper & CBDB_FileDumper::operator= | ( | const CBDB_FileDumper & | fdump | ) |
Definition at line 77 of file bdb_filedump.cpp.
References CBDB_FileDumper::m_BlobDumpFname, CBDB_FileDumper::m_BlobFormat, CBDB_FileDumper::m_ColumnSeparator, CBDB_FileDumper::m_OutFile, CBDB_FileDumper::m_PrintNames, CBDB_FileDumper::m_Query, CBDB_FileDumper::m_QueryStr, CBDB_FileDumper::m_RecordsDumped, and CBDB_FileDumper::m_ValueFormatting.
|
private |
|
private |
|
protected |
Definition at line 327 of file bdb_filedump.cpp.
References data, CBDB_Field::GetName(), i, ncbi::grid::netcache::search::fields::key, CBDB_FileDumper::m_ColumnSeparator, NcbiEndl, and out().
Referenced by CBDB_FileDumper::Dump().
void CBDB_RawFile::PrintStat | ( | CNcbiOstream & | out | ) |
Print database statistics.
Definition at line 855 of file bdb_file.cpp.
References BDB_CHECK, CBDB_RawFile::FileName(), free(), CBDB_RawFile::GetBDBTransaction(), CBDB_Transaction::GetTxn(), CBDB_RawFile::m_DB, NcbiEndl, and out().
|
protected |
Read DB cursor.
Definition at line 1680 of file bdb_file.cpp.
References BDB_CHECK, dbc, eBDB_KeyEmpty, eBDB_NotFound, eBDB_Ok, CBDB_RawFile::FileName(), CBDB_File::m_DataBufDisabled, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_RawFile::x_DBC_Fetch(), CBDB_File::x_EndRead(), and CBDB_File::x_StartRead().
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), and CBDB_File::ReadCursor().
|
protected |
Multiple-row read into a buffer Buffer is to be traversed using DB_MULTIPLE_KEY_NEXT (BerkeleyDB)
multirow_only | Fetch only in multirow buffer, method returns eBDB_MultiRowEnd when the buffer is over |
Definition at line 1794 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, BDB_THROW, CSimpleBufferT< T, ResizeStrategy >::data(), dbc, ICompression::DecompressBuffer(), eBDB_KeyEmpty, eBDB_MultiRowEnd, eBDB_NotFound, eBDB_Ok, CBDB_RawFile::eBtree, CBDB_RawFile::eHash, CBDB_RawFile::eQueue, eUnknown, CBDB_RawFile::FileName(), AutoPtr< X, Del >::get(), ICompression::GetErrorDescription(), HAVE_UNALIGNED_READS, CBDB_MultiRowBuffer::InitDBT(), CBDB_MultiRowBuffer::m_BufPtr, CBDB_RawFile::m_CompressBuffer, CBDB_RawFile::m_Compressor, CBDB_MultiRowBuffer::m_Data_DBT, CBDB_File::m_DataBuf, CBDB_RawFile::m_DB_Type, CBDB_RawFile::m_DBT_Key, CBDB_File::m_KeyBuf, CBDB_MultiRowBuffer::m_LastData, CBDB_MultiRowBuffer::m_LastDataLen, CBDB_MultiRowBuffer::m_LastKey, CBDB_MultiRowBuffer::m_LastKeyLen, CBDB_MultiRowBuffer::MultipleInit(), NCBI_THROW, CBDB_File::ReadCursor(), CSimpleBufferT< T, ResizeStrategy >::resize_mem(), and CSimpleBufferT< T, ResizeStrategy >::size().
|
protected |
Read DB cursor (BLOB)
Definition at line 1705 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, buf, dbc, eBDB_KeyEmpty, eBDB_NotFound, eBDB_Ok, CBDB_RawFile::FileName(), CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_File::ReadCursor(), CBDB_RawFile::x_DBC_Fetch(), CBDB_File::x_EndRead(), and CBDB_File::x_StartRead().
|
protected |
Read DB cursor (BLOB)
Definition at line 1747 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, BDB_THROW, buf, dbc, eBDB_KeyEmpty, eBDB_NotFound, eBDB_Ok, CBDB_RawFile::eReallocForbidden, CBDB_RawFile::FileName(), AutoPtr< X, Del >::get(), CBDB_RawFile::m_Compressor, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_RawFile::x_DBC_Fetch(), CBDB_File::x_EndRead(), and CBDB_File::x_StartRead().
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().
|
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().
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.
void CBDB_FileCursor::ReOpen | ( | CBDB_Transaction * | trans | ) |
Reopen cursor after Close.
trans | Transaction pointer (optional) (ownership is NOT be taken.) |
Definition at line 241 of file bdb_cursor.cpp.
References CBDB_FileCursor::Close(), CBDB_RawFile::CreateCursor(), CBDB_FileCursor::From, CBDB_RawFile::GetBDBTransaction(), CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FC_Condition::ResetUnassigned(), and CBDB_FileCursor::To.
Reopen the db file.
Definition at line 1345 of file bdb_file.cpp.
References CBDB_RawFile::eQueue, CBDB_RawFile::IsByteSwapped(), CBDB_File::m_DataBuf, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Type, CBDB_File::m_KeyBuf, and CBDB_RawFile::Reopen().
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().
|
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().
|
inline |
Definition at line 341 of file bdb_cursor.hpp.
References CBDB_FileCursor::eBackward, CBDB_FileCursor::eForward, and CBDB_FileCursor::m_FetchDirection.
Referenced by db_map_base< K, T >::iterator_base::check_open_cursor(), and db_map_base< K, T >::iterator_base::go_end().
void CBDB_RawFile::RevSplitOff | ( | ) |
Turn OFF reverse splitting.
Definition at line 573 of file bdb_file.cpp.
References CBDB_RawFile::m_RevSplitOff.
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, count, CBDB_Env::CreateTxn(), data, 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().
Set BLOB dump file name.
Definition at line 121 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_BlobDumpFname.
Referenced by CBDB_FileDumperApp::Dump().
|
inline |
Definition at line 178 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_BlobFormat.
Referenced by CBDB_FileDumperApp::Dump().
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().
void CBDB_RawFile::SetCachePriority | ( | ECachePriority | priority | ) |
Definition at line 241 of file bdb_file.cpp.
void CBDB_RawFile::SetCacheSize | ( | unsigned int | cache_size | ) |
Set Berkeley DB memory cache size for the file (default is 256K).
Definition at line 563 of file bdb_file.cpp.
References BDB_CHECK, CBDB_RawFile::m_CacheSize, and CBDB_RawFile::m_DB.
Referenced by CDumpASNIndex::CDumpASNIndex(), CAsnSubCacheCreateApplication::IndexNewBlobsInSubCache(), CPrimeCacheApplication::Run(), CReadIndexSpeedApp::Run(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), and CAsnSubCacheCreateApplication::x_LocateBlobsInCache().
|
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().
|
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().
|
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.
|
inline |
Control field names printing.
Definition at line 166 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_PrintNames.
Referenced by CBDB_FileDumperApp::Dump().
Definition at line 160 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_ColumnSeparator.
Referenced by CBDB_FileDumperApp::Dump().
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().
void CBDB_FileCursor::SetCondition | ( | ECondition | cond_from, |
ECondition | cond_to = eNotSet |
||
) |
Set search condition(type of interval)
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().
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().
|
inline |
Definition at line 327 of file bdb_cursor.hpp.
References CBDB_FileCursor::m_FetchDirection.
|
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.
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().
|
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().
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.
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.
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 rapidjson::value.
Referenced by CBDB_File::Attach().
|
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().
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().
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().
|
virtual |
Establish transaction association.
Implements ITransactional.
Definition at line 602 of file bdb_file.cpp.
References CBDB_Transaction::CastTransaction(), and CBDB_RawFile::x_SetTransaction().
Referenced by BDB_batch_delete_recs(), CBDB_Cache::BlobCheckIn(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::BlobSize(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::CreateReader(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::EvaluateTimeLine(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Fetch(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetBlobId(), CBDB_Cache::GetBlobOwner(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::HasBlobs(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::ReadRealloc(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), CBDB_RawFile::SafeTruncate(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SaveIdDeMux(), CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_Store().
|
inline |
Definition at line 172 of file bdb_filedump.hpp.
References CBDB_FileDumper::m_ValueFormatting.
Referenced by CBDB_FileDumperApp::Dump().
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.
|
protected |
Test "TO" search criteria. Return "true" if current value satisfies it.
Definition at line 830 of file bdb_cursor.cpp.
References CBDB_FileCursor::eEQ, CBDB_FileCursor::eGE, CBDB_FileCursor::eGT, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FC_Condition::GetBuffer(), CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_CondTo, CBDB_FileCursor::m_Dbf, CBDB_File::m_KeyBuf, and CBDB_FileCursor::To.
Referenced by CBDB_FileCursor::Fetch(), and CBDB_FileCursor::FetchFirst().
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, count, CBDB_RawFile::FileName(), CBDB_RawFile::GetTxn(), and CBDB_RawFile::m_DB.
Referenced by CBDB_Cache::x_TruncateDB().
EBDB_ErrCode CBDB_FileCursor::Update | ( | CBDB_File::EAfterWrite | write_flag = CBDB_File::eDiscardData | ) |
Definition at line 322 of file bdb_cursor.cpp.
References BDB_THROW, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_MultiRowBuf, and CBDB_File::WriteCursor().
Referenced by CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::x_Store(), and CBDB_Cache::x_UpdateAccessTime().
EBDB_ErrCode CBDB_FileCursor::UpdateBlob | ( | const void * | data, |
size_t | size, | ||
CBDB_File::EAfterWrite | write_flag = CBDB_File::eDiscardData |
||
) |
Definition at line 334 of file bdb_cursor.cpp.
References BDB_THROW, data, CBDB_FileCursor::m_DBC, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_MultiRowBuf, ncbi::grid::netcache::search::fields::size, and CBDB_File::WriteCursor().
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().
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().
|
protected |
Write BLOB to DB cursor.
Definition at line 1968 of file bdb_file.cpp.
References BDB_THROW, data, dbc, CBDB_File::m_DataBufDisabled, CBDB_RawFile::m_DBT_Data, ncbi::grid::netcache::search::fields::size, and CBDB_File::x_Write().
|
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().
|
private |
Definition at line 1996 of file bdb_file.cpp.
References BDB_THROW, CBDB_File::m_BufsAttached, CBDB_File::m_BufsCreated, CBDB_File::m_DataBuf, and CBDB_File::m_KeyBuf.
Referenced by CBDB_File::Attach(), CBDB_File::Open(), and CBDB_File::Verify().
|
protected |
Definition at line 260 of file bdb_file.cpp.
References BDB_CHECK, ERR_POST_X, CBDB_RawFile::eThrowOnError, CBDB_Env::LsnResetForMemLog(), CBDB_RawFile::m_Database, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Attached, CBDB_RawFile::m_Env, and CBDB_RawFile::m_FileName.
Referenced by CBDB_RawFile::Close(), and CBDB_RawFile::~CBDB_RawFile().
|
staticprivate |
Referenced by CBDB_File::SetCmp().
|
private |
Definition at line 1271 of file bdb_file.cpp.
References CBDB_File::m_DataBuf, CBDB_File::m_DisabledNull, CBDB_File::m_LegacyString, and CBDB_File::m_OwnFields.
Referenced by CBDB_File::BindData(), and CBDB_File::DuplicateStructure().
|
private |
Definition at line 1264 of file bdb_file.cpp.
References CBDB_File::m_KeyBuf, CBDB_File::m_LegacyString, and CBDB_File::m_OwnFields.
Referenced by CBDB_File::DuplicateStructure().
Definition at line 887 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, database, CBDB_RawFile::eBtree, CBDB_RawFile::eHash, CBDB_RawFile::eQueue, CBDB_Env::IsTransactional(), CBDB_RawFile::kOpenFileMask, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Attached, CBDB_RawFile::m_DB_Type, CBDB_RawFile::m_Env, and NULL.
Referenced by CBDB_RawFile::x_Open().
|
protected |
Create m_DB member, set page, cache parameters.
rec_len | record length (must be non zero for Queue type) |
Definition at line 620 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, CBDB_RawFile::DuplicatesAllowed(), CBDB_RawFile::eBtree, CBDB_RawFile::eHash, CBDB_RawFile::eQueue, CBDB_RawFile::FileName(), CBDB_Env::GetEnv(), CBDB_RawFile::m_BT_minkey, CBDB_RawFile::m_CacheSize, CBDB_RawFile::m_CmpOverride, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Attached, CBDB_RawFile::m_DB_Type, CBDB_RawFile::m_Env, CBDB_RawFile::m_H_ffactor, CBDB_RawFile::m_H_nelem, CBDB_RawFile::m_PageSize, CBDB_RawFile::m_RecLen, CBDB_RawFile::m_RevSplitOff, CDB_guard::release(), CBDB_RawFile::SetCmp(), and CBDB_RawFile::SetHash().
Referenced by CBDB_File::Verify(), and CBDB_RawFile::x_Open().
Override for DBC->c_put(...) Handles compression.
Definition at line 1163 of file bdb_file.cpp.
References _ASSERT, buf, ICompression::CompressBuffer(), CSimpleBufferT< T, ResizeStrategy >::data(), data, dbc, flags, AutoPtr< X, Del >::get(), k_BDB_CompressionCutOff, ncbi::grid::netcache::search::fields::key, CBDB_RawFile::m_CompressBuffer, CBDB_RawFile::m_Compressor, CSimpleBufferT< T, ResizeStrategy >::resize_mem(), ncbi::grid::netcache::search::fields::size, and CSimpleBufferT< T, ResizeStrategy >::size().
Referenced by CBDB_File::x_Write().
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(), 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().
Override for DB->put(...) Handles compression.
Definition at line 1092 of file bdb_file.cpp.
References _ASSERT, buf, ICompression::CompressBuffer(), CSimpleBufferT< T, ResizeStrategy >::data(), data, flags, AutoPtr< X, Del >::get(), CBDB_RawFile::GetTxn(), k_BDB_CompressionCutOff, ncbi::grid::netcache::search::fields::key, CBDB_RawFile::m_CompressBuffer, CBDB_RawFile::m_Compressor, CBDB_RawFile::m_DB, CSimpleBufferT< T, ResizeStrategy >::resize_mem(), ncbi::grid::netcache::search::fields::size, and CSimpleBufferT< T, ResizeStrategy >::size().
Referenced by CBDB_File::x_Write().
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(), 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().
|
private |
Definition at line 300 of file bdb_filedump.cpp.
References CBDB_BufferManager::FieldCount(), CBDB_BufferManager::GetField(), IBDB_FieldConvert::GetString(), i, CBDB_Field::IsNull(), kNullStr, CBDB_FileDumper::m_ColumnSeparator, and out().
Referenced by CBDB_FileDumper::Dump().
|
private |
Record reading epilog function.
Definition at line 2030 of file bdb_file.cpp.
References CBDB_File::m_DataBuf, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, and CBDB_File::m_KeyBuf.
Referenced by CBDB_File::CloneDBT_Key(), CBDB_File::ReadCursor(), and CBDB_File::x_Fetch().
|
protected |
Wrapper around get operation.
Definition at line 1408 of file bdb_file.cpp.
References BDB_CHECK, eBDB_NotFound, eBDB_Ok, CBDB_RawFile::FileName(), flags, CBDB_File::m_DataBufDisabled, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_RawFile::x_DB_Fetch(), CBDB_File::x_EndRead(), and CBDB_File::x_StartRead().
Referenced by CBDB_File::Fetch(), and CBDB_File::FetchForUpdate().
Definition at line 996 of file bdb_file.cpp.
References _ASSERT, BDB_THROW, CSimpleBufferT< T, ResizeStrategy >::data(), data, ICompression::DecompressBuffer(), ICompression::GetErrorDescription(), CBDB_RawFile::m_CompressBuffer, and CBDB_RawFile::m_Compressor.
Referenced by CBDB_RawFile::x_DB_Fetch(), and CBDB_RawFile::x_DBC_Fetch().
|
private |
Definition at line 371 of file bdb_cursor.cpp.
References BDB_THROW, CBDB_FC_Condition::eAssignMaxVal, CBDB_FC_Condition::eAssignMinVal, CBDB_FileCursor::eBackward, CBDB_FileCursor::eEQ, CBDB_FileCursor::eFirst, CBDB_FileCursor::eGE, CBDB_FileCursor::eGT, CBDB_FileCursor::eLast, CBDB_FileCursor::eLE, CBDB_FileCursor::eLT, CBDB_FileCursor::From, CBDB_FC_Condition::GetBuffer(), CBDB_FC_Condition::InitUnassignedFields(), CBDB_FC_Condition::IsComplete(), CBDB_FileCursor::m_CondFrom, CBDB_ConditionHandle::m_Condition, CBDB_FileCursor::m_CondTo, CBDB_FileCursor::m_Dbf, CBDB_FileCursor::m_FetchDirection, CBDB_FileCursor::m_FirstFetched, CBDB_File::m_KeyBuf, and CBDB_FileCursor::To.
Referenced by CBDB_FileCursor::FetchFirst().
|
protected |
Definition at line 692 of file bdb_file.cpp.
References _ASSERT, BDB_CHECK, database, CBDB_RawFile::eBtree, CBDB_RawFile::eCreate, CBDB_RawFile::eHash, CBDB_RawFile::eQueue, CBDB_RawFile::eReadOnly, CBDB_RawFile::eReadWriteCreate, CBDB_Env::IsTransactional(), CBDB_RawFile::kOpenFileMask, CBDB_RawFile::m_ByteSwapped, CBDB_RawFile::m_DB, CBDB_RawFile::m_DB_Type, CBDB_RawFile::m_Env, CBDB_RawFile::m_OpenMode, CBDB_RawFile::m_RecLen, NULL, CBDB_RawFile::Remove(), CBDB_RawFile::x_Create(), CBDB_RawFile::x_CreateDB(), and CBDB_RawFile::x_SetByteSwapped().
Referenced by CBDB_RawFile::Open(), and CBDB_RawFile::Reopen().
|
protected |
Definition at line 595 of file bdb_file.cpp.
References CBDB_RawFile::m_Trans.
Referenced by CBDB_RawFile::RemoveTransaction().
|
protectedvirtual |
Set byte order swapping.
Can be overloaded on derived classes
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().
|
protectedvirtual |
Set byte order swapping.
Can be overloaded on derived classes
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().
|
private |
Definition at line 349 of file bdb_filedump.cpp.
References _ASSERT, CBDB_FileDumper::eNoQuotes, CBDB_FileDumper::eQuoteAll, CBDB_FileDumper::eQuoteStrings, CBDB_BufferManager::FieldCount(), flags, CBDB_BufferManager::GetField(), i, and CBDB_FileDumper::m_ValueFormatting.
Referenced by CBDB_FileDumper::Dump().
|
protected |
Set current transaction.
Definition at line 578 of file bdb_file.cpp.
References CBDB_Transaction::Add(), CBDB_Transaction::eFullAssociation, CBDB_Transaction::GetAssociationMode(), CBDB_RawFile::m_Trans, CBDB_RawFile::m_TransAssociation, and CBDB_Transaction::Remove().
Referenced by CBDB_RawFile::SetTransaction().
|
private |
Record reading prolog function.
Definition at line 2012 of file bdb_file.cpp.
References CBDB_File::m_DataBuf, CBDB_File::m_DataBufDisabled, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, and CBDB_File::m_KeyBuf.
Referenced by CBDB_File::CloneDBT_Key(), CBDB_File::ReadCursor(), and CBDB_File::x_Fetch().
|
private |
Definition at line 2041 of file bdb_file.cpp.
References BDB_CHECK, dbc, CBDB_File::Discard(), eBDB_KeyDup, eBDB_Ok, CBDB_File::eDiscardData, CBDB_RawFile::FileName(), flags, CBDB_File::m_DataBuf, CBDB_File::m_DataBufDisabled, CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_File::m_KeyBuf, CBDB_RawFile::x_DB_CPut(), and CBDB_RawFile::x_DB_Put().
Referenced by CBDB_File::Append(), CBDB_File::Insert(), CBDB_File::UpdateInsert(), and CBDB_File::WriteCursor().
|
protected |
Definition at line 148 of file bdb_cursor.cpp.
References CBDB_ConditionHandle::m_Condition.
|
inline |
Definition at line 291 of file bdb_cursor.hpp.
References CBDB_FileCursor::Close(), and CBDB_CursorGuard::m_Cur.
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 | ( | ) |
Definition at line 72 of file bdb_filedump.cpp.
References CBDB_FileDumper::m_Query.
CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer | ( | ) |
Definition at line 100 of file bdb_file.cpp.
References CBDB_MultiRowBuffer::m_Buf, and CBDB_MultiRowBuffer::m_Data_DBT.
|
virtual |
Definition at line 170 of file bdb_file.cpp.
References _ASSERT, BDB_THROW, CBDB_Transaction::eFullAssociation, CBDB_RawFile::eIgnoreError, CBDB_Transaction::IsInProgress(), CBDB_RawFile::m_DBT_Data, CBDB_RawFile::m_DBT_Key, CBDB_RawFile::m_Trans, CBDB_RawFile::m_TransAssociation, and CBDB_RawFile::x_Close().
CBDB_ConditionHandle CBDB_FileCursor::From |
Definition at line 252 of file bdb_cursor.hpp.
Referenced by CBDB_RangeMap< TBV >::AddRange(), CBDB_Cache::BlobCheckIn(), SBDB_BvStore_Id< TBV >::ComputeBitCountMap(), CBDB_Cache::DropBlob(), CBDB_FileDumperApp::Dump(), CBDB_Cache::EvaluateTimeLine(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBlobMetaDB::FetchMeta(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::HasBlobs(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::LoadIdDeMux(), CBDB_MatrixBvStore< TBV, TM >::LoadMatrixDescriptions(), db_map_base< K, T >::iterator_base::open_cursor(), CBDB_Cache::Purge(), CBDB_Cache::Read(), SBDB_BvStore_Id< TBV >::ReadIds(), CBDB_Cache::RegisterOverflow(), CBDB_RangeMap< TBV >::Remap(), CBDB_Cache::Remove(), CBDB_FileCursor::ReOpen(), SearchPhoneBook(), CBDB_FileCursor::SetCondition(), CBDB_Cache::x_DropBlob(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), CBDB_FileCursor::x_FetchFirst_Prolog(), CAsnSubCacheCreateApplication::x_LocateBlobsInCache(), CBDB_Cache::x_Store(), and CBDB_Cache::x_UpdateAccessTime().
CBDB_FieldInt4 CBDB_IdFile::IdKey |
Definition at line 689 of file bdb_file.hpp.
Referenced by CBDB_IdFile::CBDB_IdFile().
|
static |
Definition at line 75 of file bdb_file.hpp.
Definition at line 400 of file bdb_file.hpp.
Referenced by CBDB_RawFile::x_Create(), and CBDB_RawFile::x_Open().
|
protected |
Definition at line 144 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetBlobDumpFile().
|
protected |
Definition at line 147 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::GetBlobFormat(), CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetBlobFormat().
|
protected |
Definition at line 383 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetBtreeMinKeysPerPage(), CBDB_RawFile::SetBtreeMinKeysPerPage(), and CBDB_RawFile::x_CreateDB().
|
protected |
Multiple row buffer.
Definition at line 427 of file bdb_file.hpp.
Referenced by CBDB_MultiRowBuffer::InitDBT(), and CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer().
|
protected |
current buffer position
Definition at line 429 of file bdb_file.hpp.
Referenced by CBDB_MultiRowBuffer::MultipleInit(), and CBDB_File::ReadCursor().
|
private |
Definition at line 669 of file bdb_file.hpp.
Referenced by CBDB_File::x_CheckConstructBuffers().
|
private |
Definition at line 670 of file bdb_file.hpp.
Referenced by CBDB_File::x_CheckConstructBuffers().
|
protected |
buffer size
Definition at line 428 of file bdb_file.hpp.
Referenced by CBDB_MultiRowBuffer::InitDBT().
|
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().
|
private |
Definition at line 396 of file bdb_file.hpp.
Referenced by CBDB_RawFile::SetCacheSize(), and CBDB_RawFile::x_CreateDB().
|
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().
|
protected |
Definition at line 143 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::operator=(), CBDB_FileDumper::PrintHeader(), CBDB_FileDumper::SetColumnSeparator(), and CBDB_FileDumper::x_DumpFields().
|
protected |
Definition at line 386 of file bdb_file.hpp.
Referenced by CBDB_File::ReadCursor(), CBDB_RawFile::x_DB_CPut(), CBDB_RawFile::x_DB_Fetch(), CBDB_RawFile::x_DB_Put(), CBDB_RawFile::x_DBC_Fetch(), and CBDB_RawFile::x_FetchBufferDecompress().
|
protected |
Record compressor.
Definition at line 385 of file bdb_file.hpp.
Referenced by CBDB_File::ReadCursor(), CBDB_RawFile::SetCompressor(), CBDB_RawFile::x_DB_CPut(), CBDB_RawFile::x_DB_Fetch(), CBDB_RawFile::x_DB_Put(), CBDB_RawFile::x_DBC_Fetch(), and CBDB_RawFile::x_FetchBufferDecompress().
|
private |
From condition proxy-object.
Definition at line 266 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::SetCondition(), and CBDB_FileCursor::x_FetchFirst_Prolog().
|
protected |
Definition at line 82 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_ConditionHandle::operator<<(), CBDB_FileCursor::ReOpen(), CBDB_FileCursor::SetCondition(), CBDB_FileCursor::TestTo(), CBDB_FileCursor::x_FetchFirst_Prolog(), and CBDB_ConditionHandle::~CBDB_ConditionHandle().
|
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().
|
private |
Definition at line 296 of file bdb_cursor.hpp.
Referenced by CBDB_CursorGuard::~CBDB_CursorGuard().
|
protected |
Temp DBT for multiple fetch.
Definition at line 426 of file bdb_file.hpp.
Referenced by CBDB_MultiRowBuffer::InitDBT(), CBDB_MultiRowBuffer::MultipleInit(), CBDB_File::ReadCursor(), and CBDB_MultiRowBuffer::~CBDB_MultiRowBuffer().
|
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().
|
private |
Definition at line 668 of file bdb_file.hpp.
Referenced by CBDB_File::BindData(), CBDB_File::CheckNullDataConstraint(), CBDB_File::DisableDataPacking(), CBDB_File::Discard(), CBDB_File::DuplicateStructure(), CBDB_File::GetDataBuffer(), CBDB_File::GetField(), CBDB_File::GetFieldIdx(), CBDB_File::Open(), CBDB_File::ReadCursor(), CBDB_File::Reopen(), CBDB_File::SetFieldOwnership(), CBDB_File::SetLegacyStringsCheck(), CBDB_File::x_CheckConstructBuffers(), CBDB_File::x_ConstructDataBuf(), CBDB_File::x_EndRead(), CBDB_File::x_SetByteSwapped(), CBDB_File::x_StartRead(), and CBDB_File::x_Write().
|
private |
Definition at line 671 of file bdb_file.hpp.
Referenced by CBDB_File::DisableDataBufProcessing(), CBDB_File::ReadCursor(), CBDB_File::WriteCursor(), CBDB_File::x_Fetch(), CBDB_File::x_StartRead(), and CBDB_File::x_Write().
|
protected |
Definition at line 374 of file bdb_file.hpp.
Referenced by CBDB_RawFile::Attach(), CBDB_RawFile::CompactEx(), CBDB_RawFile::CountRecs(), CBDB_RawFile::CreateCursor(), CBDB_BLobFile::CreateReader(), CBDB_BLobFile::CreateReaderWriter(), CBDB_BLobFile::CreateStream(), CBDB_File::Delete(), CBDB_LobFile::Fetch(), CBDB_RawFile::GetBtreeMinKeysPerPage(), CBDB_LobFile::GetData(), CBDB_RawFile::GetPageSize(), CBDB_File::Open(), CBDB_RawFile::PrintStat(), CBDB_RawFile::Rename(), CBDB_File::Reopen(), CBDB_RawFile::Reopen(), CBDB_RawFile::SafeTruncate(), CBDB_RawFile::SetCacheSize(), CBDB_LobFile::SetCmp(), CBDB_File::SetCmp(), CBDB_IdFile::SetCmp(), CBDB_IdBlobFile::SetHash(), CBDB_RawFile::SetPageSize(), CBDB_RawFile::Sync(), CBDB_RawFile::Truncate(), CBDB_File::Verify(), CBDB_RawFile::x_Close(), CBDB_RawFile::x_Create(), CBDB_RawFile::x_CreateDB(), CBDB_RawFile::x_DB_Fetch(), CBDB_RawFile::x_DB_Put(), CBDB_RawFile::x_Open(), and CBDB_LobFile::x_Put().
|
private |
TRUE if m_DB doesn't belong here.
Definition at line 389 of file bdb_file.hpp.
Referenced by CBDB_RawFile::Attach(), CBDB_RawFile::IsAttached(), CBDB_RawFile::Remove(), CBDB_RawFile::Reopen(), CBDB_RawFile::x_Close(), CBDB_RawFile::x_Create(), and CBDB_RawFile::x_CreateDB().
|
protected |
Definition at line 373 of file bdb_file.hpp.
Referenced by CBDB_BLobFile::Append(), CBDB_RawFile::CBDB_RawFile(), CBDB_RawFile::GetBtreeMinKeysPerPage(), CBDB_RawFile::GetRecLen(), CBDB_File::Open(), CBDB_File::ReadCursor(), CBDB_File::Reopen(), CBDB_RawFile::SetBtreeMinKeysPerPage(), CBDB_File::SetCmp(), CBDB_IdBlobFile::SetHash(), CBDB_RawFile::SetHash(), CBDB_RawFile::SetHashFillFactor(), CBDB_RawFile::SetHashNelem(), CBDB_RawFile::x_Create(), CBDB_RawFile::x_CreateDB(), and CBDB_RawFile::x_Open().
|
private |
Berkeley DB DBC thing.
Definition at line 264 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::CBDB_FileCursor(), CBDB_FileCursor::Close(), CBDB_FileCursor::Delete(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::IsOpen(), CBDB_FileCursor::KeyDupCount(), CBDB_FileCursor::ReOpen(), CBDB_FileCursor::Update(), and CBDB_FileCursor::UpdateBlob().
|
protected |
Reference on the "mother" file.
Definition at line 249 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::CBDB_FileCursor(), CBDB_FileCursor::Delete(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::GetDBFile(), CBDB_FileCursor::ReOpen(), CBDB_FileCursor::TestTo(), CBDB_FileCursor::Update(), CBDB_FileCursor::UpdateBlob(), and CBDB_FileCursor::x_FetchFirst_Prolog().
|
protected |
Definition at line 376 of file bdb_file.hpp.
Referenced by CBDB_BLobFile::Append(), CBDB_RawFile::CBDB_RawFile(), CBDB_LobFile::Fetch(), CBDB_BLobFile::Fetch(), CBDB_LobFile::GetData(), CBDB_BLobFile::Insert(), CBDB_BLobFile::LobSize(), CBDB_LobFile::LobSize(), CBDB_File::ReadCursor(), CBDB_BLobFile::UpdateInsert(), CBDB_File::WriteCursor(), CBDB_File::x_EndRead(), CBDB_File::x_Fetch(), CBDB_LobFile::x_Put(), CBDB_File::x_StartRead(), CBDB_File::x_Write(), and CBDB_RawFile::~CBDB_RawFile().
|
protected |
Definition at line 375 of file bdb_file.hpp.
Referenced by CBDB_File::Append(), CBDB_LobFile::CBDB_LobFile(), CBDB_RawFile::CBDB_RawFile(), CBDB_File::CloneDBT_Key(), CBDB_File::Delete(), CBDB_LobFile::Fetch(), CBDB_LobFile::GetData(), CBDB_File::ReadCursor(), CBDB_File::x_EndRead(), CBDB_File::x_Fetch(), CBDB_LobFile::x_Put(), CBDB_File::x_StartRead(), CBDB_File::x_Write(), and CBDB_RawFile::~CBDB_RawFile().
|
private |
Definition at line 674 of file bdb_file.hpp.
Referenced by CBDB_File::BindData(), CBDB_File::CheckNullDataConstraint(), CBDB_File::DisableNull(), and CBDB_File::x_ConstructDataBuf().
|
private |
Definition at line 397 of file bdb_file.hpp.
Referenced by CBDB_RawFile::DuplicatesAllowed(), and CBDB_RawFile::GetDupKeysMode().
|
protected |
Definition at line 377 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetEnv(), CBDB_RawFile::Remove(), CBDB_RawFile::SafeTruncate(), CBDB_RawFile::SetEnv(), CBDB_RawFile::x_Close(), CBDB_RawFile::x_Create(), CBDB_RawFile::x_CreateDB(), and CBDB_RawFile::x_Open().
|
private |
Fetch direction (forward/backward)
Definition at line 270 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::GetFetchDirection(), CBDB_FileCursor::GetReverseFetchDirection(), CBDB_FileCursor::ReverseFetchDirection(), CBDB_FileCursor::SetCondition(), CBDB_FileCursor::SetFetchDirection(), and CBDB_FileCursor::x_FetchFirst_Prolog().
|
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().
|
private |
filename
Definition at line 393 of file bdb_file.hpp.
Referenced by CBDB_RawFile::FileName(), CBDB_RawFile::GetFileName(), CBDB_RawFile::IsOpen(), CBDB_RawFile::Open(), CBDB_RawFile::Reopen(), and CBDB_RawFile::x_Close().
|
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().
|
protected |
Definition at line 381 of file bdb_file.hpp.
Referenced by CBDB_RawFile::SetHashFillFactor(), and CBDB_RawFile::x_CreateDB().
|
protected |
Definition at line 382 of file bdb_file.hpp.
Referenced by CBDB_RawFile::SetHashNelem(), and CBDB_RawFile::x_CreateDB().
|
private |
Definition at line 667 of file bdb_file.hpp.
Referenced by CBDB_File::BindKey(), CBDB_File::Delete(), CBDB_File::Discard(), CBDB_File::DuplicateStructure(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_File::GetField(), CBDB_File::GetFieldIdx(), CBDB_File::GetKeyBuffer(), CBDB_File::Open(), CBDB_File::ReadCursor(), CBDB_File::Reopen(), CBDB_File::SetCmp(), CBDB_File::SetFieldCompareLimit(), CBDB_File::SetFieldOwnership(), CBDB_File::SetLegacyStringsCheck(), CBDB_FileCursor::TestTo(), CBDB_File::Verify(), CBDB_File::x_CheckConstructBuffers(), CBDB_File::x_ConstructKeyBuf(), CBDB_File::x_EndRead(), CBDB_FileCursor::x_FetchFirst_Prolog(), CBDB_File::x_SetByteSwapped(), CBDB_File::x_StartRead(), and CBDB_File::x_Write().
|
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().
|
protected |
Definition at line 433 of file bdb_file.hpp.
Referenced by CBDB_MultiRowBuffer::GetLastDataLen(), and CBDB_File::ReadCursor().
|
protected |
Last key pointer returned by DB_MULTIPLE_KEY_NEXT.
Definition at line 430 of file bdb_file.hpp.
Referenced by CBDB_File::ReadCursor().
|
protected |
Definition at line 432 of file bdb_file.hpp.
Referenced by CBDB_File::ReadCursor().
|
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().
|
private |
Definition at line 672 of file bdb_file.hpp.
Referenced by CBDB_File::Attach(), CBDB_File::SetLegacyStringsCheck(), CBDB_File::x_ConstructDataBuf(), and CBDB_File::x_ConstructKeyBuf().
|
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().
|
private |
Buffer class for multiple fetch.
Definition at line 276 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::Delete(), CBDB_FileCursor::Fetch(), CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::GetLastMultiFetchData(), CBDB_FileCursor::GetLastMultiFetchDataLen(), CBDB_FileCursor::InitMultiFetch(), CBDB_FileCursor::Update(), CBDB_FileCursor::UpdateBlob(), and CBDB_FileCursor::~CBDB_FileCursor().
|
private |
Definition at line 398 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetOpenMode(), and CBDB_RawFile::x_Open().
|
protected |
Definition at line 153 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetOutFile().
|
private |
Definition at line 673 of file bdb_file.hpp.
Referenced by CBDB_File::IsOwnFields(), CBDB_File::SetFieldOwnership(), CBDB_File::x_ConstructDataBuf(), and CBDB_File::x_ConstructKeyBuf().
|
private |
Definition at line 395 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetPageSize(), CBDB_RawFile::SetPageSize(), and CBDB_RawFile::x_CreateDB().
|
private |
TRUE if prefix compression ON.
Definition at line 675 of file bdb_file.hpp.
Referenced by CBDB_File::EnablePrefixCompression(), and CBDB_File::SetCmp().
|
protected |
Definition at line 145 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetColumnNames().
|
protected |
Definition at line 151 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::operator=(), CBDB_FileDumper::SetQuery(), and CBDB_FileDumper::~CBDB_FileDumper().
|
protected |
Definition at line 150 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::operator=(), and CBDB_FileDumper::SetQuery().
|
protected |
Definition at line 380 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetRecLen(), CBDB_RawFile::x_CreateDB(), and CBDB_RawFile::x_Open().
|
protected |
Definition at line 148 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::Dump(), CBDB_FileDumper::GetRecordsDumped(), and CBDB_FileDumper::operator=().
|
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().
|
protected |
Definition at line 378 of file bdb_file.hpp.
Referenced by CBDB_RawFile::GetBDBTransaction(), CBDB_RawFile::GetTransaction(), CBDB_RawFile::GetTxn(), CBDB_RawFile::x_RemoveTransaction(), CBDB_RawFile::x_SetTransaction(), and CBDB_RawFile::~CBDB_RawFile().
|
protected |
Definition at line 379 of file bdb_file.hpp.
Referenced by CBDB_RawFile::x_SetTransaction(), and CBDB_RawFile::~CBDB_RawFile().
|
protected |
Definition at line 146 of file bdb_filedump.hpp.
Referenced by CBDB_FileDumper::operator=(), CBDB_FileDumper::SetValueFormatting(), and CBDB_FileDumper::x_SetQuoteFlags().
CBDB_ConditionHandle CBDB_FileCursor::To |
Definition at line 253 of file bdb_cursor.hpp.
Referenced by CBDB_FileCursor::Fetch(), CBDB_FileCursor::ReOpen(), CBDB_FileCursor::SetCondition(), CBDB_FileCursor::TestTo(), CAsnSubCacheCreateApplication::x_EliminateIdsAlreadyInCache(), CBDB_FileCursor::x_FetchFirst_Prolog(), and CAsnSubCacheCreateApplication::x_LocateBlobsInCache().
|
friend |
Definition at line 282 of file bdb_cursor.hpp.
|
friend |
Definition at line 435 of file bdb_file.hpp.
|
friend |
Definition at line 84 of file bdb_cursor.hpp.
|
friend |
Definition at line 402 of file bdb_file.hpp.
|
friend |
Definition at line 677 of file bdb_file.hpp.