Sunrise
Sunrise

Reputation: 71

Can the server side JS function access another OrientDB directly?

In our SaaS system(one database per tenant), tenants need to communicate with each other. To support this, we hope that javascript functions created in OrientDB 1 can connect and query another OrientDB 2.

I tried like that. enter image description here I can not fix the bug. Maybe, I misused the JS API. Please help!

Upvotes: 1

Views: 49

Answers (1)

Lvca
Lvca

Reputation: 9060

You can do that from functions with:

var extdb = new com.orientechnologies.orient.core.command.script.OScriptDocumentDatabaseWrapper("remote:192.168.1.182/db2");
extdb.open("admin","admin");

Upvotes: 1

Related Questions