BaseDatabase Members

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
BaseDatabase Members
BaseDatabase Class Methods Properties See Also

The BaseDatabase 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, hold 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 are reflected in the underlying file system. When called on a database that is the primary database for a secondary index, the primary database should be closed only after all secondary indices referencing it have been closed. When multiple threads are using 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.
| Cursor | Overloaded.
| Delete | Overloaded.
| Dispose | Release the resources held by this object, and close the database if it's still open.
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Exists | Overloaded.
| Get | Overloaded.
| GetBoth | Overloaded.
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| PrintFastStats | Overloaded. The statistical information is described by the BTreeStats, HashStats, QueueStats, and RecnoStats classes.
| PrintStats | Overloaded. The statistical information is described by the BTreeStats, HashStats, QueueStats, and RecnoStats classes.
| Remove | Overloaded. Applications should never remove databases with open DB handles, or in the case of removing a file, when any database in the file has an open handle. For example, some architectures do not permit the removal of files with open system handles. On these architectures, attempts to remove databases currently in use by any thread of control in the system may fail. Remove should not be called if the remove is intended to be transactionally safe; RemoveDB(String, Boolean) should be used instead.
| Rename | Overloaded. Applications should not rename databases that are currently in use. If an underlying file is being renamed and logging is currently enabled in the database environment, no database in the file may be open when Rename is called. In particular, some architectures do not permit renaming files with open handles. On these architectures, attempts to rename databases that are currently in use by any thread of control in the system may fail. Rename should not be called if the rename is intended to be transactionally safe; RenameDB(String, String, Boolean) should be used instead.
| Sync | Flush any cached information to disk.
| 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.

# Properties

| Name | Description
--- | --- | ---
| AutoCommit | If true, all database modification operations based on this object will be transactionally protected.
| CacheSize | The size of the shared memory buffer pool -- that is, the cache.
| Creation | The CreatePolicy with which this database was opened.
| DatabaseName | The name of this database, if it has one.
| DoChecksum | If true, do checksum verification of pages read into the cache from the backing filestore.
| EncryptAlgorithm | The algorithm used by the Berkeley DB library to perform encryption and decryption.
| Encrypted | If true, encrypt all data stored in the database.
| Endianness | The database byte order.
| ErrorFeedback | The mechanism for reporting detailed error messages to the application.
| ErrorPrefix | The prefix string that appears before error messages issued by Berkeley DB.
| Feedback | Monitor progress within long running operations.
| FileName | The filename of this database, if it has one.
| FreeThreaded | If true, the object is free-threaded; that is, concurrently usable by multiple threads in the address space.
| HasMultiple | If true, the object references a physical file supporting multiple databases.
| 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.
| NoMMap | If true, this database is not mapped into process memory. See MMapSize for further information.
| NonDurableTxns | If true, Berkeley DB will not write log records for this database.
| Pagesize | The database's current page size.
| Priority | The cache priority for pages referenced by this object.
| ReadOnly | If true, this database has been opened for reading only. Any attempt to modify items in the database will fail, regardless of the actual permissions of any underlying files.
| 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.
| Transactional | If true, this database has been opened in a transactional mode.
| Truncated | If true, the underlying file was physically truncated upon open, discarding all previous databases it might have held.
| 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).
| UseMVCC | If true, the database was opened with support for multiversion concurrency control.

# See Also

BaseDatabase Class
BerkeleyDB Namespace