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:
- Prohibit mixing computed and regular links or properties (#2099).
- Don’t ask for conversion expressions when changing type of computed link or property (#2658).
- Fix some migration issues involving rebasing (#2536).
- Fix backlink processing in SDL schemas (#1824).
- Improve migration prompts (#2547, #2591).
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:
1. ```
2. with U := (select User filter .name like '%user%')
3. select {
4. matches := U {name},
5. total := count(U),
6. total_users := count(User),
7. };
8. ```
- 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):
1. ```
2. select Color.Red;
3. ```
5. is equivalent to
8. ```
9. select <Color>'Red';
10. ```
- Allow removal and reordering of enum elements (#2564).
- Implement assert_single() which allows to perform a cardinality check in run-time (#2695):
1. ```
2. select assert_single((select User filter .name = "Unique"));
3. ```
5. ```
6. {default::User {id: ...}}
7. ```
10. ```
11. select assert_single((select User))
12. ```
14. ```
15. ERROR: CardinalityViolationError: assert_single violation: more than
16. one element returned by an expression
17. ```
This makes it apply to shapes in a more intuitive fashion:
1. ```
2. select detached User {
3. exclamation := User.name ++ '!'
4. }
5. ```
7. The above expression will now interpret the `User` inside that shape as the same `detached` 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 how ?? works with tuples (#2602).
- Fix cardinality inference of computed links and properties (#2585).
- Fix how distinct applies to collections of shapes (#2540).
- Fix some cases of nested
unless conflictbugs (#2555). - Fix how nested volatile computed expressions get executed (#2545).
- Fix how
usingexpressions propagate to subtypes (#2543).
GraphQL
The json values will be reflected into a custom JSON type that renders as seamless JSON. Assuming additional_data is a JSON value, here’s how a GraphQL query would work:
1. ```
2. {
3. Book {
4. additional_data
5. }
6. }
7. ```
9. producing:
12. ```
13. {
14. "data": {
15. "Book": [
16. {
17. "additional_data": {
18. "dimensions": "6 x 8 in",
19. "# of illustrations": 5,
20. "illustrator": "Alice White"
21. }
22. }
23. ]
24. }
25. }
26. ```
28. There’s a limitation that in order for GraphQL type validation to work JSON values have to be passed as variables.
- Remove the helper
stdgraphqlmodule 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 |
|---|---|
dump |
Create a database backup |
restore |
Restore a database backup from file |
configure |
Modify database configuration |
migration apply |
Bring current database to the latest or a specified revision |
migration create |
Create a migration script |
migration status |
Show current migration state |
migration log |
Show all migration versions |
migrate |
An alias for edgedb migration apply |
database create |
Create a new DB |
describe object |
Describe a database object |
describe schema |
Describe schema of the current database |
list |
List matching database objects by name and type |
query |
Execute EdgeQL queries |
info |
Show information about the EdgeDB installation |
project init |
Initialize a new or existing project |
project unlink |
Clean-up the project configuration |
project info |
Get various metadata about the project |
project upgrade |
Upgrade EdgeDB instance used for the current project |
instance create |
Initialize a new EdgeDB instance |
instance list |
Show all instances |
instance status |
Show status of a matching instance |
instance start |
Start an instance |
instance stop |
Stop an instance |
instance restart |
Restart an instance |
instance destroy |
Destroy an instance and remove the data |
instance link |
Link a remote instance |
instance unlink |
Unlink a remote instance |
instance logs |
Show logs of an instance |
instance upgrade |
Upgrade installations and instances |
instance revert |
Revert a major instance upgrade |
instance reset-password |
Reset password for a user in the instance |
server |
Manage local EdgeDB installations |
cli upgrade |
Upgrade the edgedb command-line tool |
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.
