Skip to content

Releases: typedb/typeql

TypeQL 3.7.0

02 Dec 17:35
d0134ff

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.7.0

New Features

  • Try blocks in write stages

    We allow try {} blocks in all write stages, viz. insert, delete, put, and update.

Bugs Fixed

Code Refactors

Other Improvements

  • Change CODEOWNERS

  • Fix illegal grammar error formatting

    We fix the (internal) illegal grammar error formatting to show the part of the query that caused the error rather than the corresponding parsed subtree.

TypeQL 3.7.0-rc0

12 Nov 18:16
6d96bdf

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.7.0-rc0

New Features

  • Try blocks in write stages

    We allow try {} blocks in all write stages, viz. insert, delete, put, and update.

Bugs Fixed

Code Refactors

Other Improvements

  • Change CODEOWNERS

  • Fix illegal grammar error formatting

    We fix the (internal) illegal grammar error formatting to show the part of the query that caused the error rather than the corresponding parsed subtree.

TypeQL 3.5.0

16 Sep 13:11
6dd83bd

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.5.0

New Features

Bugs Fixed

Code Refactors

  • Remove Java and update README
    Remove deprecated Java code and grammar and update READMEs to align with the recent changes in TypeDB 3.x.

Other Improvements

  • Simplify type statements, allow empty define queries, bring back BDD

    Composite changes:

    1. We clean up the grammar for Type statements in both Patterns and Definables, which now allow commas after a <kind> <variable> query:
    match entity $x, sub $y;
    

    is now legal with the comma. This is a more regular language that is easier to generate.

    1. we allow empty define/undefine/redefine queries:
    define
    

    This addresses: typedb/typedb#7531

    1. We also re-enable half of our 2.x BDD suite, which parses every query in the behaviour repository (though we leave out the other 2.x half, which converts the parsed results back into strings, reparses, and validates the cycle is equivalent), ensuring we don't get parsing errors when we don't expect them and we do when they are expected.
  • Update README

  • Update factory/automation.yml
    Fix build. Remove excessive branches

  • Update README.md
    Update contributors

TypeQL 3.5.0-rc0

08 Sep 16:18
a819807

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.5.0-rc0

New Features

Bugs Fixed

Code Refactors

  • Remove Java and update README
    Remove deprecated Java code and grammar and update READMEs to align with the recent changes in TypeDB 3.x.

Other Improvements

  • Bump behaviour

  • Simplify type statements, allow empty define queries, bring back BDD

    Composite changes:

    1. We clean up the grammar for Type statements in both Patterns and Definables, which now allow commas after a <kind> <variable> query:
    match entity $x, sub $y;
    

    is now legal with the comma. This is a more regular language that is easier to generate.

    1. we allow empty define/undefine/redefine queries:
    define
    

    This addresses: typedb/typedb#7531

    1. We also re-enable half of our 2.x BDD suite, which parses every query in the behaviour repository (though we leave out the other 2.x half, which converts the parsed results back into strings, reparses, and validates the cycle is equivalent), ensuring we don't get parsing errors when we don't expect them and we do when they are expected.
  • Update README

  • Update factory/automation.yml
    Fix build. Remove excessive branches

  • Update README.md
    Update contributors

TypeQL 3.2.0

06 May 08:39
b56ed81

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.2.0

New Features

  • Add query end marker

    TypeQL query pipelines cannot be distinguished since query stages can be arbitrarily chained and concatenated. To resolve this, we introduce the end; marker. For example:

    match ...
    insert ...
    end;
    match ...
    insert...
    

    Is now correctly interpretable as two separate match-insert queries! Compared to before:

    match ...
    insert ...
    match ...
    insert ...
    

    Where it was not clear if this is one match-insert-match-insert pipeline, two match-insert pipelines, or 4 separate queries, or anything in between!

    For simplicity, any query can be terminated with an 'end;` marker, though it is redundant in for schema queries and 'fetch' queries:

    define ...;
    end; # redundant!
    
    match ...
    insert ...
    end;  # not redundant!
    
    match ...
    insert ...
    fetch { ... };
    end;  # redundant!
    
  • Add prefix query parser

    We create a "query prefix parsing" API, which attempts to parse the maximal query prefix from the input.

    This is designed to help applications like Console consume a single complete query at a time from a set of concatenated queries.

  • Allow relates overrides to have lists

    We fix one syntactic inconsistency, grammatically allowing list overrides for relation's roles:

    define
      relation sub-rel, relates sub-role[] as super-role[];
    

Bugs Fixed

Code Refactors

  • Refactor grammar: partial rules, cleanup

    We rename rules used for partial parsing to have suffix _partial rather than _no_test (randomized tests only use complete queries).

Other Improvements

  • Fix unit test checks

  • Improve TypeQL syntax errors

  • Update README.md

  • Update dependencies reference
    Update dependencies reference to avoid conflicts with TypeDB server.

TypeQL 3.2.0-rc2

28 Apr 16:34
a348c64

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.2.0-rc2

New Features

  • Add query end marker

    TypeQL query pipelines cannot be distinguished since query stages can be arbitrarily chained and concatenated. To resolve this, we introduce the end; marker. For example:

    match ...
    insert ...
    end;
    match ...
    insert...
    

    Is now correctly interpretable as two separate match-insert queries! Compared to before:

    match ...
    insert ...
    match ...
    insert ...
    

    Where it was not clear if this is one match-insert-match-insert pipeline, two match-insert pipelines, or 4 separate queries, or anything in between!

    For simplicity, any query can be terminated with an 'end;` marker, though it is redundant in for schema queries and 'fetch' queries:

    define ...;
    end; # redundant!
    
    match ...
    insert ...
    end;  # not redundant!
    
    match ...
    insert ...
    fetch { ... };
    end;  # redundant!
    
  • Add prefix query parser

    We create a "query prefix parsing" API, which attempts to parse the maximal query prefix from the input.

    This is designed to help applications like Console consume a single complete query at a time from a set of concatenated queries.

  • Allow relates overrides to have lists

    We fix one syntactic inconsistency, grammatically allowing list overrides for relation's roles:

    define
      relation sub-rel, relates sub-role[] as super-role[];
    

Bugs Fixed

Code Refactors

  • Refactor grammar: partial rules, cleanup

    We rename rules used for partial parsing to have suffix _partial rather than _no_test (randomized tests only use complete queries).

Other Improvements

  • Fix unit test checks

  • Improve TypeQL syntax errors

  • Update README.md

TypeQL 3.2.0-rc0

15 Apr 12:21
4032cda

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.2.0-rc0

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Update dependencies reference
    Update dependencies reference to avoid conflicts with TypeDB server.

TypeQL 3.1.0

07 Apr 18:34
3399516

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.1.0

New Features

  • 3.0 distinct

    Added the distinct query pipeline stage.

Bugs Fixed

  • Allow duration literals without date component

    We modify the grammar to accept a duration_literal without a date component (e.g. PT1S) as per the standard.

Code Refactors

  • Restrict by grammar refactoring type_ref and named_type
    Restrict by grammar refactoring type_ref and named_type

Other Improvements

  • Update dependencies to avoid conflicts with the server
    Update dependencies and the generated Cargo files for the newest version of the target repo.

  • Update dependencies. Update version to 3.1.0-rc0 and release notes

TypeQL 3.1.0-rc0

21 Mar 17:58
992eba4

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.1.0-rc0

New Features

  • 3.0 distinct

    Added the distinct query pipeline stage.

Bugs Fixed

  • Allow duration literals without date component

    We modify the grammar to accept a duration_literal without a date component (e.g. PT1S) as per the standard.

Code Refactors

  • Restrict by grammar refactoring type_ref and named_type-

    Restrict by grammar refactoring type_ref and named_type

Other Improvements

  • Update dependencies to avoid conflicts with the server

    Update dependencies and the generated Cargo files for the newest version of the target repo.

TypeQL 3.0.5

31 Jan 20:34
0f1fbbc

Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

Available through https://crates.io/crates/typeql.

cargo add typeql@3.0.5

New Features

Bugs Fixed

Code Refactors

  • Enhance error printing and query source span availability

    We improve the error messages to show a ^ column indicator along with --> line indicator:

            define
            attribute name value string;
    -->     entity person owns name @range(0..10);
                                    ^
    

    We also expose more information about where in the original query spans which sourced various internal data structures.

Other Improvements