Click or drag to resize

Database Class

Represents a Database which corresponds to file system file.
Inheritance Hierarchy

Namespace:  VelocityDb
Assembly:  VelocityDb (in VelocityDb.dll) Version: 10.2.0.0 (10.2)
Syntax
[SerializableAttribute]
public class Database : OptimizedPersistable, IEnumerable<Page>, 
	IEnumerable, IEqualityComparer<Database>, IDisposable

The Database type exposes the following members.

Properties
  NameDescription
Public propertyAllowOtherTypesOnSamePage
We want to be sure that the object representing a Database can share its page with other objects so override AllowOtherTypesOnSamePage and return true.
(Overrides OptimizedPersistableAllowOtherTypesOnSamePage.)
Public propertyCachedVerified
Setting this property to false will trigger a comparison of the cached version of the Database with the on disk version. Each new transaction also sets this property to false for all cached databases. You may alternatively use the session API ForceDatabaseCacheValidation() to trigger validation of all cached databases. Setting it to false when the Database has been updated in the current transaction is ignored.
Public propertyFileInfo
FileInfo for this Database, not set for ServerClientSession
Public propertyFileStream
Stream used for reading and writing this Database
Public propertyHighestPageNumber
Indicates the highest tryPageNumber number currently in use for this database.
Public propertyIsDeleted
Gets info about this Database about to be deleted or not.
Public propertyIsLocal
Gets info about this Database being on the local host or not.
Public propertyIsNew
Indicates if database was created in the current transactionNumber
Public propertyIsUpdated
Gets the updated state of the object
(Overrides OptimizedPersistableIsUpdated.)
Public propertyLocation
The DatabaseLocation of this Database
Public propertyName
Optional name associated with a Database
Public propertyNumberOfPages
Indicates how many pages this database contains.
Public propertyObjectCachingDefaultPolicy
Default strategy for this Database, defaults to ObjectCachingDefaultPolicy. (strategy is not persisted)
Public propertyPageCacheEnabled
Turns on or off Page caching for this Database
Public propertyPageOffset
Top
Methods
  NameDescription
Public methodAllObjectsT
Gets an object used for enumerating all objects in this Database
Public methodBytes
Avoid using this one for now, internal use.
Public methodCachedPage
Try to retrieve a cached Page
Public methodCloneAs
Any Database that only uses OidShort references can be cloned without changing any of the internals of the Database. This function simply copies the Database file. It is the user's responsibility to know that only OidShort references are used within the Database or else such references will still keep the original Database number.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals(Database)
Compares by version and page 0 offset
Public methodEquals(Database, Database)
Determines whether the specified objects are equal.
Public methodGetEnumerator
Gets an enumerable sequence of all the pages in this database.
Public methodGetHashCode
Returns a hash code for the specified object.
Public methodOfType
Gets an object used for enumerating all objects in this Database."/>
Public methodPages
Gets an enumerable sequence of all the pages in this database.
Public methodReadMe (Overrides OptimizedPersistableReadMe(TypeVersion, Byte, Int32, SessionBase, Page, Boolean, Schema, Boolean, ListIOptimizedPersistable, Int32, Int32, Boolean).)
Public methodToString
Displays class name plus object id
(Overrides OptimizedPersistableToString.)
Public methodWritePageBytes
Top
Fields
Extension Methods
  NameDescription
Public Extension MethodToStringDetails(SessionBase, Boolean)Overloaded.
Object details as a string
(Defined by Utilities.)
Public Extension MethodToStringDetails(Schema, TypeVersion, Boolean)Overloaded.
Currently only used by Database Manager
(Defined by Utilities.)
Top
See Also