-
Notifications
You must be signed in to change notification settings - Fork 213
Support sample table data in DBML #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hdnax
wants to merge
215
commits into
master
Choose a base branch
from
feat/sample-table-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e75ad9b to
7a79669
Compare
447eb87 to
509240a
Compare
4fb94da to
20f2cb1
Compare
b245e94 to
9fa707d
Compare
6b9699e to
9aa84ab
Compare
Co-authored-by: NQPhuc <11730168+NQPhuc@users.noreply.github.com>
9187af4 to
1cfebc2
Compare
Coverage ReportCommit: 8aad597 Overall Coverage
Package 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
38 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% | 36.36% |
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 |
64.83% | 65.95% | 88.88% | 52.11% |
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/validator/elementValidators/indexes.ts |
72.00% | 72.83% | 90.90% | 57.69% |
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/analyzer.ts |
75.00% | 66.66% | 60.00% | 100.00% |
src/core/analyzer/binder/elementBinder/ref.ts |
75.75% | 77.14% | 90.90% | 70.00% |
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/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% | 71.42% |
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% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add support for sample table data in DBML.
Doc: https://github.com/holistics/dbml/blob/78d79441758adc973376a18531b8d0b3807f9208/dbml-homepage/docs/docs.md
TDD: https://www.notion.so/holistics/TDD-80-Sample-Table-Data-2e6f89dc7e498073ac17c09a842aa64b
Support CommaExpressionNode in parser
CommaExpressionNodeto AST for comma-separated value lists1.23e5,-4.56e-3)Support sample table data in DBML
Handle INSERT statements in importers and exporters
Exporters: Convert
RecordstoINSERTstatements for all SQL dialects (MySQL, PostgreSQL, Oracle, MSSQL, Snowflake) with automatic FK constraint handlingImporters: Parse
INSERTstatements from SQL and convert to DBMLRecords, including Snowflake supportAdd diagnostics provider for reusable logic related to errors and warnings
DBMLDiagnosticsProviderclass withprovideDiagnostics(),provideErrors(),provideWarnings()methodsOthers
Hardcode Report<T, E> to Report
Eis now alwaysCompileError, alsoCompileWarningis supportedgetErrors()andgetWarnings()methodsExpose reusable SQL type checking and value extraction functions
isSqlNumericType(),isSqlStringType(),isSqlDateTimeType(),isSqlBooleanType()tryExtractBoolean(),tryExtractInteger(),tryExtractFloat(),tryExtractString(),tryExtractDate(),tryExtractDateTime(),tryExtractTime()normalizeRecordValue(),addDoubleQuoteIfNeeded()Issue
(issue link here)