1.0 Alpha 5
This changelog summarizes new features and breaking changes in EdgeDB 1.0 alpha 5 “Luhman”.
EdgeQL
- Implement casts between JSON and enums, arrays and tuples (#251). For example, now there’s a way to unpack JSON input into a tuple, which can then be used to populate a new User record:
```
with
data := <tuple<
first_name: str,
last_name: str,
interests: array<str>
>> <json>$input
insert User {
first_name := data.first_name,
last_name := data.last_name,
interests := (
select
Interest
filter
.label in array_unpack(data.interests)
)
};
```
```
Parameter <json>$input:
{
"first_name": "Phil",
"last_name": "Emarg",
"interests": ["fishing", "skiing"]
}
```
Allow constraints on tuple types (#1576).
Allow constraints directly on object types in SDL (#1164)
Proper implementation of
set/drop owned
.Fix issues with some
for
statements (#1594).Use fully-qualified names to disambiguate the expressions produced by describe (#1254).
Initial implementation of insert … unless conflict … else (#1639)
Implementation of more of the features of the new migration syntax (RFC 1000).
GraphQL
Allow several mutation operations in a single mutation query (#1569).
Reflect nested aliased types (#722).
Enable sorting on non-trivial path (#1642). Here’s an example of sorting movies by the director’s last name and then by the movie’s title:
```
{
Movie(
order: {
director: {last_name: {dir: ASC}},
title: {dir: ASC}
}
) {
id
title
}
}
```
- Add an
exists
filter operation (#1655). Here’s an example of using it to get records with missing data:
```
{
Movie(
filter: {director: {exists: false}}
) {
id
title
}
}
```
CLI
Reworked auth setup via
edgedb server init
(#91).Initial support for the migrations CLI.
Add
edgedb server status --all
command to list all instances.
Bindings
```
await con.transaction(async () => {
await con.execute(`
insert Example {
name := 'Test Transaction 1'
};
`);
await con.execute("select 1 / 0;");
});
// nested transactions are supported
// and handle save points
await con.transaction(async () => {
// nested transaction
await con.transaction(async () => {
await con.execute(`
insert Example {
name := 'Test Transaction 2'
};
`);
});
});
```
Add support of connecting to instance by a name (#112).
Update the edgedb-js driver to v0.9.0.
Update the edgedb-python driver to v0.10.0.