Skip to content

Add support for table schema in sql transformer#472

Merged
snuyanzin merged 1 commit intodatafaker-net:mainfrom
snuyanzin:tableschema
Oct 23, 2022
Merged

Add support for table schema in sql transformer#472
snuyanzin merged 1 commit intodatafaker-net:mainfrom
snuyanzin:tableschema

Conversation

@snuyanzin
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Collaborator

panilya commented Oct 23, 2022

@snuyanzin Could you please add documentation for SQL format?

@snuyanzin
Copy link
Copy Markdown
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