Skip to content

SQL arrays and multisets could be nested #492

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

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

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

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