fork from 1.3

This commit is contained in:
moux23333
2024-01-27 21:06:07 +08:00
commit 22fc0b0848
1507 changed files with 24139 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
namespace FreeSR.Database
{
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
public interface ISRDatabase<T> where T : class
{
Task Insert(T document);
Task InsertMany(IEnumerable<T> documents);
Task<List<T>> Find(Expression<Func<T, bool>> filter);
Task<T> FindOne(Expression<Func<T, bool>> filter);
Task Update(Expression<Func<T, bool>> filter, T updatedDocument);
Task Delete(Expression<Func<T, bool>> filter);
Task<long> Count();
Task<T> FindMax(Expression<Func<T, object>> fieldSelector);
}
}