Java 列出远程OrientDB服务器上的数据库
是否有方法连接到远程OrientDB服务器并列出可用的数据库?我想要的是使用Java列出数据库。类似于这里使用的命令行:-连接到服务器实例 存档此文件的最低代码是什么 谢谢 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中的orientdb-server-config.xml中的根凭据,然后调用listDatabases API获取数据库列表 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中orientdb-server-config.xml中的根凭据,然后调用listDatabases API以获取数据库列表。假设根密码为root,如下所示:Java 列出远程OrientDB服务器上的数据库,java,database,orientdb,Java,Database,Orientdb,是否有方法连接到远程OrientDB服务器并列出可用的数据库?我想要的是使用Java列出数据库。类似于这里使用的命令行:-连接到服务器实例 存档此文件的最低代码是什么 谢谢 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中的orientdb-server-config.xml中的根凭据,然后调用listDatabases API获取数据库列表 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例
OServerAdmin server = new OServerAdmin("remote:localhost").connect("root", "root");
Set<String> dbsNames = server.listDatabases().keySet();
假设root密码是root,类似这样:
OServerAdmin server = new OServerAdmin("remote:localhost").connect("root", "root");
Set<String> dbsNames = server.listDatabases().keySet();