Created
January 14, 2022 17:38
-
-
Save samebchase/48107b480d771d42bb00771bb4520fdf to your computer and use it in GitHub Desktop.
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
test_json_values.new(j_field => ${:foo(1)}, k_val => Any) | |
{foo => 1} | |
test_json_values.new(j_field => Any, k_val => ${:foo(1)}) | |
(Any) | |
Use of uninitialized value element of type Any in string context. | |
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. | |
in sub from-json at /Users/samuel/.rakubrew/versions/moar-2021.12/install/share/perl6/site/sources/EA6CA341123ECF37C6657DBCBE16F4B077343BB6 (JSON::Fast) line 722 | |
test_json_values.new(j_field => Any, k_val => ${:foo(Any)}) | |
(Any) |
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
model test_json_values is table<test_json_values> is export { | |
has Json $.j_field is column; | |
has Json $.k_val is column; | |
} | |
sub fetch-nullable-json-values() is export { | |
for test_json_values.^all -> $val { | |
say $val; | |
say $val.j_field; | |
} | |
} |
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
-- | |
-- > select * from test_json_values; | |
-- j_field | k_val | |
-- -------------+---------------- | |
-- {"foo" : 1} | | |
-- | {"foo" : 1} | |
-- | {"foo" : null} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment