2025-04-02 14:06:40 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace JiShe.CollectBus.IoTDBProvider
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// IoTDB数据源
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public interface IIoTDBProvider
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 插入数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
|
/// <param name="entity"></param>
|
2025-04-03 15:38:31 +08:00
|
|
|
|
/// <param name="buildTabletMode">构建表模型方式,1 根据实体《T》直接显示指定Tag,2根据实体《T》的名称指定表名</param>
|
2025-04-02 14:06:40 +08:00
|
|
|
|
/// <returns></returns>
|
2025-04-03 15:38:31 +08:00
|
|
|
|
Task InsertAsync<T>(T entity, int buildTabletMode) where T : IoTEntity;
|
2025-04-02 14:06:40 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量插入数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
|
/// <param name="entities"></param>
|
2025-04-03 15:38:31 +08:00
|
|
|
|
/// <param name="buildTabletMode">构建表模型方式,1 根据实体《T》直接显示指定Tag,2根据实体《T》的名称指定表名</param>
|
2025-04-02 14:06:40 +08:00
|
|
|
|
/// <returns></returns>
|
2025-04-03 15:38:31 +08:00
|
|
|
|
Task BatchInsertAsync<T>(IEnumerable<T> entities, int buildTabletMode) where T : IoTEntity;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
|
/// <param name="options"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
Task<object> DeleteAsync<T>(QueryOptions options) where T : IoTEntity;
|
2025-04-02 14:06:40 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
|
/// <param name="options"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
Task<PagedResult<T>> QueryAsync<T>(QueryOptions options) where T : IoTEntity, new();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|