Files
SecMPS/api_sqlsugar/VolPro.Builder/IServices/DataBase/ITableService.cs
2026-05-15 23:22:48 +08:00

45 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Collections.Generic;
using System.Threading.Tasks;
using VolPro.Builder.Services;
using VolPro.Core.Utilities;
namespace VolPro.Builder.IServices;
public interface ITableService
{
/// <summary>
/// 判断指定表是否存在。
/// </summary>
/// <param name="dbService">数据库类型标识,例如 SqlServer / MySql / PGSql如果为 null 则使用默认配置。</param>
Task<bool> TableExistsAsync(string dbService, string tableName);
/// <summary>
/// 创建表。
/// </summary>
/// <param name="dbService">数据库类型标识。</param>
Task<WebResponseContent> CreateTableAsync(string dbService, CreateTableRequest request);
/// <summary>
/// 获取所有表名。
/// </summary>
/// <param name="dbService">数据库类型标识。</param>
Task<object> GetAllTablesAsync(string dbService);
/// <summary>
/// 获取表结构信息。
/// </summary>
/// <param name="dbService">数据库类型标识。</param>
Task<TableInfoDto> GetTableInfoAsync(string dbService, string tableName);
/// <summary>
/// 更新表结构。
/// </summary>
/// <param name="dbService">数据库类型标识。</param>
Task<WebResponseContent> UpdateTableAsync(string dbService, UpdateTableRequest request);
/// <summary>
/// 删除表。
/// </summary>
/// <param name="dbService">数据库类型标识。</param>
Task<WebResponseContent> DeleteTableAsync(string dbService, string tableName);
}