Skip to content

SQL arrays and multisets could be nested#492

Merged
snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:nested
Oct 25, 2022
Merged

SQL arrays and multisets could be nested#492
snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:nested

Conversation

@snuyanzin

Copy link
Copy Markdown
Collaborator

Yes these things could be nested
e.g. this Schema

Schema.of(field("ints_ints", () -> new int[][]{new int[]{1}, null, new int[] {3, 4, 5}}))

allows to generate something like that

INSERT INTO "MyTable" ("ints_ints") VALUES (ARRAY[ARRAY[1], NULL, ARRAY[3, 4, 5]]);

and this one

Schema.of(field("array_multiset", () -> Collections.singletonList(Collections.singleton("value"))))

could help with generation of mix

INSERT INTO "MyTable" ("array_multiset") VALUES (ARRAY[MULTISET['value']]);

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #492 (f8f9404) into main (678c8b1) will increase coverage by 0.03%.
The diff coverage is 65.71%.

@@             Coverage Diff              @@
##               main     #492      +/-   ##
============================================
+ Coverage     92.86%   92.89%   +0.03%     
- Complexity     2163     2174      +11     
============================================
  Files           234      234              
  Lines          4581     4603      +22     
  Branches        487      492       +5     
============================================
+ Hits           4254     4276      +22     
- Misses          206      207       +1     
+ Partials        121      120       -1     
Impacted Files Coverage Δ
.../net/datafaker/transformations/SqlTransformer.java 83.83% <65.71%> (+0.22%) ⬆️
.../java/net/datafaker/service/FakeValuesService.java 87.36% <0.00%> (+0.64%) ⬆️

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

@snuyanzin
snuyanzin merged commit 0cc948e into datafaker-net:main Oct 25, 2022
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.

2 participants