kDefaultDatabase[];
141 voidOpen(
const string& filename,
143 boolsupport_dirty_read =
false,
144 unsignedrec_len = 0);
147 voidOpen(
const string& filename,
150 boolsupport_dirty_read =
false,
151 unsignedrec_len = 0);
158 voidReopen(EOpenMode open_mode,
159 boolsupport_dirty_read =
false,
160 unsignedrec_len = 0);
168 unsigned intSafeTruncate();
170 voidRename(
const string& fname,
171 const string& old_name,
172 const string& new_name);
176 voidCompact(ECompact compact_type = eCompactNoFree,
177 inttarget_fill_pct = 0);
182 typedef bool(*FContinueCompact)(void);
183 voidCompactEx(FContinueCompact compact_callback,
184 ECompactcompact_type = eCompactNoFree,
185 inttarget_fill_pct = 0);
188 voidSetPageSize(
unsigned intpage_size);
191 unsigned intGetPageSize();
194 voidSetCacheSize(
unsigned intcache_size);
212 voidSetCachePriority(ECachePriority priority);
214 const string& FileName()
const;
215 const string& Database()
const;
223 virtual voidSetHash(
DB*);
226 boolIsOpen()
const;
229 boolIsAttached()
const;
252 unsignedCountRecs(
boolbFast =
false);
268 unsignedGetRecLen()
const;
271 voidSetHashFillFactor(
unsignedh_ffactor);
274 voidSetHashNelem(
unsignedh_nelem);
281 voidSetBtreeMinKeysPerPage(
unsigned intkeys_per_page);
282 unsigned intGetBtreeMinKeysPerPage();
301 boolsupport_dirty_read,
303 voidx_Create(
const char* filename,
const char*
database);
311 voidx_CreateDB(
unsignedrec_len);
328 unsigned int flags= 0)
const;
335 intx_DB_Fetch(
DBT*
key,
344 intx_DBC_Fetch(
DBC*
dbc,
359 intx_DB_CPut(
DBC*
dbc,
365 intx_FetchBufferDecompress(
DBT*
data,
void* usr_data);
369 virtual voidx_SetByteSwapped(
boolbswp);
451 voidOpen(
const string& filename,
453 boolsupport_dirty_read =
false,
454 unsignedrec_len = 0);
458 voidOpen(
const string& filename,
461 boolsupport_dirty_read =
false,
462 unsignedrec_len = 0);
464 voidReopen(
EOpenModeopen_mode,
boolsupport_dirty_read =
false);
484 EBDB_ErrCodeInsert(EAfterWrite write_flag = eDiscardData);
490 unsignedAppend(EAfterWrite write_flag = eDiscardData);
493 EBDB_ErrCodeDelete(EIgnoreError on_error=eThrowOnError);
497 EBDB_ErrCodeUpdateInsert(EAfterWrite write_flag = eDiscardData);
500 voidBindKey (
const char* field_name,
502 size_tbuf_size = 0);
504 voidBindData(
const char* field_name,
510 voidDuplicateStructure(
const CBDB_File& dbf);
526 voidSetFieldCompareLimit(
unsigned intn_fields);
530 DBT* CloneDBT_Key();
533 static voidDestroyDBT_Clone(
DBT* dbt);
536 voidSetLegacyStringsCheck(
bool value);
560 voidSetFieldOwnership(
boolown_fields);
570 voidVerify(
const char* filename,
const char*
database, FILE* backup);
582 virtual voidSetCmp(
DB*);
591EReallocMode allow_realloc);
604 unsigned intbdb_flag,
611EAfterWrite write_flag);
616 DBC*
dbc,
unsigned intbdb_flag,
617EAfterWrite write_flag);
624 voidCheckNullDataConstraint()
const;
638 voidDisableDataPacking();
643 virtual voidx_SetByteSwapped(
boolbswp);
658 voidx_CheckConstructBuffers();
660 voidx_ConstructKeyBuf();
661 voidx_ConstructDataBuf();
693 virtual voidSetCmp(
DB* db);
714 return key? (-fidx) : (fidx);
725 const string& filename,
EOpenModeopen_mode,
726 boolsupport_dirty_read,
729 Open(filename,
kEmptyStr, open_mode, support_dirty_read, rec_len);
775 const string& filename,
EOpenModeopen_mode,
776 boolsupport_dirty_read,
unsignedrec_len)
778 Open(filename,
"", open_mode, support_dirty_read, rec_len);
792 m_KeyBuf->SetFieldCompareLimit(n_fields);
BDB Data Field Buffer manager class.
BDB environment object a collection including support for some or all of caching, locking,...
Base class for constructing BDB fields.
Berkeley DB file cursor class.
Berkeley DB file class optimized to work with tables having int as the primary key.
Multirow buffer for reading many rows in one call.
Raw file class wraps up basic Berkeley DB operations.
Reallocable memory buffer (no memory copy overhead) Mimics vector<>, without the overhead of explicit...
Interface for transactional objects.
std::ofstream out("events_result.xml")
main entry point for tests
ENullable
Whether a value is nullable.
@ eNullable
Value can be null.
@ eTakeOwnership
An object can take ownership of another.
string m_Database
db name in file (optional)
EDuplicateKeys GetDupKeysMode() const
Return the key duplicate mode value.
CBDB_MultiRowBuffer(const CBDB_MultiRowBuffer &)
size_t GetLastDataLen() const
Get BLOB length from last cursor read.
CBDB_Transaction * m_Trans
CBDB_MultiRowBuffer & operator=(const CBDB_MultiRowBuffer &)
size_t m_BufSize
buffer size
void * m_LastData
Last data pointer returned by DB_MULTIPLE_KEY_NEXT.
AutoPtr< ICompression > m_Compressor
Record compressor.
bool IsOpen() const
Return TRUE if the file is open.
virtual void SetCmp(DB *)=0
Set comparison function.
ECompact
BerkeleyDB compaction methods and flags.
DBT * m_Data_DBT
Temp DBT for multiple fetch.
void DisableHashOverride()
Disable hash method override (Berkeley DB will use it's own default hashing method)
EOpenMode
BDB file open mode.
void * m_Buf
Multiple row buffer.
bool IsByteSwapped() const
Return TRUE if the if the underlying database files were created on an architecture of the different ...
void Open(const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
Open file with specified access mode.
void DisableCmpOverride()
Disable BTREE comparison override.
const string & Database() const
CBDB_Transaction * GetBDBTransaction()
Get current transaction.
void DisableDataBufProcessing()
Function disables processing of m_DBT_data.
CBDB_File::TUnifiedFieldIndex BDB_GetUFieldIdx(int fidx, bool key)
Make field index in CBDB_File format.
bool IsOwnFields() const
Return fields ownership flag.
CBDB_RawFile(const CBDB_RawFile &)
forbidden
bool m_CmpOverride
TRUE - NCBI BDB sets its own cmp.
unique_ptr< CBDB_BufferManager > m_DataBuf
bool m_RevSplitOff
TRUE if reverse splitting is off.
EDBType
Berkeley DB database type.
EDuplicateKeys m_DuplicateKeys
string m_FileName
filename
void SetFieldCompareLimit(unsigned int n_fields)
Sets maximum number of key fields participating in comparison Should be less than total number of key...
CBDB_Env * GetEnv()
Get pointer on file environment Return NULL if no environment has been set.
const string & GetFileName() const
Return file name.
void * m_LastKey
Last key pointer returned by DB_MULTIPLE_KEY_NEXT.
int TUnifiedFieldIndex
CBDB_File keeps data in two buffers (key buffer and data buffer).
CBDB_BufferManager * GetKeyBuffer()
Get Buffer manager for key section of the file.
EDuplicateKeys
Control key duplicates in Btree.
void DisableNull()
Disable NULL/not NULL in data fields (Performance tweak, call before BindData)
EOpenMode GetOpenMode() const
Return the file open mode.
CSimpleBuffer TBuffer
typedef for raw buffer operations
static int x_CompareShim(DB *db, const DBT *dbt1, const DBT *dbt2, size_t *locp)
bool m_ByteSwapped
TRUE if file created on a diff.arch.
EReallocMode
BLOB read mode, controld data buffer reallocation when there is not enough space in buffer.
const CBDB_BufferManager * GetKeyBuffer() const
Get Buffer manager for key section of the file.
void EnablePrefixCompression()
Turn ON prefix compression.
ECachePriority
Set the priority for this database's pages in the buffer cache This is generally a temporary adviseme...
void Open(const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
Open file with specified access mode.
const void * GetLastDataPtr() const
Get data buffer pointer from last cursor read.
static const int kOpenFileMask
const string & FileName() const
EBDB_ErrCode
BDB Return codes.
const CBDB_BufferManager * GetDataBuffer() const
Get Buffer manager for data section of the file.
void * m_BufPtr
current buffer position
CBDB_BufferManager * GetDataBuffer()
Get Buffer manager for data section of the file.
void CheckNullDataConstraint() const
Check if all NOT NULL fields are assigned.
bool m_PrefixCompress
TRUE if prefix compression ON.
unique_ptr< CBDB_BufferManager > m_KeyBuf
bool DuplicatesAllowed() const
Return TRUE if file can contain duplicate keys.
unsigned GetRecLen() const
Get record length Works for fixed length record DBs only (Queue)
CBDB_File(const CBDB_File &)
forbidden
bool m_DB_Attached
TRUE if m_DB doesn't belong here.
EBDB_ErrCode Fetch()
Fetches the record corresponding to the current key value.
@ eKeepData
Keep the inserted data for a while.
@ eCreate
implies 'eReadWrite' too
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
CTime Truncate(const CTime &t)
virtual void SetTransaction(ITransaction *trans)=0
Establish transaction association.
virtual ITransaction * GetTransaction()=0
Get current transaction.
virtual void RemoveTransaction(ITransaction *trans)=0
Remove transaction association (must be established by SetTransaction.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
static void x_Close(SHttpConnector *uuu)
static SERV_ITER x_Open(const char *service, int ismask, TSERV_Type types, unsigned int preferred_host, unsigned short preferred_port, double preference, const SConnNetInfo *net_info, SSERV_InfoCPtr skip[], size_t n_skip, int external, const char *arg, const char *val, SSERV_Info **info, HOST_INFO *host_info)
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4