Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to gel #331

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# The Go driver for EdgeDB
# The Go driver for Gel

[![Build Status](https://github.com/edgedb/edgedb-go/workflows/Tests/badge.svg?event=push&branch=master)](https://github.com/edgedb/edgedb-go/actions)
[![Build Status](https://github.com/geldata/gel-go/workflows/Tests/badge.svg?event=push&branch=master)](https://github.com/geldata/gel-go/actions)
[![Join GitHub discussions](https://img.shields.io/badge/join-github%20discussions-green)](https://github.com/edgedb/edgedb/discussions)

## Installation

In your module directory, run the following command.

```bash
$ go get github.com/edgedb/edgedb-go
$ go get github.com/geldata/gel-go
```

## Basic Usage

Follow the [EdgeDB tutorial](https://www.edgedb.com/docs/guides/quickstart)
to get EdgeDB installed and minimally configured.
Follow the [Gel tutorial](https://www.edgedb.com/docs/guides/quickstart)
to get Gel installed and minimally configured.

```go
package main
Expand All @@ -24,19 +24,19 @@ import (
"fmt"
"log"

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

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

var result string
err = client.QuerySingle(ctx, "SELECT 'hello EdgeDB!'", &result)
err = client.QuerySingle(ctx, "SELECT 'hello Gel!'", &result)
if err != nil {
log.Fatal(err)
}
Expand All @@ -47,13 +47,13 @@ func main() {

## Development

A local installation of EdgeDB is required to run tests.
Download EdgeDB from [here](https://www.edgedb.com/download)
A local installation of Gel is required to run tests.
Download Gel from [here](https://www.edgedb.com/download)
or [build it manually](https://www.edgedb.com/docs/reference/dev).

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.
gel-go is developed and distributed under the Apache 2.0 license.
4 changes: 2 additions & 2 deletions cmd/edgeql-go/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
// limitations under the License.

// edgeql-go is a tool to generate go functions from edgeql queries. When run
// in an EdgeDB project directory (or subdirectory) a *_edgeql.go source file
// in an Gel project directory (or subdirectory) a *_edgeql.go source file
// will be generated for each *.edgeql file. The generated go will have an
// edgeqlFileName and edgeqlFileNameJSON function with typed arguments and
// return value matching the query's arguments and result shape.
//
// # Install
//
// go install github.com/edgedb/edgedb-go/cmd/edgeql-go@latest
// go install github.com/geldata/gel-go/cmd/edgeql-go@latest
//
// See also [pinning tool dependencies].
//
Expand Down
9 changes: 4 additions & 5 deletions cmd/edgeql-go/endtoend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sync"
"testing"

edgedb "github.com/edgedb/edgedb-go/internal/client"
gel "github.com/geldata/gel-go/internal/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -63,7 +63,7 @@ var tests = []struct {
}

func TestMain(m *testing.M) {
o := edgedb.TestClientOptions()
o := gel.TestClientOptions()
pwd, ok := o.Password.Get()
if !ok {
log.Fatal("missing password")
Expand Down Expand Up @@ -206,8 +206,7 @@ func copyFile(t *testing.T, to, from string) {
func run(t *testing.T, dir, name string, args ...string) {
cmd := exec.Command(name, args...)
cmd.Dir = dir
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = append(os.Environ(), fmt.Sprintf("EDGEDB_DSN=%s", dsn))
require.NoError(t, cmd.Run())
stdoutStderr, err := cmd.CombinedOutput()
require.NoError(t, err, string(stdoutStderr))
}
Loading
Loading