Show / Hide Table of Contents

Interface IDocumentStorageProvider<TDocument>

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

Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
Syntax
public interface IDocumentStorageProvider<TDocument>
Type Parameters
Name Description
TDocument

Properties

| Improve this Doc View Source

DocumentType

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

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

Methods

| Improve this Doc View Source

Aggregate(Expression<Func<TDocument, Boolean>>)

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

Declaration
IDocumentAggregateCursor<TDocument> Aggregate(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

Returns
Type Description
IDocumentAggregateCursor<TDocument>
| Improve this Doc View Source

Bulk(Action<IDocumentBulkBuilder<TDocument>>, Boolean)

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

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

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

System.Boolean isOrdered

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

Returns
Type Description
DocumentBulkResult
| Improve this Doc View Source

BulkAsync(Action<IDocumentBulkBuilder<TDocument>>, Boolean)

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

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

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

System.Boolean isOrdered

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

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

Count(Expression<Func<TDocument, Boolean>>)

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

Declaration
long Count(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

CountAsync(Expression<Func<TDocument, Boolean>>)

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

Declaration
Task<long> CountAsync(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

DeleteMany(Expression<Func<TDocument, Boolean>>)

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

Declaration
long DeleteMany(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

DeleteManyAsync(Expression<Func<TDocument, Boolean>>)

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

Declaration
Task<long> DeleteManyAsync(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

DeleteOne(Expression<Func<TDocument, Boolean>>)

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

Declaration
long DeleteOne(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

DeleteOneAsync(Expression<Func<TDocument, Boolean>>)

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

Declaration
Task<long> DeleteOneAsync(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

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

Distinct<TProperty>(Expression<Func<TDocument, TProperty>>, Expression<Func<TDocument, Boolean>>)

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

Declaration
IDocumentCursor<TProperty> Distinct<TProperty>(Expression<Func<TDocument, TProperty>> property, Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, TProperty>> property

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

Expression<Func<TDocument, System.Boolean>> filter

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

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

Distinct<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, Expression<Func<TDocument, Boolean>>)

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

Declaration
IDocumentCursor<TItem> Distinct<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty

Свойство документа, содержащее массив.

Expression<Func<TDocument, System.Boolean>> filter

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

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

DistinctAsync<TProperty>(Expression<Func<TDocument, TProperty>>, Expression<Func<TDocument, Boolean>>)

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

Declaration
Task<IDocumentCursor<TProperty>> DistinctAsync<TProperty>(Expression<Func<TDocument, TProperty>> property, Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, TProperty>> property

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

Expression<Func<TDocument, System.Boolean>> filter

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

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

DistinctAsync<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, Expression<Func<TDocument, Boolean>>)

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

Declaration
Task<IDocumentCursor<TItem>> DistinctAsync<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty

Свойство документа, содержащее массив.

Expression<Func<TDocument, System.Boolean>> filter

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

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

Find(Expression<Func<TDocument, Boolean>>)

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

Declaration
IDocumentFindCursor<TDocument, TDocument> Find(Expression<Func<TDocument, bool>> filter = null)
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

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

Returns
Type Description
IDocumentFindCursor<TDocument, TDocument>
| Improve this Doc View Source

FindText(String, String, Boolean, Boolean, Expression<Func<TDocument, Boolean>>)

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

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

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

System.String language

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

System.Boolean caseSensitive

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

System.Boolean diacriticSensitive

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

Expression<Func<TDocument, System.Boolean>> filter

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

Returns
Type Description
IDocumentFindCursor<TDocument, TDocument>
| Improve this Doc View Source

InsertMany(IEnumerable<TDocument>)

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

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

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

| Improve this Doc View Source

InsertManyAsync(IEnumerable<TDocument>)

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

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

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

Returns
Type Description
Task
| Improve this Doc View Source

InsertOne(TDocument)

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

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

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

| Improve this Doc View Source

InsertOneAsync(TDocument)

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

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

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

Returns
Type Description
Task
| Improve this Doc View Source

ReplaceOne(TDocument, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
DocumentUpdateResult 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
DocumentUpdateResult
| Improve this Doc View Source

ReplaceOneAsync(TDocument, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
Task<DocumentUpdateResult> ReplaceOneAsync(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
Task<DocumentUpdateResult>
| Improve this Doc View Source

UpdateMany(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
DocumentUpdateResult 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
DocumentUpdateResult
| Improve this Doc View Source

UpdateManyAsync(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
Task<DocumentUpdateResult> UpdateManyAsync(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
Task<DocumentUpdateResult>
| Improve this Doc View Source

UpdateOne(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
DocumentUpdateResult 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
DocumentUpdateResult
| Improve this Doc View Source

UpdateOneAsync(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

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

Declaration
Task<DocumentUpdateResult> UpdateOneAsync(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
Task<DocumentUpdateResult>

Extension Methods

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.