[orientdb] Server-side function: unable to read new/updated data from within same transaction

2016-05-23 Thread Jean-Sebastien Lemay
I'm trying to figure out if it will be possible for me to split my logic between multiple server-side functions. For that to work, I need to make sure that data created/edited in one function call can be read by other subsequent functions within the same transaction. So far, that's not working

[orientdb] server side function bug/behavior, NativeArray

2014-11-15 Thread Erik Peterson
I have written a server side javascript function that behaves as expected in 1.7.3 but not 1.7.9. Is this a know issue or expected behavior? Any work arounds? Thanks. *Here the code for function split(inputString,separator)* var r; if (inputString !== null && inputString !== undefined) {r = inp

Re: [orientdb] Server Side Function

2014-02-19 Thread Thomas Kennedy
Thanks Luigi. Is there anything on using the OrientDB API with Javascript. As in where to see methods available like "field" as shown above. I thought that when writing code in the text pane that is was purely ecmascript. I have just started using orient so just feeling my way around. On W

Re: [orientdb] Server Side Function

2014-02-19 Thread Luigi Dell'Aquila
You are right, the documentation about this aspect is not so clear (here is the link https://github.com/orientechnologies/orientdb/wiki/Functions ). The result of every function call is serialized in JSON when sent to the client, but inside the function you are using native OrientDB API: the "db"

Re: [orientdb] Server Side Function

2014-02-19 Thread Thomas Kennedy
Thanks Luigi. Not sure if that is explicitly stated enough in the documentation. Going by the documentation I would of thought that the return type was a Javascript JSON object. Can you point me to any documentation on this? Much appreciated On Wednesday, 19 February 2014 08:12:56 UTC, Luig

Re: [orientdb] Server Side Function

2014-02-19 Thread Luigi Dell'Aquila
Hi Thomas, test[0] is actually an ODocument (a Java object). Just try this: test[0].field("name") Luigi 2014-02-19 3:23 GMT+01:00 Thomas Kennedy : > Hi, > > I am using the 1.7-rc1 version and have attempted to access an element on > JSON object that is returned and receive a blank value. I ex

[orientdb] Server Side Function

2014-02-19 Thread Thomas Kennedy
Hi, I am using the 1.7-rc1 version and have attempted to access an element on JSON object that is returned and receive a blank value. I execute the code on the studio thru the function section. var test = db.query("select from OUser"); var thename = test[0]["name"]; //also tried this //var th