Top 1.9% dependent packages on proxy.golang.org
Top 1.5% dependent repos on proxy.golang.org
Top 6.5% forks on proxy.golang.org
proxy.golang.org : github.com/edgedb/edgedb-go
Package edgedb is the official Go driver for EdgeDB. Additionally, github.com/edgedb/edgedb-go/cmd/edgeql-go is a code generator that generates go functions from edgeql files. Typical client usage looks like this: We recommend using environment variables for connection parameters. See the client connection docs for more information. You may also connect to a database using a DSN: Or you can use Option fields. edgedb never returns underlying errors directly. If you are checking for things like context expiration use errors.Is() or errors.As(). Most errors returned by the edgedb package will satisfy the edgedb.Error interface which has methods for introspecting. The following list shows the marshal/unmarshal mapping between EdgeDB types and go types: Note that EdgeDB's std::duration type is represented in int64 microseconds while go's time.Duration type is int64 nanoseconds. It is incorrect to cast one directly to the other. Shape fields that are not required must use optional types for receiving query results. The edgedb.Optional struct can be embedded to make structs optional. Not all types listed above are valid query parameters. To pass a slice of scalar values use array in your query. EdgeDB doesn't currently support using sets as parameters. Nested structures are also not directly allowed but you can use json instead. By default EdgeDB will ignore embedded structs when marshaling/unmarshaling. To treat an embedded struct's fields as part of the parent struct's fields, tag the embedded struct with `edgedb:"$inline"`. Interfaces for user defined marshaler/unmarshalers are documented in the internal/marshal package. Link properties are treated as fields in the linked to struct, and the @ is omitted from the field's tag.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/edgedb/edgedb-go
Keywords:
edgedb
, go
, golang
License: Apache-2.0
Latest release: 3 months ago
First release: over 4 years ago
Namespace: github.com/edgedb
Dependent packages: 8
Dependent repositories: 12
Stars: 142 on GitHub
Forks: 10 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago