Skip to content
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

[Enhancement]support symbol for mysql importer #131

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

khoahuynhdev
Copy link
Contributor

Summary

This is valid in mysql

create table products (
  id int,
  name varchar(255),
  weight_measurement ENUM('lb', 'kg', '%'),
  primary key(`id`)
) engine=innodb default charset=utf8;

From dbdiagram mysql import
Screen Shot 2020-08-25 at 4 40 28 PM

The enhancement
Screen Shot 2020-08-25 at 4 43 13 PM

Lasting Changes (Technical)

  • Add supported symbol to 'ExpChar'

Checklist

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

  • Documentation (if necessary)
  • Tests (integration test/unit test)
  • Integration Tests Passed
  • Code Review

@@ -491,7 +491,7 @@ factor = factors:(character+ _ "(" expression ")"
/ (exprCharNoCommaSpace+ &(_/","/");"/endline");")) / exprChar+ &.) {
return _.flattenDeep(factors).join("");
}
exprChar = [\',.a-z0-9_+-\`]i
exprChar = [\',.a-z0-9_+-\`%]i
Copy link
Contributor

Choose a reason for hiding this comment

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

How about other characters ^?&*... anh?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we just need to cover % in this case because % is usually used as unit of measurement.
I haven't seen use cases for other characters so until the case arises, we can support them later.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok anh

@khoahuynhdev khoahuynhdev merged commit 0f5509f into master Aug 26, 2020
@phuongduyphan phuongduyphan added pkg: core PR: New Feature 🚀 A type of pull request used for changelog categories and removed enhancement New feature or request labels Dec 30, 2020
@coderabbitai coderabbitai bot mentioned this pull request Apr 25, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: core 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.

3 participants