You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Serg Salo (Jira)" <ji...@apache.org> on 2020/10/02 22:49:00 UTC
[jira] [Created] (TINKERPOP-2432) Generate correct bytecode in
Javascript
Serg Salo created TINKERPOP-2432:
------------------------------------
Summary: Generate correct bytecode in Javascript
Key: TINKERPOP-2432
URL: https://issues.apache.org/jira/browse/TINKERPOP-2432
Project: TinkerPop
Issue Type: Bug
Components: javascript
Reporter: Serg Salo
I have a very simple task - generate bytecode using typescript traversal.
for example:
const g = new Graph().traversal();
const q = g.V().hasLabel("airport").where(__.outE("route").hasId(7753));
const query = new translator("g" as any);
const bytecode = q.getBytecode();
console.log(`Bytecode: ${bytecode.toString()}`);
Here is what is generated:
Bytecode: [["V"],["hasLabel","airport"],["where",\{"graph":null,"traversalStrategies":null,"bytecode":{"sourceInstructions":[],"stepInstructions":[["outE","route"],["hasId",7753]]},"traversers":null,"sideEffects":null,"_traversalStrategiesPromise":null,"_traversersIteratorIndex":0}]]
Looks like it does the first level serialization correct, but the second level isn't properly serialized.
any suggestions what is wrong with this code?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)