Skip to content
lvca edited this page Dec 22, 2012 · 1 revision

JDBC Driver usage

Introduction

The home page of the JDBC driver is: https://github.com/robfrank/orientdb-jdbc

Download

Installation

Configuration

Usage

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();

Known limitations

Future

Clone this wiki locally