PhoenixmlDb.Core
IContainer
A container holding a collection of documents with shared configuration.
#IContainer
Namespace: PhoenixmlDb.Core
A container holding a collection of documents with shared configuration.
#Properties
| Name | Description |
|---|---|
Id
|
Container identifier. |
Name
|
Container name. |
Options
|
Container configuration. |
#Methods
#DeleteDocumentAsync(String,Threading.CancellationToken)
Deletes a document.
Returns: True if the document existed and was deleted.
#DocumentExistsAsync(String,Threading.CancellationToken)
Checks if a document exists.
#GetAllMetadataAsync(String,Threading.CancellationToken)
Gets all metadata for a document.
#GetDocumentAsync(String,Threading.CancellationToken)
Gets a document by name.
Parameters:
-
name— Document name. -
cancellationToken— Cancellation token.
Returns: The document, or null if not found.
#GetMetadataAsync(String,String,Threading.CancellationToken)
Gets document metadata.
#ListDocumentsAsync(String,Threading.CancellationToken)
Lists documents matching a name prefix.
#ListDocumentsAsync(Threading.CancellationToken)
Lists all documents in the container.
#PutDocumentAsync(String,IO.Stream,PhoenixmlDb.Core.DocumentOptions,Threading.CancellationToken)
Stores a document from a stream.
#PutDocumentAsync(String,String,PhoenixmlDb.Core.DocumentOptions,Threading.CancellationToken)
Stores a document in the container.
Parameters:
-
name— Document name (URI-like identifier). -
content— XML or JSON content. -
options— Document options. -
cancellationToken— Cancellation token.
#QueryAsync(String,Collections.Generic.IReadOnlyDictionary<String,Object>,Threading.CancellationToken)
Executes an XQuery query against this container.
Parameters:
-
query— XQuery expression. -
variables— External variable bindings. -
cancellationToken— Cancellation token.
#QueryMetadataAsync(String,Object,Threading.CancellationToken)
Queries documents by metadata.
#SetMetadataAsync(String,String,Object,Threading.CancellationToken)
Sets document metadata.