/
aprogrammer
/
yessql
Обзор
Документация
Войти
/
aprogrammer
/
yessql
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/YesSql.Core/Commands/DocumentCommand.cs
38 строк
1 KB
Mike Alhayek
Code Cleanup (#507)
09 ноя 2023, 03:32
Не верифицирован
09 ноя 2023, 03:32
dabecfb
Код
Авторство
О чём код?
using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Data.Common; using System.Reflection; using System.Threading.Tasks; namespace YesSql.Commands { public abstract class DocumentCommand : IIndexCommand, ICollectionName { protected static readonly PropertyInfo[] AllProperties = new PropertyInfo[] { typeof(Document).GetProperty("Type") }; protected static readonly PropertyInfo[] AllKeys = new PropertyInfo[] { typeof(Document).GetProperty("Id") }; public abstract int ExecutionOrder { get; } public DocumentCommand(Document document, string collection) { Document = document; Collection = collection; } public Document Document { get; } public string Collection { get; } public abstract Task ExecuteAsync(DbConnection connection, DbTransaction transaction, ISqlDialect dialect, ILogger logger); public abstract bool AddToBatch(ISqlDialect dialect, List<string> queries, DbCommand parameters, List<Action<DbDataReader>> actions, int index); } }