2026-02-24 20:44:16 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Volo.Abp.Application.Services;
|
|
|
|
|
|
|
|
|
|
namespace Sozsoft.SqlQueryManager.Application.Contracts;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-03-02 18:31:49 +00:00
|
|
|
/// SQL Query Manager - executes T-SQL and provides database metadata.
|
|
|
|
|
/// Does not persist SQL objects to its own tables.
|
2026-02-24 20:44:16 +00:00
|
|
|
/// </summary>
|
|
|
|
|
public interface ISqlObjectManagerAppService : IApplicationService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2026-03-02 18:31:49 +00:00
|
|
|
/// Returns tables (and optionally templates) available on the given data source.
|
2026-02-24 20:44:16 +00:00
|
|
|
/// </summary>
|
|
|
|
|
Task<SqlObjectExplorerDto> GetAllObjectsAsync(string dataSourceCode);
|
|
|
|
|
|
2026-03-02 18:31:49 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Executes raw T-SQL against the specified data source.
|
|
|
|
|
/// </summary>
|
2026-02-24 20:44:16 +00:00
|
|
|
Task<SqlQueryExecutionResultDto> ExecuteQueryAsync(ExecuteSqlQueryDto input);
|
|
|
|
|
|
|
|
|
|
// Database Metadata Operations
|
|
|
|
|
Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName);
|
2026-03-02 18:31:49 +00:00
|
|
|
|
2026-02-24 20:44:16 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the SQL definition/body of a native SQL Server object (Stored Procedure, View, or Function)
|
|
|
|
|
/// </summary>
|
|
|
|
|
Task<string> GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName);
|
|
|
|
|
}
|