github.com/edgedb/edgedb-go (go): Package edgedb is the official Go driver for EdgeDB.  Typical 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.  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.
Keywords: edgedb|go|golang