C# Class Raven.Database.DocumentDatabase

Inheritance: IUuidGenerator, IDisposable
ファイルを表示 Open project: nhsevidence/ravendb Class Usage Examples

Private Properties

Property Type Description
AddIndexingTask void
AssertAttachmentDeleteOperationNotVetoed void
AssertAttachmentPutOperationNotVetoed void
AssertDeleteOperationNotVetoed void
AssertPutOperationNotVetoed void
ExecuteAlterConfiguration void
ExecuteAttachmentReadTriggers void
ExecuteStartupTasks void
GetNextIdentityValueWithoutOverritingOnExistingDocuments long
InitializeTriggers void
ProcessAttachmentReadVetoes Attachment
RemoveReservedProperties void
TryCompletePromotedTransaction void
TryUndoPromotedTransaction void

Public Methods

Method Description
ApplyPatch ( string docId, System.Guid etag, PatchRequest patchDoc, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : PatchResult
Batch ( IEnumerable commands ) : BatchResult[]
Commit ( System.Guid txId ) : void
CreateSequentialUuid ( ) : System.Guid
Delete ( string key, System.Guid etag, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
DeleteIndex ( string name ) : void
DeleteStatic ( string name, System.Guid etag ) : void
DisableAllTriggersForCurrentThread ( ) : IDisposable

This API is provided solely for the use of bundles that might need to run without any other bundle interfering. Specifically, the replication bundle need to be able to run without interference from any other bundle.

Dispose ( ) : void
DocumentDatabase ( InMemoryRavenConfiguration configuration ) : System
Get ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : JsonDocument
GetAttachments ( int start, int pageSize, System.Guid etag ) : Raven.Database.Data.AttachmentInformation[]
GetDocumentMetadata ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : JsonDocumentMetadata
GetDocuments ( int start, int pageSize, System.Guid etag ) : RavenJArray
GetDocumentsWithIdStartingWith ( string idPrefix, int start, int pageSize ) : RavenJArray
GetIndexDefinition ( string index ) : Raven.Database.Indexing.IndexDefinition
GetIndexEtag ( string indexName ) : System.Guid
GetIndexFields ( string index ) : string[]
GetIndexNames ( int start, int pageSize ) : RavenJArray
GetIndexes ( int start, int pageSize ) : RavenJArray
GetStatic ( string name ) : Attachment
GetTotalSizeOnDisk ( ) : long

Get the total size taken by the database on the disk. This explicitly does NOT include in memory indexes or in memory database. It does include any reserved space on the file system, which may significantly increase the database size.

This is a potentially a very expensive call, avoid making it if possible.

HasTransaction ( System.Guid txId ) : bool
PromoteTransaction ( System.Guid fromTxId ) : byte[]
Put ( string key, System.Guid etag, RavenJObject document, RavenJObject metadata, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : PutResult
PutIndex ( string name, Raven.Database.Indexing.IndexDefinition definition ) : string
PutStatic ( string name, System.Guid etag, byte data, RavenJObject metadata ) : void
Query ( string index, IndexQuery query ) : QueryResult
QueryDocumentIds ( string index, IndexQuery query, bool &stale ) : IEnumerable
ResetIndex ( string index ) : void
Restore ( RavenConfiguration configuration, string backupLocation, string databaseLocation ) : void
Rollback ( System.Guid txId ) : void
SpinBackgroundWorkers ( ) : void
StartBackup ( string backupDestinationDirectory ) : void
StopBackgroundWokers ( ) : void

Private Methods

Method Description
AddIndexingTask ( IStorageActionsAccessor actions, RavenJToken metadata, Func taskGenerator ) : void
AssertAttachmentDeleteOperationNotVetoed ( string key ) : void
AssertAttachmentPutOperationNotVetoed ( string key, RavenJObject metadata, byte data ) : void
AssertDeleteOperationNotVetoed ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
AssertPutOperationNotVetoed ( string key, RavenJObject metadata, RavenJObject document, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
ExecuteAlterConfiguration ( ) : void
ExecuteAttachmentReadTriggers ( string name, Attachment attachment ) : void
ExecuteStartupTasks ( ) : void
GetNextIdentityValueWithoutOverritingOnExistingDocuments ( string key, IStorageActionsAccessor actions, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : long
InitializeTriggers ( ) : void
ProcessAttachmentReadVetoes ( string name, Attachment attachment ) : Attachment
RemoveReservedProperties ( RavenJObject document ) : void
TryCompletePromotedTransaction ( System.Guid txId ) : void
TryUndoPromotedTransaction ( System.Guid txId ) : void

Method Details

ApplyPatch() public method

public ApplyPatch ( string docId, System.Guid etag, PatchRequest patchDoc, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : PatchResult
docId string
etag System.Guid
patchDoc PatchRequest
transactionInformation Raven.Abstractions.Data.TransactionInformation
return PatchResult

Batch() public method

public Batch ( IEnumerable commands ) : BatchResult[]
commands IEnumerable
return BatchResult[]

Commit() public method

public Commit ( System.Guid txId ) : void
txId System.Guid
return void

CreateSequentialUuid() public method

public CreateSequentialUuid ( ) : System.Guid
return System.Guid

Delete() public method

public Delete ( string key, System.Guid etag, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
key string
etag System.Guid
transactionInformation Raven.Abstractions.Data.TransactionInformation
return void

DeleteIndex() public method

public DeleteIndex ( string name ) : void
name string
return void

DeleteStatic() public method

public DeleteStatic ( string name, System.Guid etag ) : void
name string
etag System.Guid
return void

DisableAllTriggersForCurrentThread() public method

This API is provided solely for the use of bundles that might need to run without any other bundle interfering. Specifically, the replication bundle need to be able to run without interference from any other bundle.
public DisableAllTriggersForCurrentThread ( ) : IDisposable
return IDisposable

Dispose() public method

public Dispose ( ) : void
return void

DocumentDatabase() public method

public DocumentDatabase ( InMemoryRavenConfiguration configuration ) : System
configuration InMemoryRavenConfiguration
return System

Get() public method

public Get ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : JsonDocument
key string
transactionInformation Raven.Abstractions.Data.TransactionInformation
return JsonDocument

GetAttachments() public method

public GetAttachments ( int start, int pageSize, System.Guid etag ) : Raven.Database.Data.AttachmentInformation[]
start int
pageSize int
etag System.Guid
return Raven.Database.Data.AttachmentInformation[]

GetDocumentMetadata() public method

public GetDocumentMetadata ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : JsonDocumentMetadata
key string
transactionInformation Raven.Abstractions.Data.TransactionInformation
return JsonDocumentMetadata

GetDocuments() public method

public GetDocuments ( int start, int pageSize, System.Guid etag ) : RavenJArray
start int
pageSize int
etag System.Guid
return RavenJArray

GetDocumentsWithIdStartingWith() public method

public GetDocumentsWithIdStartingWith ( string idPrefix, int start, int pageSize ) : RavenJArray
idPrefix string
start int
pageSize int
return RavenJArray

GetIndexDefinition() public method

public GetIndexDefinition ( string index ) : Raven.Database.Indexing.IndexDefinition
index string
return Raven.Database.Indexing.IndexDefinition

GetIndexEtag() public method

public GetIndexEtag ( string indexName ) : System.Guid
indexName string
return System.Guid

GetIndexFields() public method

public GetIndexFields ( string index ) : string[]
index string
return string[]

GetIndexNames() public method

public GetIndexNames ( int start, int pageSize ) : RavenJArray
start int
pageSize int
return RavenJArray

GetIndexes() public method

public GetIndexes ( int start, int pageSize ) : RavenJArray
start int
pageSize int
return RavenJArray

GetStatic() public method

public GetStatic ( string name ) : Attachment
name string
return Attachment

GetTotalSizeOnDisk() public method

Get the total size taken by the database on the disk. This explicitly does NOT include in memory indexes or in memory database. It does include any reserved space on the file system, which may significantly increase the database size.
This is a potentially a very expensive call, avoid making it if possible.
public GetTotalSizeOnDisk ( ) : long
return long

HasTransaction() public method

public HasTransaction ( System.Guid txId ) : bool
txId System.Guid
return bool

PromoteTransaction() public method

public PromoteTransaction ( System.Guid fromTxId ) : byte[]
fromTxId System.Guid
return byte[]

Put() public method

public Put ( string key, System.Guid etag, RavenJObject document, RavenJObject metadata, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : PutResult
key string
etag System.Guid
document RavenJObject
metadata RavenJObject
transactionInformation Raven.Abstractions.Data.TransactionInformation
return PutResult

PutIndex() public method

public PutIndex ( string name, Raven.Database.Indexing.IndexDefinition definition ) : string
name string
definition Raven.Database.Indexing.IndexDefinition
return string

PutStatic() public method

public PutStatic ( string name, System.Guid etag, byte data, RavenJObject metadata ) : void
name string
etag System.Guid
data byte
metadata RavenJObject
return void

Query() public method

public Query ( string index, IndexQuery query ) : QueryResult
index string
query IndexQuery
return QueryResult

QueryDocumentIds() public method

public QueryDocumentIds ( string index, IndexQuery query, bool &stale ) : IEnumerable
index string
query IndexQuery
stale bool
return IEnumerable

ResetIndex() public method

public ResetIndex ( string index ) : void
index string
return void

Restore() public static method

public static Restore ( RavenConfiguration configuration, string backupLocation, string databaseLocation ) : void
configuration RavenConfiguration
backupLocation string
databaseLocation string
return void

Rollback() public method

public Rollback ( System.Guid txId ) : void
txId System.Guid
return void

SpinBackgroundWorkers() public method

public SpinBackgroundWorkers ( ) : void
return void

StartBackup() public method

public StartBackup ( string backupDestinationDirectory ) : void
backupDestinationDirectory string
return void

StopBackgroundWokers() public method

public StopBackgroundWokers ( ) : void
return void