using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ZKLT.Hadoop.Model; namespace ZKLT.Hadoop.Interface { public interface ITableService { /// /// 同步结构 /// /// 数据源 /// 数据表 /// 是否成功 public bool InitStruct(HDP_Source source, HDP_Table table); /// /// 删除结构 /// /// 源 /// 表 /// 是否成功 public bool RemoveStruct(HDP_Source source, string tableKey); /// /// 插入数据 /// /// 数据源 /// 数据表 /// 数据 /// 是否成功 public bool Insert(HDP_Source source, HDP_Table table, Dictionary row); /// /// 更新 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 是否成功 public bool Update(HDP_Source source, HDP_Table table, Dictionary where, Dictionary row); /// /// 删除 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 是否成功 public bool Delete(HDP_Source source, HDP_Table table, Dictionary where, Dictionary row); /// /// 查询单个 /// /// 数据源 /// 数据表 /// 条件 /// 数据 /// 结果 public T? QuerySingle(HDP_Source source, HDP_Table table, Dictionary where, Dictionary row); /// /// 查询列表 /// /// 返回类型 /// 数据源 /// 数据表 /// 条件 /// 数据 /// 结果集 public T[] Query(HDP_Source source, HDP_Table table, Dictionary? where = null, Dictionary? row = null, Dictionary? order = null); /// /// 查询列表 /// /// 返回类型 /// 数据源 /// 数据表 /// 条件 /// 数据 /// 结果集 public HDP_Page QueryPage(HDP_Source source, HDP_Table table, int pageIndex, int pageSize, Dictionary? where = null, Dictionary? row = null, Dictionary? order = null); /// /// 判断数据源是否存在表 /// /// 数据源 /// 表名 /// 是否存在 public bool DbExistTable(HDP_Source source, string tableName); /// /// 查询数据列 /// /// 数据源 /// 表名 /// public HDP_Column[] DbGetColumns(HDP_Source source, string tableName); } }