Hi Hung, Hmm.. seems that command is not documented. I'll create an issue to document it.
as for syntax, seems square brackets should not be used, try this: create function test "return a + b" PARAMETERS a,b IDEMPOTENT true LANGUAGE Javascript Best regards, Artem Orobets * Orient Technologiesthe Company behind OrientDB* 2014-05-29 12:14 GMT+03:00 Hung Tran <[email protected]>: > Hi, > > I have read entire the document, and look in forum, but i cannot see a way > to create a JS function from JavaAPI, or from Console. I know we could > create it from Studio, however I need to do it with JavaAPI, or Console. > > I have found the syntax to create it, but there is no example or any > explanation about it. > " > CREATE FUNCTION <name> <code> [PARAMETERS [<comma-separated list of > parameters' name>]] [IDEMPOTENT true|false] [LANGUAGE <language>] > " > > orientdb {test}> create function test "return a + b" PARAMETERS [a,b] > IDEMPOTENT true LANGUAGE Javascript > > => it created a SQL function without parameter instead of a JS function > with (a,b) parameters > > Any help will be very appreciated! > > My Best, > Hung Tran > > -- > > --- > 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
