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

Add support for table schema in sql transformer #472

Merged
merged 1 commit into from
Oct 23, 2022

Conversation

snuyanzin
Copy link
Collaborator

Now it's possible to specify sql table schema like

SqlTransformer<String> transformer =
            new SqlTransformer.SqlTransformerBuilder<String>()
                .schemaName("MySchema").tableName("MyTable").dialect(SqlDialect.MSSQL).build();
transformer.generate(Schema.of(field("nullValue", () -> null)), 1)

possible output is

INSERT INTO [MySchema].[MyTable] ([nullValue]) VALUES (null);

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2022

Codecov Report

Merging #472 (dfe1d4c) into main (295c132) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #472      +/-   ##
============================================
+ Coverage     93.08%   93.10%   +0.01%     
- Complexity     2106     2111       +5     
============================================
  Files           233      233              
  Lines          4384     4394      +10     
  Branches        450      451       +1     
============================================
+ Hits           4081     4091      +10     
  Misses          186      186              
  Partials        117      117              
Impacted Files Coverage Δ
.../net/datafaker/transformations/SqlTransformer.java 72.16% <100.00%> (+3.19%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@snuyanzin snuyanzin merged commit 4987ed6 into datafaker-net:main Oct 23, 2022
@panilya
Copy link
Collaborator

panilya commented Oct 23, 2022

@snuyanzin Could you please add documentation for SQL format?

@snuyanzin
Copy link
Collaborator Author

still in my todo list, however not sure about this week, hopefully next one

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.

3 participants