GithubHelp home page GithubHelp logo

orientdb-jdbc's Introduction

Project MOVED

OrientDB JDBC driver has been moved to OrientDB core modules: https://github.com/orientechnologies/orientdb/tree/develop/jdbc

OrientDB JDBC Driver

OrientDB (http://code.google.com/p/orient/) is a NoSql DBMS that support a subset of SQL ad query languge.
This project is an effort to develop a JDBC driver for OrientDB

Include in your projects

Orient-jdbc are deployed on sonatype’s maven repository. At the moment only snapshots are available, so

com.orientechnologies orientdb-jdbc 1.0-SNAPSHOT

How to build

Orient-jdbc uses maven, so do a

mvn install

How to build a jar-with-dependencies

Do a

mvn assembly:assembly

to obtain a jar with dependency included under target directory.

Just copy orientdb-jdbc-1.0-SNAPSHOT-all.jar to your classpath.

It is very usefull to include under applications such as DBVisualizer.

How can be used in my code?

The driver is registerd to the Java sql DriverManager and can be used to work with all the OrientDB database types: memory, local or remote.
The driver’s class is com.orientechnologies.orient.jdbc.OrientJdbcDriver.

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.getInt("@version");
rs.getString("@class");
rs.getString("@rid");

rs.getString("stringKey");
rs.getInt("intKey");

rs.close();
stmt.close();

The driver retrieve Orient metadata (rid,class and @version) only on direct queries.
Take a look at tests code to see more detailed examples.

orientdb-jdbc's People

Contributors

dritter-sap avatar fabriziofortino avatar luigidellaquila avatar lvca avatar robfrank avatar salvatore-piccione avatar vertex-npratt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.