Package orientrest
is a Go client library providing access to
the OrientDB document/graph database via its REST API. Orientrest
was inspired by Neoism.
Go 1.3 or later is required.
go get -v github.com/ympons/go-orientrest
There are some ways initialize the client
client, err := orientrest.OrientDB("http://localhost:2480/", orientrest.Options{
DbName: dbname,
DbUser: user,
DbPass: pass,
Conn: true,
})
db, err := orientrest.OrientDB("http://localhost:2480/")
client, err := db.Connect(orientrest.Options{
DbName: dbname,
DbUser: user,
DbPass: pass,
})
db, err := orientrest.OrientDB("http://localhost:2480/")
db.Configure(orientrest.Options{
DbName: dbname,
DbUser: user,
DbPass: pass,
})
client, err := orientrest.Connect()
err := client.DbCreate("my_new_database", orientrest.STORAGE_TYPE_PLOCAL, orientrest.DB_TYPE_GRAPH)
err := client.DbDrop(client.Name)
list, err := client.DbList()
langs, err := client.DbAvailableLangs(client.Name)
client.Close()
_, err := client.Command("create class Person extends V")
result, err := client.Query("select * from V")
This is Free Software, released under the terms of the GPLv3.