I'm running on 2.2.10 Community. On Wed, Sep 21, 2016 at 2:43 PM, Ivan Mainetti <user.work...@gmail.com> wrote:
> Hi, > which version of Orientdb are you using? > > > Il giorno mercoledì 21 settembre 2016 22:16:21 UTC+2, William ha scritto: >> >> Hi, >> >> I have a simple graph with date information on each node in which the >> vertices are: >> >> id,date >> A,2014-01-02 >> B,2015-01-02 >> C,2016-01-02 >> D,2013-06-01 >> E,2014-06-01 >> F,2016-06-01 >> >> I'm trying to put together something that would let me generate edges >> between nodes that occur on some date to a node with the same date on the >> following year. For the vertices above, I'd end up with: >> >> A -> B -> C >> D -> E >> F >> >> I have put together a quick and dirty JS function to do this called >> createSameDayOfYearEdges(). I add it into the graph using a console call >> that executes a CREATE FUNCTION call. If I fire up Studio after creating >> the graph from my scripts, its there and running the query "SELECT >> createSameDayOfYearEdges()" works properly... but if I try to run it using >> that SELECT from the console it does not work. The error message I'm >> seeing says: >> >> >> orientdb {db=test-add_edge_by_date.orientdb}> SELECT >> createSameDayOfYearEdges() >> >> Error: >> com.orientechnologies.orient.core.command.script.OCommandScriptException: >> Error on parsing script at position #0: Error on execution of the script >> Script: createSameDayOfYearEdges >> ------^ >> DB name="test-add_edge_by_date.orientdb" >> >> Error: javax.script.ScriptException: TypeError: orient.getGraph is >> not a function in <eval> at line number 2 >> Error: <eval>:2 TypeError: orient.getGraph is not a function >> >> >> This is a little confusing to me, it would appear that it's trying to >> execute the script but I'm getting an error... >> >> Is it possible to get my function to run from the console, or do I need >> to approach something like this differently? >> >> Thanks! >> -William >> > -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "OrientDB" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/orient-database/dQalR3e3AS8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > orient-database+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.