Assuming my initial impression was the intended design, I wonder if there would be similar issues with Java, Swift, and C runtimes that all share the underlying the export _relations_str call. Python and Node.js runtime are good because they are responsible for creating the Iterator before passing into the core.
After reading the docs on
export_relations
, I was under the impression that the following would work in the web wasm runtime:But it throws an error
invalid type: string \"my_relation_1\", expected a sequence at line 1 column 17
After trial and error, I found the correct call signature to be either
or, more surprisingly,
Assuming my initial impression was the intended design, I wonder if there would be similar issues with Java, Swift, and C runtimes that all share the underlying the
export _relations_str
call. Python and Node.js runtime are good because they are responsible for creating the Iterator before passing into the core.Related source here: https://github.com/cozodb/cozo/blob/f79c9b1c150ebb24d3e106be8f077c47f9a89b37/cozo-core/src/lib.rs#L283-L294
Related doc here: https://github.com/cozodb/cozo-docs/blob/6cf59929c4b13c8e647cb38297f32d9a9f4fccdc/source/nonscript.rst?plain=1#L16-L22