forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
lvca edited this page Dec 10, 2012
·
1 revision
The home page of the JDBC driver is: https://github.com/robfrank/orientdb-jdbc
Use your knowledge of JDBC API to work against OrientDB. First get a connection Properties info = new Properties(); info.put("user", "admin"); info.put("password", "admin"); Connection conn = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:remote:localhost/test", info); Then execute a Statement and get the ResultSet Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT stringKey, intKey, text, length, date FROM Item");
rs.next();
rs.getString("stringKey");
rs.getInt("intKey");
rs.close();
stmt.close();