Call method from query builder is not working well with string as procedure argument
katarinasupe opened this issue · comments
The call method from the query builder is constructing the query with procedure argument as stated in its docstring:
Python: call('json_util.load_from_url', 'https://some-url.com').yield_('objects').return_(results='objects').execute()
Cypher: CALL json_util.load_from_url(https://some-url.com) YIELD objects RETURN objects;
(docstring is also not written well and it is not generating correctly in the reference guide)
But, this is not correct, since json_util.load_from_url
has string argument. The correct query would be:
CALL json_util.load_from_url('https://some-url.com') YIELD objects RETURN objects;
Hence, if the procedure argument is a string, quotes should be around it. There is no test for this case currently.
Closing this, it works with:
call(
"json_util.load_from_url",
"'https://download.memgraph.com/asset/mage/data.json'",
)
.yield_("objects")
.return_(results="objects")
.execute()
but, the docstring should be fixed. (I can do that)