Closed Acconut closed 1 year ago
I'm not entirely sure, but maybe this can be achieved by testing in Argument.parse
whether an identifier for the argument exists.
Got it, identifiers are currently only supported in addEdge()
. This definitely needs to be supported everywhere, in a generic way. This is indeed related to the Argument
class, which needs to be updated to support bound parameters (v0.7.0 milestone).
Until this is fixed, you can circumvent this limitation by supplying a formatted string to query()
:
query('g.idx("index").put("foo", "foo", %s)', 'i0');
should do the trick.
Thanks, I'll use this for now.
I think your workaround won't do it because 'i0'
will be inserted as a parameter and so ends up as a string.
I'll try following:
query('g.idx("index").put("foo", "foo", ' + foo.identifier + ')');
g.idx().put
ignores an elements identifier.It should generate following script: