Skip to content

Releases: typedb/typeql

TypeQL 2.28.6

05 Aug 11:08
2804f3d
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.28.6</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.28.6</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.28.6

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Use Universe manifest for features & version ranges of crates.io dependencies (#353)

  • Merge master into development after 2.28.5 release

TypeQL 2.28.5

02 Aug 13:59
1c831c1
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.28.5</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.28.5</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.28.5

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Make the author of the Python grammar and TypeQL Rust "TypeDB Community"

    The author field of our Python grammar and Rust library is now TypeDB Community with the email being [email protected].

  • Update error messages to match Rust and Java implementations
    We fixed various logical and grammatical issues in the Java and Rust error messages, aiming to have similar errors from both implementations.

  • Java and Rust error messages: grammatical fixes

    We fixed various grammatical issues in the Java and Rust error messages.

  • Update readme

TypeQL 2.28.1

15 May 11:27
0f9e9d1
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.28.1</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.28.1</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.28.1

Other Improvements

  • Bump snake-yaml maven dependency to 2.2
    Bump snake-yaml maven dependency to 2.2

TypeQL 2.28.0

11 Apr 16:20
ec2fae6
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.28.0</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.28.0</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.28.0

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Update maven artifacts snapshot
    Update maven artifacts snapshot

  • Update README.md

  • Update typedb-behaviour and implement missing steps

  • Finish updating license tests, dependencies, last missed headers

  • Replace licenses with MPL version 2.0

  • Update banner.png for the README file

    Update the banner image in the README file.

TypeQL 2.27.0

22 Mar 23:25
dc8fe2d
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.27.0</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.27.0</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.27.0

New Features

Bugs Fixed

Code Refactors

  • Refactor TypeQL Java projection builder

    We note a previous change in 2eef07d388391e073cc1631f5af2bbf15e844cc4 and extend it here to refactor the TypeQL Fetch projection query builder:

    Usage rename, before:

    cVar("x").map("name")
    label("subquery").map(TypeQL.match(...).fetch(...))
    

    Usage now:

    cVar("x").fetch("name")
    label("subquery").fetch(TypeQL.match(...).fetch(...))
    

    Fetching multiple attributes without relabeling, before:

    cVar("x").fetch(list(pair("name", null), pair("age", null), pair("dob", null)))
    

    Usage now:

    cVar("x").fetch("name", "age", "dob")
    

Other Improvements

  • Add helper method to create Sorting modifier with just one argument

  • ProjectionBuilder for fetch queries

  • Renamed projection builder 'map()' to 'fetch()' and dissolved Stream overload

TypeQL 2.27.0-rc0

14 Mar 16:24
9a3e44b
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.27.0-rc0</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.27.0-rc0</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.27.0-rc0

New Features

Bugs Fixed

Code Refactors

  • Refactor TypeQL Java projection builder

    We note a previous change in 2eef07d388391e073cc1631f5af2bbf15e844cc4 and extend it here to refactor the TypeQL Fetch projection query builder:

    Usage rename, before:

    cVar("x").map("name")
    label("subquery").map(TypeQL.match(...).fetch(...))
    

    Usage now:

    cVar("x").fetch("name")
    label("subquery").fetch(TypeQL.match(...).fetch(...))
    

    Fetching multiple attributes without relabeling, before:

    cVar("x").fetch(list(pair("name", null), pair("age", null), pair("dob", null)))
    

    Usage now:

    cVar("x").fetch("name", "age", "dob")
    

Other Improvements

  • Add helper method to create Sorting modifier with just one argument

  • ProjectionBuilder for fetch queries

  • Renamed projection builder 'map()' to 'fetch()' and dissolved Stream overload

TypeQL 2.26.6

15 Feb 16:47
9e89657
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.26.6</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.26.6</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.26.6

New Features

  • Implement non-ascii variables in Java and Rust
    We update to TypeQL with Unicode support in both value and concept variables. This makes the following valid TypeQL:

    match $人 isa person, has name "Liu"; get  $人;
    
    match $אדם isa person, has name "Solomon"; get $אדם;
    

    We now require all Labels and Variables are valid unicode identifiers not starting with _.

    This change is fully backwards compatible. We also validate that Type Labels and Variables created using the TypeQL language builders in both Rust and Java are conforming to our Unicode specification.

Bugs Fixed

  • Fix snapshot version in test-deployment-maven

    We update the generated snapshot version in test-deployment-maven CI job to correspond to the updated snapshot version format.

Code Refactors

  • Allow variables to have a leading digit

    We modify the behaviour of #310 which unified variables and labels to have the same valid identifier syntax, which eliminated the capability of variables to have a leading number. For example, the variable $0 was banned.

    This PR reverts this specific behaviour, and enables usage of variables with leading digits:

    match
    $1_a isa entity;
    get;
    

    is made valid again.

    Testing specified in typedb/typedb-behaviour#281

  • Merge typedb-common repository into typeql

    As part of the effort to reduce the number of vaticle organization repositories, we merge typedb-common into the typeql repo as a subpackage.

Other Improvements

  • Sync dependencies in CI

    We add a sync-dependencies job to be run in CI after successful snapshot and release deployments. The job sends a request to vaticle-bot to update all downstream dependencies.

    Note: this PR does not update the dependencies repo dependency. It will be updated automatically by the bot during its first pass.

  • Set up CI filters for master-development workflow

  • Migrate artifact hosting to cloudsmith
    Updates artifact deployment & consumption rules to use cloudsmith instead of the self-hosted sonatype repository.

TypeQL 2.26.6-rc0

29 Jan 14:48
e65f556
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.26.6-rc0</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.26.6-rc0</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.26.6-rc0

New Features

  • Implement non-ascii variables in Java and Rust
    We update to TypeQL with Unicode support in both value and concept variables. This makes the following valid TypeQL:

    match $人 isa person, has name "Liu"; get  $人;
    
    match $אדם isa person, has name "Solomon"; get $אדם;
    

    We now require all Labels and Variables are valid unicode identifiers not starting with _.

    This change is fully backwards compatible. We also validate that Type Labels and Variables created using the TypeQL language builders in both Rust and Java are conforming to our Unicode specification.

Bugs Fixed

  • Fix snapshot version in test-deployment-maven

    We update the generated snapshot version in test-deployment-maven CI job to correspond to the updated snapshot version format.

Code Refactors

  • Merge typedb-common repository into typeql

    As part of the effort to reduce the number of vaticle organization repositories, we merge typedb-common into the typeql repo as a subpackage.

Other Improvements

  • Sync dependencies in CI

    We add a sync-dependencies job to be run in CI after successful snapshot and release deployments. The job sends a request to vaticle-bot to update all downstream dependencies.

    Note: this PR does not update the dependencies repo dependency. It will be updated automatically by the bot during its first pass.

  • Set up CI filters for master-development workflow

  • Migrate artifact hosting to cloudsmith
    Updates artifact deployment & consumption rules to use cloudsmith instead of the self-hosted sonatype repository.

TypeQL 2.25.8

04 Dec 18:46
e0eeb5d
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.25.8</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.25.8</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.25.8

New Features

Bugs Fixed

Code Refactors

  • Technical debt: improve error_messages, cleanup

    error_messages! now accepts struct enum variants, rather than tuple variants. This forces the user to name the fields and to refer to the fields by name in the format strings, reducing user error.

Other Improvements

  • Update README.md

  • Update readme: fix the forum badge

    Update the readme file to fix the forum badge.

  • Fixed badges in README.md to refer to TypeQL

TypeQL 2.25.0

01 Nov 15:02
58ceb5b
Compare
Choose a tag to compare

TypeQL Grammar and Language Library distributions for Rust

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

TypeQL Grammar and Language Library distributions for Java

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-grammar</artifactId>
        <version>2.25.0</version>
    </dependency>
    <dependency>
        <groupId>com.vaticle.typeql</groupId>
        <artifactId>typeql-lang</artifactId>
        <version>2.25.0</version>
    </dependency>
</dependencies>

TypeQL Grammar distribution for Python

Available through https://pypi.org

pip install typeql-grammar==2.25.0

API Changes

One breaking change is implemented:

  1. Match-Get queries used to be implicit if the get was ommitted. We now require the get be explicitly written out. For example:
match $x isa entity;

must now be written as:

match $x isa entity; get;  # or get $x;

One new type is added:

  1. Match-Fetch queries are now available as both builders and parsed queries.

New Features

  • Implement TypeQL Fetch query

    We implement a new type of query: the Fetch query. This type of query does three things:

    1. Projects the concepts selected in the 'match' clause into 'data' objects that can be consumed as a simple JSON structure
    2. Customising the desired JSON structure to be returned
    3. Fetches extra data beyond that described by the 'match' clause in the form of attribute retrieval or full subqueries.

    The terminology we use to decribe 'fetch' clauses is that each entry in the 'fetch' is a projection.

    Examples

    1. Projecting concepts selected from the 'match' clause directory into data objects. We are allowed to project attributes, types, and value concepts without transformation in the 'fetch' clause:
    match
    $movie-type sub movie;  # movie or its subtypes
    $x isa! $movie-type,        # an entity instance of the type
        has title "Godfather",
        has release-date $date,
        has duration-minutes $mins;
    ?duration-hours = $mins / 60.0;
    fetch
    $movie-type;
    $date;
    ?duration-hours;
    
    1. Customising the desired JSON structure to be returned
    match
    $movie-type sub movie;
    $x isa! $movie-type,       
        has title "Godfather",
        has release-date $date,
        has duration-minutes $mins;
    ?duration-hours = $mins / 60.0;
    fetch
    $movie-type as "movie category";   # set the key to return $movie-types as to "movie category"
    $date as "release date";                   # ...
    ?duration-hours as "length";            # ...
    

    3a. Fetching extra data in the form of attributes. We use this to project an entity or relation into 'data' objects such as attributes, values, and types.

    match
    $x isa movie,
        has title "Godfather",
        has release-date $date;
    fetch
    $x: title, duration-minutes as "length";
    $date as "release-date";
    

    3b. Fetching extra data in the form of subqueries:

    match
    $x isa movie,
        has title "Godfather",
        has release-date $date;
    fetch
    $x: title, duration-minutes as "length";
    $date as "release-date";
    director-details: {              # for each movie found, we will also get all the directors and fetch them as name and age
        match
        ($x, $director) isa directorship;
        fetch
        $director: name, age;
    };
    director-count: {              # for each movie found, we will retrieve the count of all directors for the movie
        match
        ($x, $director) isa directorship;
        get $director;
        count;
    };
    

    TypeQL Fetch Query Builders

    We also implement programmatic TypeQL builders for both Java and Rust. Without too much detail, here is how one would programmatically generate the query from 3b in Java and Rust builders:

    Java

    TypeQLFetch expected = match(
        cVar("x").isa("movie").has("title", "Godfather").has("release-date", cVar("date"))
    ).fetch(
        cVar("date").asLabel("release date"),    // $date as "release date"
        cVar("x").map("title").map("duration-minutes", "length"),    // $x: title, duration-minutes as "length"
        label("director-details").map(    // subquery 'director-details'
            match(
                rel(cVar("x")).rel(cVar("director")).isa("directorship")
            ).fetch(
                cVar("director").map("name").map("age")
            )   
        ),  
        label("directors-count").map(     // subquery 'director-count'
            match(
                rel(cVar("x")).rel(cVar("director")).isa("directorship")
            ).get(cVar("director")).count()
        ) 
    );

    Rust

    let projections: Vec<Projection> = vec![
        cvar("date").label("release date").into(),  // $date as "release date"
        cvar("x").map_attributes(vec![    // $x: title, duration-minutes as "length"
            "title".into(),
            ("duration-minutes", "length").into(),
        ]),
        label("director-details").map_subquery_fetch(     // subquery 'director-details'
            typeql_match!(
                rel(cvar("x")).rel(cvar("director")).isa("directorship")
            ).fetch(vec![
                 cvar("director").map_attribute(vec!["name".into(), "age".into()])
            ])
        ),
        label("director-count").map_subquery_get_aggregate(    // subquery 'director-count'
            typeql_match!(
                rel(cvar("x")).rel(cvar("director")).isa("directorship")
            ).get_fixed([cvar("director")]).count()
        )
    ];
    let typeql_fetch = typeql_match!(
        cvar("x").isa("movie").has(("title", "Godfather")).has(("release-date", cvar("date")))
    ).fetch(projections);

    Important TypeQL Changes

    To help enforce when a 'Get' and 'Fetch' query is being issued, we now require that the 'get' clause is mandatory in Get queries, and rename what used to be considered a "Match" query to be a "Get" query.

    The mental model we encourage is that the 'match' clause of a query is the definition/constraint space to search, and the following clause is the operation over that space - for example get (without transformation), fetch (transformation), insert, delete, update, etc.

Bugs Fixed

Code Refactors

Other Improvements

  • Update README file

    Update the README file.

  • Update root checkstyle to exclude banner