Last active
July 31, 2018 12:40
-
-
Save djptek/ed018db079adb4385527231054dcdb10 to your computer and use it in GitHub Desktop.
test code and results for issue 3673
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def b2s (b) | |
if b | |
r = :true | |
else | |
r = :false | |
end | |
return r | |
end | |
puts "%12s |%12s |%12s |%12s |%32s" % [:arrays,:multi_prop,:updates,:wont_fit,:outcomes] | |
outcomes = [] | |
[true,false].each {|arrays| | |
[true,false].each {|multi_prop| | |
[true,false].each {|updates| | |
[true,false].each {|wont_fit| | |
outcomes = [] | |
outcomes << :denormalize unless (arrays and multi_prop) or updates or wont_fit | |
# comment out "unless updates" to test with/without arrow | |
outcomes << :nested if (arrays and multi_prop) unless updates | |
outcomes << :parent_child if (updates or wont_fit) | |
puts "%12s |%12s |%12s |%12s |%32s" % [b2s(arrays),b2s(multi_prop),b2s(updates),b2s(wont_fit),outcomes] | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arrays | multi_prop | updates | wont_fit | outcomes | |
true | true | true | true | [:parent_child] | |
true | true | true | false | [:parent_child] | |
true | true | false | true | [:nested, :parent_child] | |
true | true | false | false | [:nested] | |
true | false | true | true | [:parent_child] | |
true | false | true | false | [:parent_child] | |
true | false | false | true | [:parent_child] | |
true | false | false | false | [:denormalize] | |
false | true | true | true | [:parent_child] | |
false | true | true | false | [:parent_child] | |
false | true | false | true | [:parent_child] | |
false | true | false | false | [:denormalize] | |
false | false | true | true | [:parent_child] | |
false | false | true | false | [:parent_child] | |
false | false | false | true | [:parent_child] | |
false | false | false | false | [:denormalize] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arrays | multi_prop | updates | wont_fit | outcomes | |
true | true | true | true | [:nested, :parent_child] | |
true | true | true | false | [:nested, :parent_child] | |
true | true | false | true | [:nested, :parent_child] | |
true | true | false | false | [:nested] | |
true | false | true | true | [:parent_child] | |
true | false | true | false | [:parent_child] | |
true | false | false | true | [:parent_child] | |
true | false | false | false | [:denormalize] | |
false | true | true | true | [:parent_child] | |
false | true | true | false | [:parent_child] | |
false | true | false | true | [:parent_child] | |
false | true | false | false | [:denormalize] | |
false | false | true | true | [:parent_child] | |
false | false | true | false | [:parent_child] | |
false | false | false | true | [:parent_child] | |
false | false | false | false | [:denormalize] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment