using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace Sozsoft.SqlQueryManager.Application.Contracts;
///
/// SQL Query Manager - executes T-SQL and provides database metadata.
/// Does not persist SQL objects to its own tables.
///
public interface ISqlObjectManagerAppService : IApplicationService
{
///
/// Returns tables (and optionally templates) available on the given data source.
///
Task GetAllObjectsAsync(string dataSourceCode);
///
/// Executes raw T-SQL against the specified data source.
///
Task ExecuteQueryAsync(ExecuteSqlQueryDto input);
// Database Metadata Operations
Task> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName);
Task GetTableCreateScriptAsync(string dataSourceCode, string schemaName, string tableName);
///
/// Gets the SQL definition/body of a native SQL Server object (Stored Procedure, View, or Function)
///
Task GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName);
///
/// Saves the T-SQL script to Seeds/SqlData/{fileName}.sql in the DbMigrator project.
/// Called automatically after a successful SqlTableDesigner deploy so the script can be re-seeded.
///
Task SaveTableScriptAsync(SaveTableScriptDto input);
///
/// Deletes matching SQL seed files from Seeds/SqlData when objects are dropped from the UI.
/// Non-existing files are ignored.
///
Task DeleteSqlDataFilesAsync(DeleteSqlDataFilesDto input);
///
/// Lists .sql files currently available under DbMigrator Seeds/SqlData.
///
Task> GetSqlDataFilesAsync(string dataDirectoryName = "SqlData", string relativePath = "");
///
/// Reads a .sql seed file content from the selected data directory.
///
Task GetSqlDataFileContentAsync(string dataDirectoryName = "SqlData", string relativePath = "");
///
/// Moves a SQL seed file between the selected data directory root and HostData.
///
Task MoveSqlDataFileAsync(MoveSqlDataFileDto input);
}