Skip to content

geldata/gel-go

Folders and files

NameName
Last commit message
Last commit date
Feb 13, 2024
Jul 9, 2024
Apr 19, 2024
Jun 26, 2024
Apr 19, 2024
May 6, 2021
May 13, 2021
Apr 10, 2024
Oct 12, 2021
Jul 21, 2023
Oct 24, 2022
Oct 14, 2020
Feb 13, 2024
Sep 9, 2022
Sep 27, 2023
Nov 3, 2022
May 19, 2023
Oct 24, 2022
Mar 22, 2024
Oct 24, 2022
Feb 9, 2024
Feb 9, 2024
Oct 24, 2022
Nov 3, 2022

Repository files navigation

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.