dashjoin / platform

Dashjoin Is an Open Source & Cloud Native Low Code Development and Integration Platform that helps teams deliver applications faster 🚀 Uses a data-driven approach inspired by Linked Data to make use of your existing assets
https://dashjoin.com
GNU Affero General Public License v3.0
93 stars 9 forks source link

Allow using a second DJ instance as a database #307

Open aeberhart opened 1 year ago

aeberhart commented 1 year ago

We have three ways of interacting with remote systems:

Setting a relationship that points to another system

Using a RemoteDatabase

Using another DJ as a Database

aeberhart commented 1 year ago

implementation notes


  @Override
  public Map<String, Object> connectAndCollectMetadata() throws Exception {
    Map<String, Object> res =
        (Map<String, Object>) call("crud/config/dj-database/" + e("dj/" + this.database), null);
    res = (Map<String, Object>) res.get("tables");
    for (Entry<String, Object> entry : res.entrySet()) {
      Map<String, Object> table = (Map<String, Object>) entry.getValue();
      table.put("parent", ID);
      table.put("ID", ID + "/" + e(entry.getKey()));
      // TODO: change props also
    }
    System.out.println(res);
    return res;
  }
aeberhart commented 1 year ago

if possible, integrate this into the RemoteDatabase driver