Предоставляет методы создания операторов обновления документов.
Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
public interface IDocumentUpdateBuilder<TDocument>
Type Parameters
Name |
Description |
TDocument |
|
Methods
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа результат бинарного умножения (AND) текущего значения на указанное.
Declaration
IDocumentUpdateBuilder<TDocument> BitwiseAnd<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа результат бинарного сложения (OR) текущего значения с указанным.
Declaration
IDocumentUpdateBuilder<TDocument> BitwiseOr<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа результат бинарного сложения по модулю 2 (XOR) текущего значения с указанным.
Declaration
IDocumentUpdateBuilder<TDocument> BitwiseXor<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа текущую дату и время.
Declaration
IDocumentUpdateBuilder<TDocument> CurrentDate(Expression<Func<TDocument, object>> property)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, System.Object>> |
property |
|
Returns
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа результат сложения текущего значения с указанным.
Declaration
IDocumentUpdateBuilder<TDocument> Inc<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа указанное значение, если оно больше текущего.
Declaration
IDocumentUpdateBuilder<TDocument> Max<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа указанное значение, если оно меньше текущего.
Declaration
IDocumentUpdateBuilder<TDocument> Min<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа результат умножения текущего значения на указанное.
Declaration
IDocumentUpdateBuilder<TDocument> Mul<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и удаляет из него первый элемент.
Declaration
IDocumentUpdateBuilder<TDocument> PopFirst(Expression<Func<TDocument, object>> arrayProperty)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, System.Object>> |
arrayProperty |
|
Returns
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и удаляет из него последний элемент.
Declaration
IDocumentUpdateBuilder<TDocument> PopLast(Expression<Func<TDocument, object>> arrayProperty)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, System.Object>> |
arrayProperty |
|
Returns
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и удаляет из него указанный элемент.
Declaration
IDocumentUpdateBuilder<TDocument> Pull<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, TItem item)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
TItem |
item |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и удаляет из него все указанные элементы.
Declaration
IDocumentUpdateBuilder<TDocument> PullAll<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, IEnumerable<TItem> items)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
IEnumerable<TItem> |
items |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и удаляет из него все элементы, удовлетворяющие указанному фильтру.
Declaration
IDocumentUpdateBuilder<TDocument> PullFilter<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, Expression<Func<TItem, bool>> filter = null)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
Expression<Func<TItem, System.Boolean>> |
filter |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и добавляет в него указанный элемент.
Declaration
IDocumentUpdateBuilder<TDocument> Push<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, TItem item)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
TItem |
item |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и добавляет в него все указанные элементы.
Declaration
IDocumentUpdateBuilder<TDocument> PushAll<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, IEnumerable<TItem> items)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
IEnumerable<TItem> |
items |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и добавляет в него все указанные элементы, кроме тех, которые уже есть в массиве.
Declaration
IDocumentUpdateBuilder<TDocument> PushAllUnique<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, IEnumerable<TItem> items)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
IEnumerable<TItem> |
items |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который проверяет, что свойство документа является массивом, и добавляет в него указанный элемент, если его еще нет в массиве.
Declaration
IDocumentUpdateBuilder<TDocument> PushUnique<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> arrayProperty, TItem item)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, IEnumerable<TItem>>> |
arrayProperty |
|
TItem |
item |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Создает оператор обновления, который удаляет указанное свойство документа.
Declaration
IDocumentUpdateBuilder<TDocument> Remove(Expression<Func<TDocument, object>> property)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, System.Object>> |
property |
|
Returns
|
Improve this Doc
View Source
Создает оператор обновления, который изменяет имя указанного свойства документа.
Declaration
IDocumentUpdateBuilder<TDocument> Rename(Expression<Func<TDocument, object>> property, string newProperty)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, System.Object>> |
property |
|
System.String |
newProperty |
|
Returns
|
Improve this Doc
View Source
Создает оператор обновления, который присваивает свойству документа указанное значение.
Declaration
IDocumentUpdateBuilder<TDocument> Set<TProperty>(Expression<Func<TDocument, TProperty>> property, TProperty value)
Parameters
Type |
Name |
Description |
Expression<Func<TDocument, TProperty>> |
property |
|
TProperty |
value |
|
Returns
Type Parameters
Name |
Description |
TProperty |
|
Extension Methods