Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

ympons/go-orientrest

Repository files navigation

Build Status orientrest - Orientdb client for Go

Orientrest Logo

Package orientrest is a Go client library providing access to the OrientDB document/graph database via its REST API.

Requirements

Go 1.4 or later is required.

Installation

go get -v github.com/ympons/go-orientrest

Usage

Init the client

client, err := orientrest.New("http://localhost:2480/")

Connect to the server to manage databases

Authenticate to the server

admin, err := client.Auth("user", "pass")

Close admin

admin.Close()

Create Database

_, err := admin.DbCreate("database_name", orientrest.DB_TYPE_GRAPH, orientrest.STORAGE_TYPE_PLOCAL)

Drop Database

err := admin.DbDrop("database_name")

Get the list of databases

list, err := admin.DbList()

Get the available languages

langs, err := admin.DbAvailableLangs("database_name")

Open a database

db, err := client.Open("database_name", "dbuser", "dbpassword")

Send a command

_, err := db.Command(NewCommandSQL("create class Person extends V"))

Make a query

result, err := db.Command(NewQuerySQL("select * from V"))

Close database

db.Close()

License

MIT License, see LICENSE.md.

About

[NOT MAINTAINED] Orientrest is a Go client library providing access to the OrientDB document/graph database via its REST API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages