You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.6 KiB
C#

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
{
/// <summary>
/// 云计算接口
/// </summary>
public interface IHadoopService
{
/// <summary>
/// 创建源
/// </summary>
/// <param name="source">源</param>
/// <returns>是否成功</returns>
public bool InsertSource(HDP_Source source);
/// <summary>
/// 更新源
/// </summary>
/// <param name="source">源</param>
/// <returns>是否成功</returns>
public bool UpdateSource(HDP_Source source);
/// <summary>
/// 删除源
/// </summary>
/// <param name="sourceid">源</param>
/// <returns>是否成功</returns>
public bool DeleteSource(string sourceid);
/// <summary>
/// 查询源
/// </summary>
/// <param name="command">命令</param>
/// <returns>结果</returns>
public HDP_Source[] QuerySource(HDP_Command command);
/// <summary>
/// 创建表
/// </summary>
/// <param name="table">表</param>
/// <returns>是否成功</returns>
public bool InsertTable(HDP_Table table);
/// <summary>
/// 更新表
/// </summary>
/// <param name="table"></param>
/// <returns>是否成功</returns>
public bool UpdateTable(HDP_Table table);
/// <summary>
/// 删除表
/// </summary>
/// <param name="tableId"></param>
/// <returns>是否成功</returns>
public bool DeleteTable(string tableId);
/// <summary>
/// 查询表
/// </summary>
/// <param name="command">命令</param>
/// <returns>结果</returns>
public HDP_Table[] QueryTable(HDP_Command command);
/// <summary>
/// 插入数据
/// </summary>
/// <param name="command">命令</param>
/// <returns>是否成功</returns>
public bool Insert(HDP_Command command);
/// <summary>
/// 更新数据
/// </summary>
/// <param name="command"></param>
/// <returns>是否成功</returns>
public bool Update(HDP_Command command);
/// <summary>
/// 删除数据
/// </summary>
/// <param name="command">命令</param>
/// <returns>是否成功</returns>
public bool Delete(HDP_Command command);
/// <summary>
/// 查询单条
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="command">命令</param>
/// <returns>结果</returns>
public T? QuerySingle<T>(HDP_Command command);
/// <summary>
/// 查询列表
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="command">命令</param>
/// <returns>结果</returns>
public T[] Query<T>(HDP_Command command);
/// <summary>
/// 分页查询
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="command">命令</param>
/// <returns>结果</returns>
public HDP_Page<T> Page<T>(HDP_Command command);
/// <summary>
/// 批量执行任务
/// </summary>
/// <param name="command">指令</param>
/// <returns></returns>
public object?[] PatchCommand(HDP_Command[] command);
}
}