1.0 Alpha 5

This changelog summarizes new features and breaking changes in EdgeDB 1.0 alpha 5 “Luhman”.

  • 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:

    Copy
    db> 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    ... 
    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)

  • Disallow using exclusive on scalar types (#1575).

  • 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).

  • 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:

    Copy
    {
      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:

    Copy
    {
      Movie(
        filter: {director: {exists: false}}
      ) {
        id
        title
      }
    }
  • Reworked auth setup via edgedb server init (#91).

  • Initial support for the migrations CLI.

  • Add edgedb server status --all command to list all instances.

  • Add transaction API to JS binding (#61). Here’s an example of using transactions:

    Copy
    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.

Light
Dark
System