Support OracleSQL importer#775
Merged
huydo862003 merged 17 commits intomasterfrom Nov 18, 2025
Merged
Conversation
8329b78 to
6d04628
Compare
6d04628 to
6579ba4
Compare
a19772a to
b57efb7
Compare
4 tasks
b6d1895 to
d9c79ee
Compare
…T_KIND in Oracle parser
ae0792c to
805f384
Compare
NQPhuc
reviewed
Nov 18, 2025
NQPhuc
reviewed
Nov 18, 2025
| // : REFERENCES tableview_name paren_column_list? (ON DELETE (CASCADE | SET NULL_))? | ||
| // ; | ||
| visitReferences_clause (ctx) { | ||
| if (!ctx.paren_column_list()) throw createCompilerError(ctx.tableview_name(), 'Importing a foreign key with implicit referenced columns is not supported'); |
Contributor
There was a problem hiding this comment.
Should we ignore the reference clauses that don't have column list instead of throwing error?
Contributor
Author
There was a problem hiding this comment.
I don't think we should ignore the reference clauses. It should be explicit that we doesn't support implicit reference clauses. Imagine the 2 scenarios:
- If we throw an unsupported error:
- The user uses dbml importer to import into DBML with some implicit reference clauses.
- The dbml importer reports that implicit reference clauses are unsupported.
- The user goes back and replaces all implicit reference clauses with explicit clauses.
- The user try import again.
-> A little annoying but the user knows right away what's the problem is.
- If we just ignore them:
- The user uses dbml importer to import into DBML with some implicit reference clauses.
- dbml importer succeeds without any notice.
- The user if notices this would be confused. Worse, if the user doesn't notice this, they would totally miss it and may only find it some days later.
- The user either edits the output dbml or if they can guess that the implicit references are what causes the issues, they may edits the original sql.
-> Annoying and confusing.
I think a decent reconcillation is to not throw an error but notify them about the implicit references. However, this would not work in dbdiagram.
Contributor
There was a problem hiding this comment.
In these cases, I think it would be better if we can throw warning to let the user known, but not necessarily an full blown error that cause the import to fail. But this can be reworked in later PRs
NQPhuc
reviewed
Nov 18, 2025
NQPhuc
reviewed
Nov 18, 2025
42b6c32 to
e5fedd3
Compare
e5fedd3 to
913a985
Compare
NQPhuc
approved these changes
Nov 18, 2025
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
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
In the below table, the following notation is used:
name(...)name[...]CLUSTERED/NONCLUSTEREDFULLTEXTSPATIALUSING HASH/BTREEAUTO_INCREMENTSERIAL/BIG SERIALIDENTITYGENERATED ... AS IDENTITYIssue
(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)
class EmailValidatorto validate email address' validity)Tenant#is_trial?check)Checklist
Please check directly on the box once each of these are done