Hi, 

I'm currently working on implementing  OrientDB functions as a simple way 
to implement a REST interface for commonly needed functionalities.
There are multiple ways to interact with the database from these functions.

The official documentation <http://orientdb.com/docs/last/Functions.html> 
relies 
on using functions like:

   -   orient.getDatabase().query("select from ouser");
   - var results = gdb.command( "sql", "select from Employee where company 
   = ?", [ "Orient Technologies" ] );


However some examples on a blog post 
<http://pizzaconnections.net/2015/04/02/orientdb-functions-by-samples-1/> 
on functions use more specific functions like:

   - var v=mydb.addVertex('class:Person');
   - v.setProperty('name',name);
   - vertex.getEdges(Direction.OUT,"label");
   
 
These last seem to rely on the Java API 
<http://orientdb.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientVertex.html#getEdges-Direction-java.lang.String...->
 but 
not all functions map 1-to-1 in Javascript. For example the 
vertex.addEdge(Direction.OUT, "edgeClass") doesn't work because the 
Direction enum isn't recognised in the JavaScript environment.

So what are the best practices related to accessing the database from 
OrientDB Functions? Using queries and commands or more specific functions 
and classes from the Java API? In the latter case, is there any 
documentation on which functionalities of the Java API are available in the 
JavaScript environment? 


P.S.: I really like OrientDB so far, keeps getting better and better at 
every release. Keep up the good work!

Kind Regards, 

Christopher



-- 

--- 
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.

Reply via email to