erp-platform/api/modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Services/ISqlTemplateProvider.cs

43 lines
1.2 KiB
C#
Raw Normal View History

2025-12-05 08:56:53 +00:00
using System.Collections.Generic;
using Erp.SqlQueryManager.Domain.Shared;
namespace Erp.SqlQueryManager.Domain.Services;
/// <summary>
/// Provides SQL templates for creating database objects
/// </summary>
public interface ISqlTemplateProvider
{
/// <summary>
/// Get stored procedure template
/// </summary>
string GetStoredProcedureTemplate(string procedureName, string schemaName = "dbo");
/// <summary>
/// Get view template
/// </summary>
string GetViewTemplate(string viewName, string schemaName = "dbo", bool withSchemaBinding = false);
/// <summary>
/// Get function template
/// </summary>
string GetFunctionTemplate(string functionName, SqlFunctionType functionType, string schemaName = "dbo");
/// <summary>
/// Get query template with common patterns
/// </summary>
string GetQueryTemplate(string queryType);
/// <summary>
/// Get available query template types
/// </summary>
List<QueryTemplateInfo> GetAvailableQueryTemplates();
}
public class QueryTemplateInfo
{
public string Type { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}