by istreamdata

istreamdata / orientgo

Go (golang) client for OrientDB

124 Stars 21 Forks Last release: Not found MIT License 263 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Build Status GoDoc

OrientGo is a Go client for the OrientDB database.

OrientGo Logo


OrientDB versions supported: 2.0.15 - 2.1.5

Not supported versions:

  • 2.1.0 (bug in OrientDB, see #28)
  • 2.1.3 (broken protocol, see #39)

Driver is no longer maintained and seeking for a new owner.


Original ogonori API is deprecated. Still, it's source code have been frozen in v1.0 branch. To use it, simply replace

imports with

Supported features:

  • Mostly any SQL queries, commands and batch requests.
  • Server-side scripts (via ScriptCommand or functions).
  • Command results conversion to custom types via mapstructure.
  • Direct CRUD operations on
  • Management of databases and record clusters.
  • Can be used for the golang
    API, with some cautions (see below).
  • Only supports OrientDB 2.x series.

Not supported yet:

  • OrientDB 1.x.
  • Servers with cluster configuration (not tested).
  • Fetch plans are temporary disabled due to internal changes.
  • Transactions in Go. Transactions in JS can be used instead.
  • Live queries.
  • Command results streaming (#26).
  • OrientDB CUSTOM type.
  • ORM-like API. See Issue #6.

Caveat on using OrientGo as a database/sql API driver

WARNING: database/sql API is disabled for now.

The golang

API has some constraints that can be make it painful to work with OrientDB. For example:
  • When you insert a record, the Go
    API only allows one to return a single int64 identifier for the record, but OrientDB uses as a compound int16:int64 RID, so getting the RID of records you just inserted requires another round trip to the database to query the RID.

Also, since OrientDB transactions are not supported, the

portion of the
API is not yet implemented.


You are welcome to initiate pull request and suggest a more user-friendly API. We will try to review them ASAP.

How to run functional tests:

1) Install Docker

2) Pull OrientDB image:

docker pull dennwc/orientdb:2.1


go test -v ./...


Dial example - dialexampletest.go


The MIT License

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.