Edgedb Go Save

The official Go client library for EdgeDB

Project README

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.

Open Source Agenda is not affiliated with "Edgedb Go" Project. README Source: edgedb/edgedb-go
Stars
157
Open Issues
12
Last Commit
1 week ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating