chore: initial git load of code space

This commit is contained in:
Thom Lamb
2026-05-12 08:52:33 -05:00
parent 9abada692f
commit 5e467bcc9c
384 changed files with 65960 additions and 2 deletions
@@ -0,0 +1,42 @@
using Strata.SqlTools.SqlBreakdown.Classes;
namespace Strata.SqlTools.Markdown.Snowflake;
/// <summary>
/// Generates Mermaid diagrams for Snowflake SQL statements, including sequence diagrams
/// for statement execution flow and entity-relationship diagrams.
/// </summary>
public class SqlStatementGenerator
{
private readonly SqlServer.SqlStatementGenerator _baseGenerator;
/// <summary>
/// Initializes a new instance of the SqlStatementGenerator class.
/// </summary>
public SqlStatementGenerator()
{
_baseGenerator = new SqlServer.SqlStatementGenerator();
}
/// <summary>
/// Generates a Mermaid sequence diagram showing Snowflake SQL statement execution flow.
/// </summary>
/// <param name="sqlBreakdown">The Snowflake SQL breakdown object.</param>
/// <param name="title">Optional title for the diagram.</param>
/// <returns>A string containing the Mermaid sequence diagram markdown.</returns>
public string GenerateSequenceDiagram(SqlBreakdownBase sqlBreakdown, string? title = null)
{
return _baseGenerator.GenerateSequenceDiagram(sqlBreakdown, title);
}
/// <summary>
/// Generates a Mermaid entity-relationship diagram from table names.
/// </summary>
/// <param name="tables">Collection of table names to include in the diagram.</param>
/// <param name="title">Optional title for the diagram.</param>
/// <returns>A string containing the Mermaid ER diagram markdown.</returns>
public string GenerateEntityRelationshipDiagram(IEnumerable<string> tables, string? title = null)
{
return _baseGenerator.GenerateEntityRelationshipDiagram(tables, title);
}
}