Skip to content

feat: Implement DBMLWriter and related interfaces for DBML file gener…#27

Merged
OGR-67 merged 2 commits into
devfrom
8-feat-create-dmbl-file-from-parsed-data
Mar 20, 2026
Merged

feat: Implement DBMLWriter and related interfaces for DBML file gener…#27
OGR-67 merged 2 commits into
devfrom
8-feat-create-dmbl-file-from-parsed-data

Conversation

@OGR-67

@OGR-67 OGR-67 commented Mar 19, 2026

Copy link
Copy Markdown
Owner

…ation

Description

Closes

closes #8

Copilot AI review requested due to automatic review settings March 19, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements DBML generation for the parsed AL schema (Issue #8), adding a writer + schema post-processing, wiring it into DI, and introducing a comprehensive writer test suite.

Changes:

  • Added IDBMLWriter + ISchemaPostProcessor abstractions and a new DBMLWriter project with concrete implementations.
  • Registered the writer/post-processor in AL2DBML.DI and updated tests/solution references.
  • Extended IAlParser/AlParser with GetOutputSchema() to expose the accumulated parsed schema.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/DBMLWriter/Writer.cs Generates DBML text output from an OutputSchema (enums, tables, refs, flowfield notes).
src/DBMLWriter/SchemaPostProcessor.cs Deep-copies and post-processes schema (unknown-field cleanup, PK inference, ref resolution).
src/DBMLWriter/DBMLWriter.csproj New project packaging the writer implementation.
src/AL2DBML.Tests/Writer/WriterTests.cs Adds DBML writer unit tests (quoting, refs, flowfields, unknown-field rules).
src/AL2DBML.Tests/TestBase.cs Resolves IDBMLWriter from DI for test suites.
src/AL2DBML.Tests/AL2DBML.Tests.csproj References the new DBMLWriter project.
src/AL2DBML.Parser/AlParser.cs Implements GetOutputSchema() returning the parser’s accumulated schema.
src/AL2DBML.DI/WriterServiceExtensions.cs Adds DI registrations for writer + post-processor.
src/AL2DBML.DI/AL2DbmlServiceExtensions.cs Adds .AddWriter() to the default service registration chain.
src/AL2DBML.DI/AL2DBML.DI.csproj References DBMLWriter from DI project.
src/AL2DBML.Application/Interfaces/ISchemaPostProcessor.cs New schema post-processing interface.
src/AL2DBML.Application/Interfaces/IDBMLWriter.cs New DBML writer interface.
src/AL2DBML.Application/Interfaces/IAlParser.cs Adds GetOutputSchema() to parser contract.
AL2DBML.sln Adds the new DBMLWriter project to the solution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/DBMLWriter/Writer.cs Outdated
Comment thread src/DBMLWriter/DBMLWriter.cs
Comment thread src/DBMLWriter/Writer.cs Outdated
Comment thread src/DBMLWriter/DBMLWriter.cs
Comment thread src/DBMLWriter/Writer.cs Outdated
Comment thread src/DBMLWriter/SchemaPostProcessor.cs Outdated
Comment thread src/AL2DBML.Application/Interfaces/IAlParser.cs
Comment thread src/AL2DBML.Parser/AlParser.cs
Comment thread src/AL2DBML.Tests/Writer/WriterTests.cs
@OGR-67 OGR-67 merged commit 89e7dc9 into dev Mar 20, 2026
1 check passed
@OGR-67 OGR-67 deleted the 8-feat-create-dmbl-file-from-parsed-data branch March 20, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants