Show / Hide Table of Contents

Interface IDocumentStorage

Предоставляет методы для работы с данными хранилища документов.

Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
Syntax
public interface IDocumentStorage

Properties

| Improve this Doc View Source

DocumentType

Имя типа документа.

Declaration
string DocumentType { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Aggregate(Func<IDocumentFilterBuilder, Object>)

Возвращает интерфейс для построения запроса агрегации.

Declaration
IDocumentAggregateCursor Aggregate(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
IDocumentAggregateCursor
| Improve this Doc View Source

Bulk(Action<IDocumentBulkBuilder>, Boolean)

Выполняет набор команд изменения документов в рамках одного запроса.

Declaration
DocumentBulkResult Bulk(Action<IDocumentBulkBuilder> requests, bool isOrdered = false)
Parameters
Type Name Description
Action<IDocumentBulkBuilder> requests

Набор команд изменения документов.

System.Boolean isOrdered

Обязательно ли выполнять команды по порядку.

Returns
Type Description
DocumentBulkResult
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

BulkAsync(Action<IDocumentBulkBuilder>, Boolean)

Выполняет набор команд изменения документов в рамках одного запроса.

Declaration
Task<DocumentBulkResult> BulkAsync(Action<IDocumentBulkBuilder> requests, bool isOrdered = false)
Parameters
Type Name Description
Action<IDocumentBulkBuilder> requests

Набор команд изменения документов.

System.Boolean isOrdered

Обязательно ли выполнять команды по порядку.

Returns
Type Description
Task<DocumentBulkResult>
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

Count(Func<IDocumentFilterBuilder, Object>)

Возвращает количество документов, удовлетворяющих указанному фильтру.

Declaration
long Count(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
System.Int64
| Improve this Doc View Source

CountAsync(Func<IDocumentFilterBuilder, Object>)

Возвращает количество документов, удовлетворяющих указанному фильтру.

Declaration
Task<long> CountAsync(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
Task<System.Int64>
| Improve this Doc View Source

DeleteMany(Func<IDocumentFilterBuilder, Object>)

Удаляет все документы, удовлетворяющие указанному фильтру.

Declaration
long DeleteMany(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
System.Int64
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

DeleteManyAsync(Func<IDocumentFilterBuilder, Object>)

Удаляет все документы, удовлетворяющие указанному фильтру.

Declaration
Task<long> DeleteManyAsync(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
Task<System.Int64>
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

DeleteOne(Func<IDocumentFilterBuilder, Object>)

Удаляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
long DeleteOne(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
System.Int64
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

DeleteOneAsync(Func<IDocumentFilterBuilder, Object>)

Удаляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
Task<long> DeleteOneAsync(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
Task<System.Int64>
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

Distinct<TProperty>(String, Func<IDocumentFilterBuilder, Object>)

Возвращает список уникальных значений свойства документа для указанного фильтра.

Declaration
IDocumentCursor<TProperty> Distinct<TProperty>(string property, Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
System.String property

Свойство документа.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
IDocumentCursor<TProperty>
Type Parameters
Name Description
TProperty
| Improve this Doc View Source

DistinctAsync<TProperty>(String, Func<IDocumentFilterBuilder, Object>)

Возвращает список уникальных значений свойства документа для указанного фильтра.

Declaration
Task<IDocumentCursor<TProperty>> DistinctAsync<TProperty>(string property, Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
System.String property

Свойство документа.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
Task<IDocumentCursor<TProperty>>
Type Parameters
Name Description
TProperty
| Improve this Doc View Source

Find(Func<IDocumentFilterBuilder, Object>)

Осуществляет поиск по указанному фильтру и возвращает указатель на результат поиска.

Declaration
IDocumentFindCursor Find(Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
IDocumentFindCursor
| Improve this Doc View Source

FindText(String, String, Boolean, Boolean, Func<IDocumentFilterBuilder, Object>)

Осуществляет полнотекстовый поиск по указанной строке и возвращает указатель на результат поиска.

Declaration
IDocumentFindCursor FindText(string search, string language = null, bool caseSensitive = false, bool diacriticSensitive = false, Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
System.String search

Строка для полнотекстового поиска.

System.String language

Язык для поиска.

System.Boolean caseSensitive

Чувствительность к регистру символов.

System.Boolean diacriticSensitive

Чувствительность к диакритическим символам.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

Returns
Type Description
IDocumentFindCursor
| Improve this Doc View Source

InsertMany(IEnumerable<DynamicDocument>)

Вставляет набор документов хранилище или возвращает исключение, если хранилище уже содержит один из указанных документов.

Declaration
void InsertMany(IEnumerable<DynamicDocument> documents)
Parameters
Type Name Description
IEnumerable<DynamicDocument> documents

Список документов для вставки.

Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertManyAsync(IEnumerable<DynamicDocument>)

Вставляет набор документов хранилище или возвращает исключение, если хранилище уже содержит один из указанных документов.

Declaration
Task InsertManyAsync(IEnumerable<DynamicDocument> documents)
Parameters
Type Name Description
IEnumerable<DynamicDocument> documents

Список документов для вставки.

Returns
Type Description
Task
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertOne(DynamicDocument)

Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.

Declaration
void InsertOne(DynamicDocument document)
Parameters
Type Name Description
DynamicDocument document

Документ для вставки.

Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertOneAsync(DynamicDocument)

Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.

Declaration
Task InsertOneAsync(DynamicDocument document)
Parameters
Type Name Description
DynamicDocument document

Документ для вставки.

Returns
Type Description
Task
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

ReplaceOne(DynamicDocument, Func<IDocumentFilterBuilder, Object>, Boolean)

Заменяет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
DocumentUpdateResult ReplaceOne(DynamicDocument replacement, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
DynamicDocument replacement

Документ замены.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
DocumentUpdateResult
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

ReplaceOneAsync(DynamicDocument, Func<IDocumentFilterBuilder, Object>, Boolean)

Заменяет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
Task<DocumentUpdateResult> ReplaceOneAsync(DynamicDocument replacement, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
DynamicDocument replacement

Документ замены.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
Task<DocumentUpdateResult>
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

UpdateMany(Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет все документы, удовлетворяющие указанному фильтру.

Declaration
DocumentUpdateResult UpdateMany(Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
DocumentUpdateResult
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

UpdateManyAsync(Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет все документы, удовлетворяющие указанному фильтру.

Declaration
Task<DocumentUpdateResult> UpdateManyAsync(Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
Task<DocumentUpdateResult>
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

UpdateOne(Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
DocumentUpdateResult UpdateOne(Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
DocumentUpdateResult
Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

UpdateOneAsync(Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
Task<DocumentUpdateResult> UpdateOneAsync(Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Returns
Type Description
Task<DocumentUpdateResult>
Exceptions
Type Condition
DocumentStorageWriteException

Extension Methods

DocumentStorageExtensions.SaveOne(IDocumentStorage, DynamicDocument)
DocumentStorageExtensions.SaveOneAsync(IDocumentStorage, DynamicDocument)
DocumentStorageExtensions.SaveMany(IDocumentStorage, IEnumerable<DynamicDocument>)
DocumentStorageExtensions.SaveManyAsync(IDocumentStorage, IEnumerable<DynamicDocument>)
DynamicCollectionExtensions.GetItem(Object, Int32)
DynamicCollectionExtensions.SetItem(Object, Int32, Object)
DynamicCollectionExtensions.AddItem(Object, Object)
DynamicCollectionExtensions.InsertItem(Object, Int32, Object)
DynamicCollectionExtensions.RemoveItem(Object, Object)
DynamicCollectionExtensions.RemoveItemAt(Object, Int32)
DynamicCollectionExtensions.MoveItem(Object, Object, Int32)
DynamicObjectExtensions.TryGetPropertyValue(Object, String)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TryGetPropertyValueByPath(Object, String)
DynamicObjectExtensions.TrySetPropertyValueByPath(Object, String, Object)
ReflectionExtensions.IsInstanceOfType(Object, Type)
ReflectionExtensions.GetMemberValue(Object, String)
ReflectionExtensions.SetMemberValue(Object, String, Object)
ReflectionExtensions.InvokeMember(Object, String, Object[], out Object, Type[])
ReflectionExtensions.GetFieldValue(Object, FieldInfo)
ReflectionExtensions.SetFieldValue(Object, FieldInfo, Object)
ReflectionExtensions.GetPropertyValue(Object, PropertyInfo)
ReflectionExtensions.SetPropertyValue(Object, PropertyInfo, Object)
ReflectionExtensions.GetMethodDelegate(Object, MethodInfo)
ReflectionExtensions.GetEventDelegate(Object, EventInfo)
ReflectionExtensions.SetEventDelegate(Object, EventInfo, Object)
CommonExtensions.ExecuteSilent<T>(T, Action<T>)
  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.