Skip to content

feat: add flags object to exporter to control record generation#831

Merged
huydo862003 merged 9 commits intomasterfrom
fix/add-a-flag-to-exporter-to-disable-record-generation
Feb 26, 2026
Merged

feat: add flags object to exporter to control record generation#831
huydo862003 merged 9 commits intomasterfrom
fix/add-a-flag-to-exporter-to-disable-record-generation

Conversation

@huydo862003
Copy link
Contributor

@huydo862003 huydo862003 commented Feb 23, 2026

Summary

  • In runsql, when import sql, the data records are both imported into the define data section and the dbml section -> duplicate -> the user has to manually remove the duplicate dbml.

  • Example: After importing Postgresql, follows data exist in 2 places (1) and (2):

image
  • Solution: add a flag to disable record generation in DBML

Issue

(issue link here)

Lasting Changes (Technical)

(please list down: code changes/things that have wide-effect; new libraries/functions added that can be used by others; examples below)

  • (Added class EmailValidator to validate email address' validity)
  • (Added Tenant#is_trial? check)

Checklist

Please check directly on the box once each of these are done

  • Documentation (if necessary)
  • Lint Checks Passed
  • Unit Tests Passed
  • Coverage Tests Passed
  • Integration Tests Passed
  • Code Review

@huydo862003 huydo862003 force-pushed the fix/add-a-flag-to-exporter-to-disable-record-generation branch from 5499ebf to 9c08aac Compare February 25, 2026 09:06
* **Arguments:**
* ```{string} str```
* ```{'mysql'|'postgres'|'oracle'|'dbml'|'schemarb'|'mssql'|'json'} format```
* ```{'mysql'|'postgres'|'oracle'|'dbml'|'mssql'|'json'} format```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

schemarb was removed because exporter does not support it the whole time

@huydo862003 huydo862003 force-pushed the fix/add-a-flag-to-exporter-to-disable-record-generation branch from 9c08aac to ffc5b08 Compare February 25, 2026 09:14
@huydo862003 huydo862003 force-pushed the fix/add-a-flag-to-exporter-to-disable-record-generation branch from ffc5b08 to 7c5dd94 Compare February 25, 2026 09:14
@huydo862003 huydo862003 force-pushed the fix/add-a-flag-to-exporter-to-disable-record-generation branch from 7c5dd94 to 64b8313 Compare February 25, 2026 09:19
@github-actions
Copy link

Coverage Report

Commit: c18f248

Overall Coverage

Metric Coverage
Lines ✅ 83.97% (5389/6418)
Statements ✅ 83.31% (5751/6903)
Functions ✅ 89.57% (1262/1409)
Branches ⚠️ 75.13% (2973/3957)

Package Coverage

Package Lines Statements Functions Branches
@dbml/dbml-cli ✅ 100.00% ✅ 100.00% ✅ 100.00% ✅ 100.00%
@dbml/dbml-connector ⚠️ 64.58% ⚠️ 64.39% ⚠️ 59.53% ⚠️ 59.13%
@dbml/dbml-core N/A N/A N/A N/A
@dbml/dbml-parse ✅ 87.31% ✅ 86.55% ✅ 93.76% ⚠️ 77.61%

⚠️ Coverage Warnings

The following packages have coverage below 80%:

  • @dbml/dbml-connector: 64.58% line coverage

Files with Coverage Below 80%

@dbml/dbml-connector

9 file(s) below 80% coverage
File Lines Statements Functions Branches
src/connectors/bigquery/index.ts 0.00% 0.00% 0.00% 0.00%
src/utils/credential-loader.ts 0.00% 0.00% 0.00% 0.00%
src/utils/helpers.ts 0.00% 0.00% 0.00% 0.00%
src/connectors/snowflake/index.ts 10.56% 10.31% 0.00% 0.00%
src/utils/parseSchema.ts 46.15% 42.85% 28.57% 27.27%
src/connectors/connector.ts 66.66% 66.66% 100.00% 57.14%
src/connectors/oracle/tables.ts 71.25% 67.39% 100.00% 56.96%
src/connectors/oracle/index.ts 80.00% 80.76% 100.00% 25.00%
src/connectors/oracle/utils.ts 85.71% 85.71% 100.00% 71.42%

@dbml/dbml-parse

39 file(s) below 80% coverage
File Lines Statements Functions Branches
src/compiler/queries/container/scope.ts 0.00% 0.00% 0.00% 100.00%
src/services/diagnostics/provider.ts 0.00% 0.00% 0.00% 0.00%
src/compiler/queries/parse.ts 50.00% 50.00% 50.00% 100.00%
src/core/interpreter/elementInterpreter/project.ts 51.42% 51.42% 100.00% 45.45%
src/core/interpreter/records/utils/data/sqlTypes.ts 56.25% 58.82% 75.00% 46.55%
src/core/analyzer/symbol/utils.ts 56.52% 56.52% 100.00% 50.00%
src/core/analyzer/binder/elementBinder/note.ts 62.50% 64.70% 83.33% 50.00%
src/compiler/queries/utils.ts 62.63% 63.82% 88.88% 46.15%
src/core/interpreter/records/utils/data/values.ts 65.13% 57.14% 72.72% 50.37%
src/compiler/queries/token.ts 66.66% 66.66% 66.66% 100.00%
src/core/analyzer/binder/elementBinder/enum.ts 72.22% 73.68% 100.00% 62.50%
src/core/analyzer/validator/elementValidators/note.ts 72.54% 70.90% 76.92% 68.75%
src/core/analyzer/validator/elementValidators/indexes.ts 73.33% 74.07% 90.90% 59.61%
src/core/analyzer/analyzer.ts 75.00% 66.66% 60.00% 100.00%
src/core/parser/utils.ts 75.00% 75.64% 100.00% 80.43%
src/core/analyzer/symbol/symbolIndex.ts 76.92% 77.50% 92.85% 50.00%
src/core/analyzer/utils.ts 77.77% 76.36% 88.88% 75.00%
src/core/analyzer/binder/elementBinder/project.ts 77.77% 78.94% 100.00% 50.00%
src/core/analyzer/validator/elementValidators/checks.ts 77.77% 79.31% 93.75% 71.87%
src/core/analyzer/validator/elementValidators/records.ts 78.08% 78.66% 93.75% 74.19%
src/core/analyzer/validator/elementValidators/project.ts 78.12% 78.78% 100.00% 56.25%
src/core/utils.ts 78.57% 77.41% 80.00% 60.71%
src/core/analyzer/binder/elementBinder/ref.ts 78.78% 80.00% 90.90% 75.00%
src/core/analyzer/binder/elementBinder/indexes.ts 79.06% 77.77% 90.90% 68.18%
src/core/analyzer/binder/elementBinder/tableGroup.ts 80.00% 80.64% 100.00% 50.00%
src/services/suggestions/utils.ts 80.39% 75.00% 92.85% 68.51%
src/core/interpreter/records/utils/constraints/pk.ts 82.00% 80.00% 92.30% 54.54%
src/core/analyzer/binder/elementBinder/records.ts 82.79% 83.33% 93.75% 71.42%
src/compiler/queries/container/token.ts 83.33% 85.71% 100.00% 75.00%
src/core/analyzer/validator/elementValidators/tablePartial.ts 83.43% 80.72% 87.23% 64.28%
src/core/parser/parser.ts 84.86% 85.03% 98.07% 77.44%
src/core/analyzer/binder/elementBinder/tablePartial.ts 86.00% 86.53% 100.00% 69.23%
src/services/suggestions/recordRowSnippet.ts 88.67% 84.61% 100.00% 78.00%
src/compiler/queries/symbol.ts 91.30% 92.00% 100.00% 78.57%
__tests__/utils/compiler.ts 92.92% 92.75% 100.00% 69.23%
src/core/interpreter/elementInterpreter/sticky_note.ts 95.00% 95.23% 100.00% 66.66%
src/core/interpreter/records/utils/constraints/unique.ts 96.15% 93.93% 100.00% 66.66%
src/core/analyzer/symbol/symbolTable.ts 100.00% 100.00% 100.00% 75.00%
src/services/definition/provider.ts 100.00% 100.00% 100.00% 75.00%

@huydo862003 huydo862003 merged commit 27c109d into master Feb 26, 2026
5 checks passed
@huydo862003 huydo862003 deleted the fix/add-a-flag-to-exporter-to-disable-record-generation branch February 26, 2026 03:38
@huydo862003 huydo862003 added the PR: New Feature 🚀 A type of pull request used for changelog categories label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 A type of pull request used for changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants