Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

arangodb driver

How to install

go get github.com/thedanielforum/arangodb

Set up a connection to arango

package main

import "github.com/thedanielforum/arangodb"

var conn *arangodb.Connection

func main()  {
	var err error
	conn, err = arangodb.NewConnection(
		"127.0.0.1:8529",
		"root",
		"awstest123",
		&arangodb.Config{
			DebugMode: false,
		},
	)
	conn.SetDB("test")
	if err != nil {
		panic(err)
	}
}

Get one document

var vid *Videos
err = connection.NewQuery(`FOR x IN %s RETURN x`, "videos").One(&vid)
if err != nil {
	panic(err)
}

Get all documents from query

var vids []Video
err = connection.NewQuery(`FOR x IN %s RETURN x`, "videos").All(&vids)
if err != nil {
	panic(err)
}

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址