Replies: 2 comments 6 replies
-
Created issue #288 and the work in progress will be on the branch https://github.com/ArcadeData/arcadedb/compare/custom-functions-poc. |
Beta Was this translation helpful? Give feedback.
6 replies
-
Closing this discussion as Part 1. Part 2 is on #1155. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
OrientDB supports custom functions written in any language supported by the JVM (mostly Javascript using Nashorn), so other DBMSs allow the user to create their own functions you can call from the query language or HTTP.
In ArcadeDB we could support this feature, by using the underlying advanced GraalVM infrastructure that allows to compile and execute multiple scripting languages on top of the JVM. We did this job already with Arcade Trader (https://arcadetrader.com) with a minimal IDE to edit the functions, syntax highlight, inline documentation, etc. We could totally port that piece of IDE into Studio.
Requirements in order of implementation and status update:
while(true);
database.getSchema().registerFunction("js", "sum", "function sum(a,b){ return a + b; }");
anddatabase.getSchema().registerFunction("java", "sum", "org.acme.Functions::sum");
arcadedb.startupScript
. Example:-Darcadedb.startupScript=/temp/myscript.sql
They are not Stored Procedures, because they are not stored. If you want to use them, register in the database at startup or before using them. This avoids all the issues with where to store them (files, internet types/buckets?), security about who can write, read and execute them, replication, an editor from the studio, and more.
Beta Was this translation helpful? Give feedback.
All reactions