using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Transactions; using ZKLT.Hadoop.Model; namespace ZKLT.Hadoop.Interface { public interface ITableService { /// /// 初始化云计算 /// /// 配置 public void Init(Action config); /// /// 获取源 /// /// 数据源编号 /// 结果 public HDP_Source GetSource(string sourceid); /// /// 获取表 /// /// 表编号 /// 结果 public HDP_Table GetTable(string tableid); /// /// 同步结构 /// /// 数据源 /// 数据表 /// 是否成功 public bool InitStruct(string sourceId, HDP_Table table); /// /// 删除结构 /// /// 源 /// 表 /// 是否成功 public bool RemoveStruct(string sourceId, string tableId); /// /// 插入数据 /// /// 数据源 /// 数据表 /// 数据 /// 是否成功 public bool Insert(string sourceId, string tableId, JToken? data); /// /// 更新 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 是否成功 public bool Update(string sourceId, string tableId, JToken? where, JToken? data); /// /// 删除 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 是否成功 public bool Delete(string sourceId, string tableId, JToken? where, JToken? data); /// /// 查询单个 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 结果 public T? QuerySingle(string sourceId, string tableId, JToken? where, JToken? data, string[]? col); /// /// 查询列表 /// /// 返回类型 /// 数据源 /// 数据表 /// 条件 /// 数据 /// 排序 /// 筛选返回字段 /// 结果集 public T[] Query(string sourceId, string tableId, JToken? where, JToken? data, JToken? order, string[]? col); public string QueryString(string sourceId, string tableId, JToken? where, JToken? data, JToken? order, string[]? col, Dictionary param); /// /// 查询分页列表 /// /// 返回类型 /// 数据源 /// 数据表 /// 分页下标 /// 分页大小 /// 条件 /// 数据 /// 排序 /// 返回咧 /// 结果集 public HDP_Page QueryPage(string sourceId, string tableId, int pageIndex, int pageSize, JToken? where, JToken? data, JToken? order, string[]? col); /// /// 判断数据源是否存在表 /// /// 数据源 /// 表名 /// 是否存在 public bool DbExistTable(string sourceId, string tableName); /// /// 查询数据列 /// /// 数据源 /// 表 /// public HDP_Column[] DbGetColumns(string sourceId, string tableId); } }