All Projects → edgedb → edgedb-go

edgedb / edgedb-go

Licence: Apache-2.0 license
The official Go client library for EdgeDB

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Labels

Projects that are alternatives of or similar to edgedb-go

Edgedb
The next generation relational database.
Stars: ✭ 5,368 (+4916.82%)
Mutual labels:  edgedb
Objectbox Java
ObjectBox is a superfast lightweight database for objects
Stars: ✭ 3,950 (+3591.59%)
Mutual labels:  edgedb
edgedb-elixir
Elixir client for EdgeDB
Stars: ✭ 57 (-46.73%)
Mutual labels:  edgedb

The Go driver for EdgeDB

Build Status Join GitHub discussions

Installation

In your module directory, run the following command.

$ go get github.com/edgedb/edgedb-go

Basic Usage

Follow the EdgeDB tutorial to get EdgeDB installed and minimally configured.

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/edgedb/edgedb-go"
)

func main() {
	ctx := context.Background()
	client, err := edgedb.CreateClient(ctx, edgedb.Options{})
	if err != nil {
		log.Fatal(err)
	}
	defer client.Close()

	var result string
	err = client.QuerySingle(ctx, "SELECT 'hello EdgeDB!'", &result)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(result)
}

Development

A local installation of EdgeDB is required to run tests. Download EdgeDB from here or build it manually.

To run the test suite run make test. To run lints make lint.

License

edgedb-go is developed and distributed under the Apache 2.0 license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].