buildRelationArray = (path, tableNameCache) => {
  if (path === ".")
    return [{ type: "Independent", table: "None (no relation)" }];
  const tokens = path.split(".");
  if (tokens.length === 2)
    return [{ type: "Own", table: `${tokens[1]} (same table)` }];
  else if (tokens.length >= 3) {
    const result = [];
    let currentTbl = tokens[1];
    for (const relation of tokens.slice(2)) {
      if (relation.indexOf("$") > 0) {
        const [inboundTbl, inboundKey] = relation.split("$");
        result.push({ type: "Inbound", table: inboundTbl, key: inboundKey });
        currentTbl = inboundTbl;
      } else {
        const srcTbl = tableNameCache[currentTbl];
        const fk = srcTbl.foreign_keys.find((fk) => fk.name === relation);
        if (fk) {
          const targetTbl = tableNameCache[fk.reftable_name];
          result.push({
            type: "Foreign",
            table: targetTbl.name,
            key: relation,
          });
          currentTbl = targetTbl.name;
        }
      }
    }
    return result;
  }
}
builder intern path method
@param path
@param tableNameCache
@returns