Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
We already have the OCommandScript class that execute a script at the server side. Now we could use this feature to specify "SQL" as scripting language with few, simple and powerful features taken from issue #2056.
If you execute a OCommandScript request passing SQL as language, all the SQL is supported and these commands more:
database.open("admin", "admin"); String cmd = ""; cmd += "begin"; cmd += "\nlet a = create vertex set script = true"; cmd += "\nlet b = select from v limit 1"; cmd += "\ncreate edge from $a to $b retry 100"; cmd += "\ncommit"; cmd += "\nreturn $a"; Object result = database.command(new OCommandScript("sql", cmd)).execute();
This is very useful to manipulate the graph at the server side with just one network call.