How to create database with go-driver?

36 views
Skip to first unread message

Gerry Weaver

unread,
Jul 19, 2018, 8:18:10 AM7/19/18
to ArangoDB
Hello All,

I'm just learning go and don't understand how to create a database by looking at the docs. Any help would be greatly appreciated.

Thanks,
-G

Ewout Prangsma

unread,
Jul 19, 2018, 8:36:16 AM7/19/18
to ArangoDB
hi Gerry,

To create a database, use a statement like this

ctx := context.Background()
db, err := theClient.CreateDatabase(ctx, "yourNewDatabase", nil)

The last argument can be used to pass specific options. See https://godoc.org/github.com/arangodb/go-driver#CreateDatabaseOptions

Regards
Ewout

Op donderdag 19 juli 2018 14:18:10 UTC+2 schreef Gerry Weaver:

Gerry Weaver

unread,
Jul 19, 2018, 9:28:00 AM7/19/18
to ArangoDB
Hi Ewout,

Perfect! 

Thanks,
-G
Reply all
Reply to author
Forward
0 new messages