1.0 Beta 3
This changelog summarizes new features and breaking changes in EdgeDB 1.0 beta 3 “Ross”.
Migrations
We continue working on improving our schema and migration tools:
EdgeQL
-
Add free shapes (#2533).
This construct provides a way to arbitrarily structure data without providing a specific underlying object. It is easier to package data that potentially contains empty sets this way, rather than using a
tuple
:Copywith U := (select User filter .name like '%user%') select { matches := U {name}, total := count(U), total_users := count(User), };
-
Add
cal::relative_duration
, which is similar to duration but instead uses fuzzy units like years, months and days in addition to the more standard units like seconds (#2559). -
Enforce
duration
constraints in SQL as opposed to only during casting (#2539). -
Implement path-like syntax for accessing enum types’ members (#2625):
Copyselect Color.Red;
is equivalent to
Copyselect <Color>'Red';
-
Implement
assert_single()
which allows to perform a cardinality check in run-time (#2695):Copydb>
select assert_single((select User filter .name = "Unique"));
{default::User {id: ...}}
Copydb>
select assert_single((select User))
ERROR: CardinalityViolationError: assert_single violation: more than one element returned by an expression
-
Adjust the precedence of
detached
to match that ofexists
(#2638).This makes it apply to shapes in a more intuitive fashion:
Copyselect detached User { exclamation := User.name ++ '!' }
The above expression will now interpret the
User
inside that shape as the samedetached
User as mentioned at the root of the shape. -
Prohibit backlink syntax for computed links (#2619).
-
Prohibit “$” as the first character in identifiers (#2595).
-
Fix cardinality inference of computed links and properties (#2585).
-
Fix some cases of nested
unless conflict
bugs (#2555). -
Fix how nested volatile computed expressions get executed (#2545).
-
Fix how
using
expressions propagate to subtypes (#2543).
GraphQL
-
Reflect
json
into a custom GraphQL type (#2782).The
json
values will be reflected into a custom JSON type that renders as seamless JSON. Assumingadditional_data
is a JSON value, here’s how a GraphQL query would work:Copy{ Book { additional_data } }
producing:
Copy{ "data": { "Book": [ { "additional_data": { "dimensions": "6 x 8 in", "# of illustrations": 5, "illustrator": "Alice White" } } ] } }
There’s a limitation that in order for GraphQL type validation to work JSON values have to be passed as variables.
-
Remove the helper
stdgraphql
module as it is no loger needed (#2692). -
Fix an issue with inline fragments (#1800).
TLS
We’ve implemented RFC 1008: TLS and ALPN. With Transport Layer Security (TLS) Protocol enabled by default, it is possible to leverage the TLS Application-Layer Protocol Negotiation (ALPN) Extension for secure and reliable protocol selection on top of the TLS transport, allowing EdgeDB to multiplex different frontend protocols like the binary protocol and the HTTP-based protocol on the same port.
Command-Line Tools
We’ve changed some of the CLI commands and groupings. There are some top-level “frequently used” commands such as edgedb dump, edgedb restore, edgedb migrate, edgedb query, edgedb info and edgedb cli upgrade. Other commands are grouped into categories: edgedb configure, edgedb migration, edgedb list, edgedb describe, edgedb instance, edgedb project and edgedb server.
Here’s a more comprehensive list of the CLI commands:
SUBCOMMAND |
DESCRIPTION |
---|---|
|
Create a database backup |
|
Restore a database backup from file |
|
Modify database configuration |
|
Bring current database to the latest or a specified revision |
|
Create a migration script |
|
Show current migration state |
|
Show all migration versions |
|
An alias for edgedb migration apply |
|
Create a new DB |
|
Describe a database object |
|
Describe schema of the current database |
|
List matching database objects by name and type |
|
Execute EdgeQL queries |
|
Show information about the EdgeDB installation |
|
Initialize a new or existing project |
|
Clean-up the project configuration |
|
Get various metadata about the project |
|
Upgrade EdgeDB instance used for the current project |
|
Initialize a new EdgeDB instance |
|
Show all instances |
|
Show status of a matching instance |
|
Start an instance |
|
Stop an instance |
|
Restart an instance |
|
Destroy an instance and remove the data |
|
Link a remote instance |
|
Unlink a remote instance |
|
Show logs of an instance |
|
Upgrade installations and instances |
|
Revert a major instance upgrade |
|
Reset password for a user in the instance |
|
Manage local EdgeDB installations |
|
Upgrade the |
Bindings
We’ve changed the location where EdgeDB stores credentials and other instance information, so all the bindings need to be updated to their latest versions in order to properly work with this release.