Changeset: 7519d933dee5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7519d933dee5
Modified Files:
monetdb5/modules/atoms/json_atom.mal
sql/scripts/40_json.sql
sql/test/json/Tests/components.sql
Branch: default
Log Message:
Fix return types
diffs (52 lines):
diff --git a/monetdb5/modules/atoms/json_atom.mal
b/monetdb5/modules/atoms/json_atom.mal
--- a/monetdb5/modules/atoms/json_atom.mal
+++ b/monetdb5/modules/atoms/json_atom.mal
@@ -121,11 +121,11 @@ pattern nest(k:bat[:oid,:dbl]):json
address JSONnest
comment "Combine the value list into a single json array object.";
-command keyarray(val:json):str
+command keyarray(val:json):json
address JSONkeyArray
comment "Expands the outermost JSON object keys into a JSON array.";
-command valuearray(val:json):str
+command valuearray(val:json):json
address JSONvalueArray
comment "Expands the outermost JSON object values into a JSON array.";
diff --git a/sql/scripts/40_json.sql b/sql/scripts/40_json.sql
--- a/sql/scripts/40_json.sql
+++ b/sql/scripts/40_json.sql
@@ -62,10 +62,10 @@ create function json.length(js json)
returns integer external name json.length;
create function json.keyarray(js json)
-returns table ( nme json) external name json.keyarray;
+returns json external name json.keyarray;
create function json.valuearray(js json)
-returns table ( val json) external name json.valuearray;
+returns json external name json.valuearray;
create function json.text(js json)
returns string external name json.text;
diff --git a/sql/test/json/Tests/components.sql
b/sql/test/json/Tests/components.sql
--- a/sql/test/json/Tests/components.sql
+++ b/sql/test/json/Tests/components.sql
@@ -1,4 +1,4 @@
-create table jsoncomp(js json);
+create table jsoncomp(j json);
insert into jsoncomp values(
'{"myBoolean":true,"myList":["a","b"],"myMap":{"c":"d","a":"b"},"myObject":"myClass","myJsonObject":{"myString":"myStringValue"}}');
select * from jsoncomp;
@@ -9,7 +9,7 @@ set js:= '{"myBoolean":true,"myList":["a
select json.keyarray(js);
select json.valuearray(js);
-select json.keyarray(js) from jsoncomp;
-select json.valuearray(js) from jsoncomp;
+select json.keyarray(j) from jsoncomp;
+select json.valuearray(j) from jsoncomp;
drop table jsoncomp;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list