Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++ Members: Show All Members: Filtered Members: Filtered Members: Filtered

C#
Visual Basic
Visual C++
Include Protected Members
Include Inherited Members

Berkeley DB .NET API Documentation
BTreeDatabase Members
BTreeDatabase Class Methods Properties See Also Send Feedback

The BTreeDatabase type exposes the following members.

# Methods

| Name | Description
--- | --- | ---
| Close | Overloaded. Although closing a database will close any open cursors, it is recommended that applications explicitly close all their Cursor objects before closing the database. The reason why is that when the cursor is explicitly closed, the memory allocated for it is reclaimed; however, this will not happen if you close a database while cursors are still opened. The same rule, for the same reasons, holds true for Transaction objects. Simply make sure you resolve all your transaction objects before closing your database handle. Because key/data pairs are cached in memory, applications should make a point to always either close database handles or sync their data to disk (using Sync()()() before exiting, to ensure that any data cached in main memory is reflected in the underlying file system. When called on a secondary index's primary database, the primary should be closed only after all secondary indices referencing it have been closed. When multiple threads use the object concurrently, only a single thread may call the Close method. The object may not be accessed again after Close is called, regardless of its outcome.
| Compact | Overloaded.
| Cursor | Overloaded.
| Delete | Overloaded.
| Dispose | Release the resources held by this object, and close the database if it is still open. (Inherited from BaseDatabase.)
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Exists | Overloaded.
| FastStats | Overloaded. Among other things, this method makes it possible for applications to request key and record counts without incurring the performance penalty of traversing the entire database. The statistical information is described by the BTreeStats, HashStats, QueueStats, and RecnoStats classes.
| Get | Overloaded.
| GetBoth | Overloaded.
| GetBothMultiple | Overloaded.
| GetHashCode | Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.)
| GetMultiple | Overloaded.
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| Join | Create a specialized join cursor for use in performing equality or natural joins on secondary indices. (Inherited from Database.)
| KeyRange | Overloaded.
| Open | Overloaded.
| PrintFastStats | Overloaded. The statistical information is described by the BTreeStats, HashStats, HeapStats, QueueStats, and RecnoStats classes.
| PrintStats | Overloaded. The statistical information is described by the BTreeStats, HashStats, HeapStats, QueueStats, and RecnoStats classes.
| Put | Overloaded. If the database supports duplicates, add the new data value at the end of the duplicate set. If the database supports sorted duplicates, the new data value is inserted at the correct sorted location.
| PutNoDuplicate | Overloaded.
| PutNoOverwrite | Overloaded.
| Stats | Overloaded. The statistical information is described by BTreeStats.
| Sync | Flush any cached information to disk. (Inherited from BaseDatabase.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)
| Truncate | Overloaded. When called on a database configured with secondary indices, Truncate will truncate the primary database and all secondary indices. A count of the records discarded from the primary database is returned.
| TruncateUnusedPages | Overloaded.

# Properties

| Name | Description
--- | --- | ---
| AutoCommit | If true, all database modification operations based on this object will be transactionally protected. (Inherited from BaseDatabase.)
| BlobDir | The path of the directory where blobs are stored.
| BlobThreshold | The threshold value in bytes beyond which data items are stored as blobs. Any data item that is equal to or larger in size than the threshold value will automatically be stored as a blob. A value of 0 indicates that blobs are not used by the database.
| CacheSize | The size of the shared memory buffer pool (the cache). (Inherited from BaseDatabase.)
| Compare | The Btree key comparison function. The comparison function is called whenever it is necessary to compare a key specified by the application with a key currently stored in the tree.
| Compress | The compression function used to store key/data pairs in the database.
| Creation | The CreatePolicy with which this database was opened. (Inherited from BaseDatabase.)
| DatabaseName | The name of this database, if it has one. (Inherited from BaseDatabase.)
| Decompress | The decompression function used to retrieve key/data pairs from the database.
| DoChecksum | If true, do checksum verification of pages read into the cache from the backing filestore. (Inherited from BaseDatabase.)
| DupCompare | The duplicate data item comparison function.
| Duplicates | Whether the insertion of duplicate data items in the database is permitted, and whether duplicate items are sorted.
| EncryptAlgorithm | The algorithm used by the Berkeley DB library to perform encryption and decryption. (Inherited from BaseDatabase.)
| Encrypted | If true, encrypt all data stored in the database. (Inherited from BaseDatabase.)
| Endianness | The database byte order. (Inherited from BaseDatabase.)
| ErrorFeedback | The mechanism for reporting detailed error messages to the application. (Inherited from BaseDatabase.)
| ErrorPrefix | The prefix string that appears before error messages issued by Berkeley DB. (Inherited from BaseDatabase.)
| Feedback | Monitor progress within long running operations. (Inherited from BaseDatabase.)
| FileName | The filename of this database, if it has one. (Inherited from BaseDatabase.)
| FreeThreaded | If true, the object is free-threaded; that is, concurrently usable by multiple threads in the address space. (Inherited from BaseDatabase.)
| HasMultiple | If true, the object references a physical file supporting multiple databases. (Inherited from BaseDatabase.)
| InHostOrder | If true, the underlying database files were created on an architecture of the same byte order as the current one. This information may be used to determine whether application data needs to be adjusted for this architecture or not. (Inherited from BaseDatabase.)
| MinKeysPerPage | The minimum number of key/data pairs intended to be stored on any single Btree leaf page.
| NoMMap | If true, this database is not mapped into process memory. See MMapSize for further information. (Inherited from BaseDatabase.)
| NonDurableTxns | If true, Berkeley DB will not write log records for this database. (Inherited from BaseDatabase.)
| NoWaitDbExclusiveLock | If true, configure the database handle to obtain a write lock on the entire database. When the database is opened it will immediately throw LockNotGrantedException if it cannot obtain the exclusive lock immediately. If False, configure the database handle to obtain a write lock on the entire database. When the database is opened, it will block until it can obtain the exclusive lock. If null, do not configure the database handle to obtain a write lock on the entire database. (Inherited from BaseDatabase.)
| NParts | Return the number of partitions created in the database.
| Pagesize | The database's current page size. (Inherited from BaseDatabase.)
| Partition | Return the application-specified partitioning function.
| PartitionKeys | Return an array of type DatabaseEntry where each array entry contains the range of keys contained in one of the database's partitions. The array contains the information for the entire database.
| PrefixCompare | The Btree prefix function. The prefix function is used to determine the amount by which keys stored on the Btree internal pages can be safely truncated without losing their uniqueness.
| Priority | The cache priority for pages referenced by this object. (Inherited from BaseDatabase.)
| ReadOnly | If true, this database has been opened for read only. Any attempt to modify items in the database will fail, regardless of the actual permissions of any underlying files. (Inherited from BaseDatabase.)
| ReadUncommitted | If true, this database supports transactional read operations with degree 1 isolation. Read operations on the database may request the return of modified but not yet committed data. (Inherited from BaseDatabase.)
| RecordNumbers | If true, this object supports retrieval from the Btree using record numbers.
| ReverseSplit | If false, empty pages will not be coalesced into higher-level pages.
| Transactional | If true, this database has been opened in a transactional mode. (Inherited from BaseDatabase.)
| Truncated | If true, the underlying file was physically truncated upon open, discarding all previous databases it might have held. (Inherited from BaseDatabase.)
| Type | The type of the underlying access method (and file format). This value may be used to determine the type of the database after an Open(String, DatabaseConfig). (Inherited from BaseDatabase.)
| UseMVCC | If true, the database was opened with support for multiversion concurrency control. (Inherited from BaseDatabase.)

# See Also

BTreeDatabase Class
BerkeleyDB Namespace