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 {SeedsRoot}/{host|tenants/{tenantId}}/{sql|postgres}/object/{fileName}.sql /// (repo: configs/seeds). The scope folder follows the current tenant: host context writes to host/. /// Called automatically after a successful SqlTableDesigner deploy so the script can be re-seeded. /// Task SaveTableScriptAsync(SaveTableScriptDto input); /// /// Deletes matching SQL seed files from the current scope's object folder when objects are /// dropped from the UI. /// Non-existing files are ignored. /// Task DeleteSqlDataFilesAsync(DeleteSqlDataFilesDto input); }