Skip to content

[DBX-7354] Feat: Support Metadata block for Dep - #1011

Open
xuantho573 wants to merge 4 commits into
masterfrom
feat/support-metadata-for-dep
Open

xuantho573 wants to merge 4 commits into
masterfrom
feat/support-metadata-for-dep

Conversation

@xuantho573

Copy link
Copy Markdown
Member

Summary

  • Short summary of the task, what have been done etc
  • Please include screenshots whenever possible (important).

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)
  • Updated dbml-homepage/static/llms.txt (if docs/features changed)
  • Lint Checks Passed
  • Unit Tests Passed
  • Coverage Tests Passed
  • Integration Tests Passed
  • Code Review

@xuantho573 xuantho573 changed the title feat: support metadata for dep [DBX-7354] Feat: Support Metadata block for Dep Oct 20, 2026
@linear-code

linear-code Bot commented Oct 20, 2026

Copy link
Copy Markdown

DBX-7354

@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-ref branch 6 times, most recently from 8487efd to d57508d Compare October 27, 2026 06:47
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-ref branch 7 times, most recently from 982dc08 to 5bcd5ae Compare October 28, 2026 08:09
@xuantho573
xuantho573 added this pull request to stack #1026 October 28, 2026 08:28
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-ref branch 14 times, most recently from 3205acb to 9c616af Compare October 30, 2026 03:25
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-ref branch 8 times, most recently from 680b5a3 to 14b34cd Compare November 2, 2026 07:18
@xuantho573
xuantho573 removed this pull request from stack #1026 November 2, 2026 07:24
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-ref branch 3 times, most recently from f43b1e9 to 81ce3be Compare November 6, 2026 04:09
@xuantho573
xuantho573 changed the base branch from feat/support-metadata-for-ref to master November 6, 2026 08:51
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-dep branch 2 times, most recently from 7e0a4f3 to 35c8e30 Compare November 10, 2026 08:37
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Benchmark Result

dbml-parse

suite 🏠 master 🔀 this branch change
18k 2914.864ms ±1.23% 3323.407ms ±3.06% 🔴 +14.0%
25k 4283.508ms ±5.72% 4833.629ms ±4.69% 🔴 +12.8%

@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-dep branch from 35c8e30 to 58f17b5 Compare November 10, 2026 09:16
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Coverage Report

Commit: dd9c4eb

Overall Coverage

Metric Coverage
Lines ✅ 87.00% (11090/12747)
Statements ✅ 84.16% (12203/14499)
Functions ✅ 90.04% (2323/2580)
Branches ⚠️ 75.54% (7614/10080)

Package Coverage

Package Lines Statements Functions Branches
dbml-cli ✅ 100.00% ✅ 100.00% ✅ 100.00% ✅ 100.00%
dbml-connector ⚠️ 65.68% ⚠️ 65.74% ⚠️ 63.58% ⚠️ 60.44%
dbml-core N/A N/A N/A N/A
dbml-parse ✅ 88.70% ✅ 85.54% ✅ 91.93% ⚠️ 76.38%

⚠️ Coverage Warnings

The following packages have coverage below 80%:

  • dbml-connector: 65.68% line coverage

Files with Coverage Below 80%

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/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/utils/parseSchema.ts 84.61% 82.85% 78.57% 72.72%
src/connectors/oracle/utils.ts 85.71% 85.71% 100.00% 71.42%

dbml-parse

94 file(s) below 80% coverage
File Lines Statements Functions Branches
src/compiler/queries/container/scope.ts 0.00% 0.00% 0.00% 0.00%
src/core/global_modules/program/utils/records.ts 0.00% 0.00% 0.00% 0.00%
src/services/code_actions/provider.ts 0.00% 0.00% 0.00% 0.00%
src/services/diagnostics/provider.ts 0.00% 0.00% 0.00% 0.00%
src/services/suggestions/crossFile.ts 19.35% 19.44% 33.33% 9.09%
src/compiler/queries/pipeline/interpret.ts 48.48% 53.24% 66.66% 71.87%
src/core/local_modules/enum/index.ts 50.98% 50.00% 57.14% 57.50%
src/core/global_modules/project/interpret.ts 57.50% 51.11% 83.33% 30.76%
src/core/global_modules/records/utils/data/values.ts 59.18% 51.18% 70.00% 45.16%
src/core/global_modules/enum/bind.ts 60.00% 62.50% 83.33% 37.50%
src/core/types/report.ts 62.96% 56.66% 76.92% 57.14%
src/compiler/queries/legacy/token.ts 66.66% 66.66% 66.66% 100.00%
src/core/local_modules/program/index.ts 66.66% 69.23% 75.00% 62.50%
src/core/parser/utils.ts 68.20% 68.57% 100.00% 74.04%
src/core/types/symbol/symbols.ts 68.26% 59.94% 70.14% 52.40%
src/core/global_modules/note/bind.ts 69.23% 71.42% 83.33% 50.00%
src/core/local_modules/checks/index.ts 69.23% 75.00% 100.00% 64.28%
src/core/local_modules/indexes/validate.ts 70.76% 70.76% 89.47% 56.81%
src/core/local_modules/note/validate.ts 70.96% 67.64% 75.00% 63.63%
src/core/local_modules/project/index.ts 73.07% 73.07% 100.00% 68.18%
src/core/global_modules/project/bind.ts 73.33% 75.00% 100.00% 50.00%
src/core/local_modules/tablePartial/validate.ts 73.80% 73.04% 81.33% 58.42%
src/core/local_modules/use/index.ts 73.91% 75.00% 75.00% 81.25%
src/compiler/queries/utils.ts 76.00% 76.15% 92.30% 57.44%
src/core/local_modules/custom/index.ts 76.47% 76.19% 80.00% 75.00%
src/core/global_modules/records/utils/data/sqlTypes.ts 76.59% 80.64% 82.35% 72.22%
src/core/global_modules/tablePartial/interpret.ts 77.41% 70.09% 77.77% 53.12%
src/core/local_modules/metadata/index.ts 77.77% 76.92% 75.00% 75.00%
src/services/suggestions/utils/index.ts 78.57% 78.57% 100.00% 65.51%
__tests__/utils/compiler.ts 79.31% 77.31% 100.00% 55.64%
src/core/global_modules/tableGroup/bind.ts 79.31% 80.00% 100.00% 57.14%
src/core/types/relation.ts 79.31% 73.52% 58.33% 80.00%
src/core/global_modules/indexes/bind.ts 80.00% 79.59% 92.30% 76.92%
src/core/global_modules/ref/bind.ts 80.00% 80.64% 90.00% 70.00%
src/core/global_modules/utils.ts 80.24% 77.27% 72.72% 65.51%
src/core/global_modules/records/utils/constraints/helper.ts 81.08% 80.48% 82.35% 76.47%
src/core/local_modules/checks/validate.ts 81.25% 82.69% 93.75% 70.00%
src/core/local_modules/diagramView/validate.ts 81.33% 78.04% 84.21% 72.72%
src/core/local_modules/project/validate.ts 82.14% 82.75% 100.00% 68.75%
src/core/local_modules/records/index.ts 82.50% 83.33% 100.00% 74.46%
src/core/global_modules/indexes/interpret.ts 82.60% 74.07% 100.00% 61.76%
src/core/global_modules/records/bind.ts 82.92% 83.72% 93.75% 67.30%
src/compiler/queries/container/token.ts 83.33% 85.71% 100.00% 75.00%
src/core/local_modules/records/validate.ts 83.95% 84.70% 95.23% 75.36%
src/core/parser/parser.ts 84.04% 84.38% 98.50% 76.96%
src/core/local_modules/enum/validate.ts 84.12% 80.88% 81.25% 75.00%
src/compiler/queries/legacy/parse.ts 84.61% 73.33% 66.66% 50.00%
src/compiler/queries/transform/syncDep.ts 84.84% 84.21% 100.00% 63.33%
__tests__/utils/mocks.ts 85.71% 86.20% 75.00% 100.00%
src/core/local_modules/dep/validate.ts 85.91% 81.01% 92.30% 71.62%
src/core/global_modules/tablePartial/bind.ts 86.79% 87.27% 100.00% 71.42%
src/services/suggestions/utils/useMerger.ts 86.95% 81.13% 100.00% 46.34%
src/services/suggestions/provider.ts 87.56% 83.86% 92.85% 74.78%
src/core/global_modules/tableGroup/interpret.ts 87.80% 88.09% 100.00% 68.75%
src/services/suggestions/recordRowSnippet.ts 88.46% 87.09% 100.00% 73.80%
src/core/local_modules/tableGroup/validate.ts 88.57% 87.80% 100.00% 79.16%
src/compiler/queries/nodeAtPosition.ts 88.88% 90.00% 100.00% 75.00%
src/core/global_modules/note/interpret.ts 88.88% 89.28% 100.00% 70.00%
src/core/global_modules/diagramView/index.ts 89.16% 86.23% 83.33% 78.18%
src/core/global_modules/use/index.ts 89.52% 85.82% 100.00% 79.54%
src/core/utils/note.ts 89.65% 87.14% 100.00% 78.33%
src/compiler/queries/transform/updateElementMetadata.ts 90.27% 82.95% 90.00% 75.71%
src/core/global_modules/records/index.ts 90.90% 87.15% 100.00% 79.16%
src/compiler/queries/transform/updateElementSetting.ts 91.13% 91.11% 100.00% 75.78%
src/core/global_modules/table/index.ts 91.75% 89.86% 100.00% 77.29%
src/core/types/symbol/metadata.ts 91.83% 81.77% 96.77% 68.69%
src/core/global_modules/table/interpret.ts 92.20% 83.97% 96.15% 64.70%
src/compiler/index.ts 92.30% 92.36% 80.00% 77.19%
src/core/global_modules/schema/index.ts 92.85% 83.84% 92.85% 73.58%
src/core/local_modules/table/index.ts 93.70% 94.26% 100.00% 79.11%
src/core/global_modules/diagramView/interpret.ts 94.54% 90.40% 92.85% 75.75%
src/core/arch/syntax.ts 95.37% 89.90% 100.00% 78.30%
src/core/global_modules/records/utils/constraints/pk.ts 95.65% 92.18% 96.66% 67.85%
__tests__/examples/interpreter/multifile/utils.ts 96.00% 89.65% 100.00% 62.50%
src/core/global_modules/records/interpret.ts 96.00% 92.63% 100.00% 79.85%
src/core/global_modules/ref/interpret.ts 96.07% 94.44% 100.00% 78.84%
src/compiler/queries/canonicalName.ts 96.96% 92.10% 100.00% 76.66%
src/core/global_modules/program/interpret.ts 98.37% 94.98% 100.00% 79.19%
src/core/global_modules/dep/interpret.ts 98.61% 97.50% 100.00% 77.96%
src/core/global_modules/arch/interpret.ts 98.66% 91.76% 100.00% 79.54%
src/compiler/queries/transform/renameTable.ts 99.30% 89.34% 100.00% 74.16%
src/compiler/queries/files/reachableFiles.ts 100.00% 100.00% 100.00% 75.00%
src/compiler/queries/transform/utils/dep.ts 100.00% 89.58% 100.00% 75.00%
src/compiler/queries/transform/utils/ref.ts 100.00% 83.72% 100.00% 64.70%
src/core/global_modules/arch/utils.ts 100.00% 92.30% 100.00% 78.78%
src/core/global_modules/checks/interpret.ts 100.00% 88.88% 100.00% 60.00%
src/core/global_modules/dep/bind.ts 100.00% 81.96% 100.00% 73.17%
src/core/global_modules/metadata/bind.ts 100.00% 91.66% 100.00% 77.77%
src/core/global_modules/metadata/interpret.ts 100.00% 86.66% 100.00% 55.55%
src/core/global_modules/metadata/utils.ts 100.00% 92.06% 100.00% 76.66%
src/core/global_modules/program/index.ts 100.00% 85.71% 100.00% 75.00%
src/core/global_modules/records/utils/constraints/unique.ts 100.00% 93.75% 100.00% 50.00%
src/core/utils/diagnostics_reporter/ref.ts 100.00% 100.00% 100.00% 70.83%
src/services/definition/provider.ts 100.00% 93.87% 100.00% 76.31%

@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-dep branch 4 times, most recently from ec5aaaf to 48a00cf Compare November 11, 2026 09:27
@xuantho573
xuantho573 marked this pull request as ready for review November 12, 2026 03:29
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-dep branch from 48a00cf to 3e13fec Compare November 12, 2026 07:37
xuantho573 and others added 4 commits November 12, 2026 14:37
- Dep is not a symbol: `Metadata Dep <name>` targets the named DepMetadata
  through a shared kind-keyed lookup (getProgramNamedMetadata), replacing
  getProgramNamedRefs
- `Metadata Ref|Dep` headers accept `name` or `schema.name`; a bare name
  means `public`, anything else that does not match is a not-found error
- Dep promotes color and note (DEP_METADATA_FIELDS); Dep.metadata is now
  CustomMetadata and inline values follow the Ref grammar (bare identifiers
  are rejected)
- Services: Dep target-kind and name completion, go-to-definition and
  find-references via getNamedTargetAt
- dbml-core: Dep.metadata is CustomMetadata (default {}), the exporter writes
  the dep name, color and typed custom values
- Docs and playground sample updated

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xuantho573
xuantho573 force-pushed the feat/support-metadata-for-dep branch from 3e13fec to ffb59ea Compare November 12, 2026 07:37

This branch has not been deployed

No deployments
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.

1 participant