Interface IDocumentBulkBuilder<TDocument>
Предоставляет методы создания набора команд изменения документов.
Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
Syntax
public interface IDocumentBulkBuilder<TDocument>
Type Parameters
Name | Description |
---|---|
TDocument |
Methods
| Improve this Doc View SourceDeleteMany(Expression<Func<TDocument, Boolean>>)
Удаляет все документы, удовлетворяющие указанному фильтру.
Declaration
IDocumentBulkBuilder<TDocument> DeleteMany(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TDocument, System.Boolean>> | filter | Фильтр для поиска документов. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |
DeleteOne(Expression<Func<TDocument, Boolean>>)
Удаляет первый найденный документ, удовлетворяющий указанному фильтру.
Declaration
IDocumentBulkBuilder<TDocument> DeleteOne(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TDocument, System.Boolean>> | filter | Фильтр для поиска документов. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |
InsertOne(TDocument)
Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.
Declaration
IDocumentBulkBuilder<TDocument> InsertOne(TDocument document)
Parameters
Type | Name | Description |
---|---|---|
TDocument | document | Документ для вставки. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |
ReplaceOne(TDocument, Expression<Func<TDocument, Boolean>>, Boolean)
Заменяет первый найденный документ, удовлетворяющий указанному фильтру.
Declaration
IDocumentBulkBuilder<TDocument> ReplaceOne(TDocument replacement, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)
Parameters
Type | Name | Description |
---|---|---|
TDocument | replacement | Документ замены. |
Expression<Func<TDocument, System.Boolean>> | filter | Фильтр для поиска документов. |
System.Boolean | insertIfNotExists | Следует ли создать документ, если ничего не найдено. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |
UpdateMany(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)
Обновляет все документы, удовлетворяющие указанному фильтру.
Declaration
IDocumentBulkBuilder<TDocument> UpdateMany(Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)
Parameters
Type | Name | Description |
---|---|---|
Action<IDocumentUpdateBuilder<TDocument>> | update | Оператор обновления документов. |
Expression<Func<TDocument, System.Boolean>> | filter | Фильтр для поиска документов. |
System.Boolean | insertIfNotExists | Следует ли создать документ, если ничего не найдено. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |
UpdateOne(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)
Обновляет первый найденный документ, удовлетворяющий указанному фильтру.
Declaration
IDocumentBulkBuilder<TDocument> UpdateOne(Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)
Parameters
Type | Name | Description |
---|---|---|
Action<IDocumentUpdateBuilder<TDocument>> | update | Оператор обновления документов. |
Expression<Func<TDocument, System.Boolean>> | filter | Фильтр для поиска документов. |
System.Boolean | insertIfNotExists | Следует ли создать документ, если ничего не найдено. |
Returns
Type | Description |
---|---|
IDocumentBulkBuilder<TDocument> |