Skip to content

Releases: typedb/typedb-driver

TypeDB Driver 2.26.5

10 Jan 11:18
a46344b
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.26.5</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.26.5

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install typedb-driver@

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.5

C driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.5

New Features

  • Check server URL contains port

    Fail with a sensible error message when attempting to connect to a TypeDB instance using an address without explicit port.

Bugs Fixed

Code Refactors

  • Increase size of Windows executor in CircleCI to XL

    We increase the size of the Windows executor in CircleCI deployment job from medium to xlarge. This change necessitated upgrade from windows orb v2.0.0 to v5.0, and reduced CI time from ~40 minutes to ~20 minutes.

  • Release from Amazon Linux to support GLIBC 2.26

    We migrate release jobs in CircleCI from Ubuntu-18.04 to Amazon Linux 2 docker image (RedHat-based), in order to downgrade the GLIBC dependency from 2.27 to 2.26. This approach will enable many users who use Amazon Linux 2 to be sure that they can use TypeDB drivers to connect to TypeDB.

  • Merge CircleCI jobs per platform

    We reduce the number of CircleCI jobs by combining all jobs running on the same executor (ie. per platform) into one. This reduces overhead associated with spinning up a new executor for each job and streamlines the release process.

    CircleCI now loosely has one deploy job platform, and one test job per platform in both snapshot and release pipelines.

    Jobs that do not require native compilation, are unchanged.

Other Improvements

  • Merge 2.26.3 release changes to development

    We merge changes made to CI pipelines for the 2.26.3 release back to development.

TypeDB Driver 2.26.3

08 Jan 17:25
24fac76
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.26.3</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.26.3

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install typedb-driver@

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.3

C driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.3

New Features

Bugs Fixed

  • Fix fetch sub-query aggregation null pointer

    We fix a bug where a Fetch query with a Get-Aggregate subquery that returned an empty (ie. undefined) answer throw a null pointer exception.

    For example this used to incorrectly throw an exception if 'Alice' doesn't have any salaries in the database, since a 'sum' is undefined for 0 entries.

    match
    $x isa person, has name $n; $n == "Alice";
    fetch
    $n as "name";
    total-salary: {
      match $x has salary $s;
      get $s; 
      sum $s;
    };
    

    We now correctly return the following JSON structure

    [
      {
        "name": {"value": "Alice",  "type":  {"label": "name", "root": "attribute", "value_type": "string"}},
        "total-salary": null
      }
    ]
    
  • Update to tonic 1.28

    We fix a bug in the installation of the latest typedb-driver Rust by upgrading tonic to version 1.28.

Code Refactors

  • Release with Ubuntu 18.04 in to lower GLIBC requirement to 2.27.0

    We downgrade from Ubuntu 20.04 to 18.04 in CircleCI assembly and deployment jobs, using a Docker image. This lowers the minimum supported glibc version from 2.31 to 2.27.

  • Rename typedb.hpp to typedb_driver.hpp

Other Improvements

  • C++ driver documentation and add missing APIs
    Documents the C++ code & adds ascii docs generated via doxygen. Adds a few methods to the classes which were missing.

  • Update python credential documentation

  • Update C and CPP entry in README.md

  • Update C++ readme with new 'cloud' terminology

TypeDB Driver 2.26.1

15 Dec 12:02
d1477dd
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.26.1</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.26.1

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install typedb-driver@

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.1

C driver

Compiled distributions comprising headers and shared libraries available at: https://github.com/vaticle/typedb-driver/releases/tag/2.26.1

API Changes

  • The TypeDB Cloud/Enterprise driver entry point has been renamed. Use TypeDB.cloudDriver() instead of TypeDB.enterpriseDriver() to connect to TypeDB Cloud/Enterprise.

New Features

  • Introduce C++ driver
    Introduce the C++ driver for TypeDB. It is built against the C++17 standard and distributed as an archive containing the headers (under /include & a shared library under /lib).

    Usage: As usual, add the headers paths to your include path in the compile step & the library to your link step. For windows, the 'import-lib' typedb-driver-cpp-<platform>.if.lib is included to link against.

    Architecture: The C++ driver is a thin wrapper around the TypeDB rust driver, introducing classes for a more intuitive interface. Each C++ object holds a unique pointer to the corresponding native rust object and is the unique owner of that rust object. To ensure this, we enforce move-semantics on the C++ objects. The rust object is freed when the C++ object owning it is destructed. Any error encountered will throw a TypeDB::DriverException. Note that methods which return Iterable or Future which encounter a server-side error will only throw when they are evaluated (using begin or get respectively).

    Example:

    // All files are included from typedb.hpp
    #include <typedb.hpp>
    
    int main() {
        TypeDB::Driver driver = TypeDB::Driver::coreDriver("127.0.0.1:1729");
        std::string dbName = "move-example";
        TypeDB::Driver driver = TypeDB::Driver::coreDriver("127.0.0.1:1729");
    
        driver.databases.create(dbName); 
        TypeDB::Database db = driver.databases.get(dbName);
        // Database db1 = db; // Copying is disabled: Produces a compiler error.
        TypeDB::Database db1 = std::move(db); // Moves ownership from db to db1
        try {
            std::cout << db.name() << std::endl; // db is no longer valid
        } catch (TypeDB::DriverException e) {
            // C++ Internal Error: The object does not have a valid native handle. It may have been:  uninitialised, moved or disposed
            std::cerr << "Caught exception: " << e.message() << std::endl;
        }
        std::cout << "db.name(): " << db1.name() << std::endl; // Ok: Prints 'move-objects'
        return 0;
    }

Bugs Fixed

  • Java JNI library loading: fallback when platform not specified

    Previously, the JNI library would be selected based on if the containing JAR contains the expected platform string. When TypeDB Driver Java is repackaged by the end user, the JNI library is relocated and is likely missing the platform specification in its path. Now, if only one native library candidate is found in classpath, we attempt to use that rather than fail.

Code Refactors

  • Replace all instances of 'enterprise' with 'cloud'

    We replace the term 'enterprise' with 'cloud', to reflect the new consistent terminology used throughout Vaticle.

  • C++ driver UX improvements
    Add a few missing APIs, and easier-to-use function variants.

Other Improvements

  • Fix circleci assembly tests for C++ driver
    Fix assembly test paths broken in previous commit

  • Release pipeline for C++ driver
    Introduce build targets & jobs for the release pipeline of the C++ driver

TypeDB Driver 2.25.8

04 Dec 23:48
8a7d9f8
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.25.8</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.25.8

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install [email protected]

API Changes

  1. 'Fetch' attribute value type moves from the outer layer to the 'type' - see 'Code Refactors'
  2. TypeDB Core sessions automatically and lazily reconnect on network failure or timeout on the server-side
  3. Restore ConceptMap.map() API on all languages

New Features

  • Session callbacks: on reopen, persistent on close; FFI bug fixes

    Session callbacks

    • All drivers:
      • implement session reopen callbacks, executed when a session closed on the server side successfully reconnects;
      • core session now attempts to reconnect if it is closed on the remote server, in line with enterprise behaviour;
      • Session::on_close() callbacks are now executed each time the session closes (rather than just once);
    • NodeJS:
      • implement session and transaction callbacks (onClose(), Session::onReopen());

    Miscellaneous fixes

    • Java, Python:
      • prevent exceptions in callbacks from crashing the native layer;
      • fix the issue where static root types could not be used with Concept APi;
      • reintroduce ConceptMap.map() to retrieve the full mapping;
    • Rust:
      • convert error messages from tuple enum variants to struct, allowing the fields to be named;
    • All drivers:
      • fix the issue where session closed on remote server would not register automatically on the client side until a transaction open attempt.

Bugs Fixed

Code Refactors

  • Fetch value type

    We update the expected output of TypeQL Fetch queries: attribute type serialization now includes its value_type.
    This change makes the output symmetric between raw values and attributes.

    Old output format:

    {
        "attribute_type": { "label": "T", "root": "attribute" },
        "raw_value": { "value": "...", "value_type": "string" },
        "attribute": { "value": "...", "value_type": "string", "type": { "label": "T", "root": "attribute" } }
    }

    New output format:

    {
        "attribute_type": { "label": "T", "value_type": "string", "root": "attribute" },
        "raw_value": { "value": "...", "value_type": "string" },
        "attribute": { "value": "...", "type": { "label": "T", "value_type": "string", "root": "attribute" } }
    }

    We also fix related JSON string serialization issue in which the hexadecimal escape sequences were not conformant to the JSON standard (\u0000).

Other Improvements

  • Generate Rust documentation tabs and italics correctly

    We generate documentation using the correct syntax for code examples, fixing errors in the generated Rust examples.

  • Fix documentation and for Trait Promise

  • Update vaticle_dependencies with upgraded rules_rust

  • Generate unique documentation anchors

    Documentation generation now produces strictly unique anchors, using a combination of class/struct name, method name, and arguments signature as part of the anchor. This strategies means that all overloads and variations of method, for example in Java, now have uniquely referrable links.

  • Increase CircleCI windows machine sizes from medium to xlarge

TypeDB Driver 2.25.7

16 Nov 15:55
7d8e8e0
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.25.7</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.25.7

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install [email protected]

New Features

Bugs Fixed

  • Add untyped value getter for Java values and fix Python type hints

    We add a simple untyped API to Java's Value concepts, which return the value inside of the Value regardless of its type (double/string/etc.). This value is returned as an Object, and useful for equality checks, printing, etc. Additionally, the same API exists in Python and Node already.

    We also fix the Python hints for setting the name of a Type, which was incorrectly hinting the type 'Label' when it should have been a simple string.

Code Refactors

  • Silence send errors in network callbacks when receiver dropped

    Downgrade the "channel closed" SendError from ERROR to DEBUG when the receiving end of the stream is dropped before the stream is exhausted.
    This used to occur when the network delivered messages to a dropped channel, for example when executing a match-insert
    and the responses were not consumed explicitly.

  • Optimise CI times by retaining server between Java BDD scenarios

    We optimise Java CI time by not shutting down the TypeDB server between scenarios. Instead, we delete the existing databases each test, which is much faster.

    During this work, we also discovered some sub-par UX in terms of error messages thrown, and missing BDD steps that needed to be implemented.

Other Improvements

  • Fix python BDD TLS connection configuration

  • Fix Rust BDD infer flag and python TLS default to false

  • Update VERSION and regenerate release notes

  • Increase ulimits on unix CircleCI machines

  • Update README links to docs

  • Simplify github PR and issue templates

TypeDB Driver 2.25.6

09 Nov 20:46
9eef81b
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.25.6</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.25.6

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install [email protected]

API changes

Backwards compatible: no

This version uses a new network protocol encoding, version 3.

All drivers:

  1. New: QueryManager.fetch - execute a TypeQL Fetch query against the database. Returns JSON in the driver's language.
  2. Rename: QueryManager.match/matchAggregate/matchGroup/matchGroupAggregate are changed to QueryManager.get/getAggregate/getGroup/getGroupAggregate
  3. Changed return type: QueryManager.getAggregate returns an (promise of) Optional<Value> instead of an Numeric. Empty Optional is equivalent to the previously returned Numeric.NaN
    a. Note that in Python and Node, no value is indicated by a None/null value inside the Promise
  4. Changed return type:QueryManager.getGroupAggregate returns ValueGroup instead of a NumericGroup.
    a. The Value in the ValueGroup is optional, with identical behaviour as outlined in point 3. above
  5. Deleted: toJSON APIs on 'ConceptMap' and 'Concept' and subtypes are removed. Please use TypeQL Fetch queries to retrieve JSON instead.

Python:

  1. Changed return type: Concept API and query calls are now either Iterators (same as before) or Promises (new) - both are 'async'. Call .resolve() on promises to retrieve the result. Note that writes are guaranteed to be completed on the backend before a commit succeeds.

Java:

  1. Changed return type: Concept API and query calls are now either Streams (same as before) or Promises (new) - both are 'async'. Call .resolve() on promises to retrieve the result. Note that writes are guaranteed to be completed on the backend before a commit succeeds.

New Features

  • Node driver package automatic version stamping

    We leverage Bazel's built-in workspace status and stamping capabilities to ensure that the version of TypeDB Protocol depended on by the node package doesn't go out of sync with the bazel dependency.

    To that end, we also add a snapshot deployment test for the node driver, and fix a bug in process of opening a connection to TypeDB Core.

  • Implement Fetch query with JSON output

    We implement the newly introduced Fetch query. The result of a Fetch query is a stream of serializable JSON objects.

    For more details, see typedb/typeql#300

    Other changes in this PR:

    • Match query is now called Get, to avoid confusion with a match clause;
    • Numeric is deprecated in favour of Optional<Value>, NumericGroup is replaced by a ValueGroup to reflect that change.
      • ValueGroup.value() now returns Optional<Value> as well.
  • Directly generate docs into directories and add missing doc comments

    We had all generated docs files in one directory for each driver. It was not convenient for the user and for the following processing. We added files containing mapping from file names to directory names and organise files according to this mapping.

  • Docs generation

    Drivers documentation on our website was created manually and therefore contained some errors and was difficult to maintain.

    We add docstrings for API methods, and now one can see them directly in the IDE. Moreover, we introduce scripts for drivers documentation generation for our website, that reduces the amount of errors and simplifies the docs updating process.

Bugs Fixed

  • Fix NodeJS isEnterprise flag computation

  • Update protocol version in package.json for Node driver

  • Fix filenames with incorrect symbols for Windows

    We had some filenames in generated AsciiDoc files that are prohibited in Windows. It affected only NodeJS Driver, but cloning the repo was impossible in Windows. We fixed it.

  • Update TLS certificates for client tests
    Updates expired TLS certificates which the client uses for tests against TypeDB enterprise.

Code Refactors

  • Wrap native exceptions with python driver exception

    We had two exception classes: TypeDBDriverException, that could be raised by native calls, and TypeDBDriverExceptionExt(TypeDBDriverException), that was raised by python driver methods. In order to catch all driver exceptions we had to use TypeDBDriverException, but this class couldn't be commented properly, because it is defined in the SWIG-generated file, that we wouldn't like to expose.

    Now all raised exceptions are TypeDBDriverExceptions, and this class is properly documented.

  • Make the C driver interface more human-friendly
    We refactor the C interface to make it more human-friendly. We also implement an integration test which doubles as an example.

    No structures are exposed in the C headers. All operations are done using pointers to rust objects in the underlying rust layer. Thus memory management involves:

    • releasing pointers involving a remote resource (Connection, Session, Transaction & Database) using the corresponding *_close method.
    • releasing pointers to local resources (e.g. iterators & concepts) using the corresponding *_drop method.
  • Reduce the number of jobs in CI for forks

    This repository contains four (and counting!) implementations of the driver for different languages, each of which is fully tested in CI. That leads to an unsustainable number of jobs (~50) being spawned in Factory on each push to a fork, which has caused us significant issues during development as each hotfix had the potential to completely stall our progress.

    As the first step to reducing that cost, we introduce a small set of query tests (as those were the ones taking the most time) to be run frequently, whereas the full suite is relegated to be run on the main vaticle repository branches only.

Other Improvements

  • Add linker dependencies for windows

  • UX improvements: FFI logging, error message fix, Rust stream borrow checks

    We improve the UX of Driver usage in several ways:

    • [Rust/Java/Python] Fix the formatting of error messages received from the server during a transaction.
    • [Java] Fix native error message formatting.
    • [Java/Python] Add the ability to enable Rust logging over FFI (resolves #482).
      • The granularity of the logs is controlled by the TYPEDB_DRIVER_LOG_LEVEL environment variable, which can be set to any value of error (default), warn, info, debug, or trace, in order of increasing verbosity. Setting the value to "typedb_driver=info" will show only the typedb-driver messages.
      • More advanced syntax is described in the env_logger documentation
    • [Rust] Network streams now borrow the transaction, so that the transaction can't be mistakenly dropped. (resolves #449)
  • Switch to our patched version of rules_rust (based off v0.30.0)

    We update rules_rust to v0.30.0 with a patch that resolves gherkin build errors.

  • Fix misleading error messages and packaging in NodeJS Driver

    • Fix misleading "Unable to connect to TypeDB Enterprise" when attempting a core server connection.
    • Strip build directory prefix from the NodeJS Driver distribution.
  • Implement missing test steps for Rust, Node, and Python

  • Update release template

  • Update release note driver URLs

  • Move CircleCI jobs for MacOS x86_64 drivers to run on mac arm64 machines
    We reconfigure our CircleCI pipeline to use MacOS arm64 machines for running build & test jobs for our TypeDB MacOS x86_64 drivers. This is in light of CircleCI sunsetting MacOS (intel) x86_64 resources in January 2024.

  • Document driver entry points

    We fix an issue in our auto-generated API documentation that failed to document the entry points to the driver: coreDriver() and enterpriseDriver()

    These exist in the root namespace of the driver. Documenting these required some changes to the parsers for each language, except Rust, with some work-arounds to allow specifying method names to document according to regex filters.

  • Remove stray factory dependency

    We remove the dependency of a snapshot deployment job on a recently removed test job.

TypeDB Driver 2.24.15

11 Oct 09:07
60dca02
Compare
Choose a tag to compare

Documentation: https://typedb.com/docs/clients/overview

Distribution

Rust driver

Available from https://crates.io/crates/typedb-driver
Documentation: https://typedb.com/docs/clients/rust-driver

Java driver

Available through https://repo.vaticle.com
Documentation: https://typedb.com/docs/clients/java-driver

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>2.24.15</version>
    </dependency>
</dependencies>

Python driver

PyPI package: https://pypi.org/project/typedb-driver
Documentation: https://typedb.com/docs/clients/python-driver

Available through https://pypi.org

pip install typedb-driver==2.24.15

NodeJS driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

npm install [email protected]

API changes

Backwards compatible: no

This version uses a new network protocol encoding, version 2.

All drivers:

  1. Installation and renaming: The 'client' is now universally replaced by 'driver'. Installable packages are now called 'typedb-driver' instead of 'typedb-client'
    a. Java driver is now split into two maven artifacts: JNI and Driver libraries
  2. Rename: use new terminology of 'enterprise' instead of 'cluster' throughout driver
  3. Merged interfaces: The Core and Enterprise interface have been merged. This means UserManager is now accessible from a Core driver instance, but will throw an exception of the TypeDB server does not support the feature.
  4. Replace Types with Methods: Concepts no longer have 'remote' and 'local' variants: all concepts are 'local'. However, methods that reach over the network for example setHas() now take a transaction as their first argument: setHas(tx, attribute). All methods that take a transaction as their first argument behave the same "remote" concepts did previously calling the same method.
  5. Replace overloads with arguments: Concept API methods that have 'explicit variants, such as getSubtypes and getSubtypesExplicit, now collapse into one method with argument: getSubtypes(tx, Transitivity.EXPLICIT|Transitivity.TRANSITIVE)

Python:

  1. Replace explicit get/set with properties: Interface for Options now uses properties, as well as taking named arguments in the constructor
  2. Property instead of Getter: Managers (ConceptManager, QueryManager, LogicManager, UserManager) are now accessible directly instead of using methods: eg. tx.query.insert(...) instead of tx.query().insert(...)

Node:

  1. Property instead of Getter: Managers (ConceptManager, QueryManager, LogicManager, UserManager) are now accessible directly instead of using methods: eg. tx.query.insert(...) instead of tx.query().insert(...)

Java:

  1. Change return type: All methods that returned 'Future's are now blocking and return after the operation finishes

Architectural Changes

We have centralised all TypeDB Driver libraries into this repository. This will make maintanance and development much simpler across the wide surface area exposed by the drivers.

New Features

  • Rearchitect Rust Driver to support full TypeDB feature set

  • Extend Rust Driver to support FFI

  • Create SWIG rules to generate C compatibility layer & C Driver

  • Create SWIG rules for Python and Java

  • Reimplement Java Driver using JNI over Rust

  • Reimplement Python Driver using FFI over Rust

  • Update TypeDB NodeJS Driver to the latest feature set

Bugs Fixed

  • Set release compilation mode to optimized

    We set the Bazel compilation mode for releases to opt to ensure that native-wrapped driver is maximally performant.

Code Refactors

  • Create unified network API for Core and Enterprise

  • Simplify Concept API by parametrizing methods with enum arguments

  • Delete Remote Concept API

Other Improvements

  • Update pest 2.4.0 => 2.7.4

    We update to pest and pest-derive v2.7.4, which among other things purports to fix the error where deriving Parser fails on "undeclared crate or module alloc" (pest-parser/pest#900).

    Synchronise changes for release into the development branch.

  • Update README.md

  • New issue template: Language Driver Request

    We added a new issue template for requesting a language to support.

  • Unpack native libraries into a temporary directory instead of current directory

TypeDB Client Java 2.18.1

02 Jun 19:53
42800e7
Compare
Choose a tag to compare

Documentation: http://docs.vaticle.com/docs/client-api/java

Distribution

Available through https://repo.vaticle.com

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-client</artifactid>
        <version>2.18.1</version>
    </dependency>
</dependencies>

New Features

Bugs Fixed

  • Split client construction and connection validation

    To prevent null pointer errors during failover tasks being executed, we go back to the previous model of first creating a client, then opening and validating the connection.

Code Refactors

Other Improvements

TypeDB Client Java 2.18.0

31 May 08:58
8c0caa1
Compare
Choose a tag to compare

Documentation: http://docs.vaticle.com/docs/client-api/java

Distribution

Available through https://repo.vaticle.com

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-client</artifactid>
        <version>2.18.0</version>
    </dependency>
</dependencies>

New Features

  • Introduce protocol versioning

    We use a new protocol API to perform a "connection open". This API does server-side protocol version compatibility checks, and also replaces our previous need to do a generic RPC call to check that the network is available.

    The user will receive an error about a protocol version mismatch if they are using a client-server combination that are not using exactly compatible protocols.

    1. The server will raise an error if the client tries to connect with a mismatching protocol version
    2. The client will raise an error if it tries to connect to the server and the server does not have that API

    Both errors imply a client-server mismatch and the error will suggest this as a fix.

    This change depends on typedb/typedb-protocol#185, which means that this client now implements protocol version 1.

  • Introduce Values to support expressions

    Introduce the 'Value' type, which is returned as the result of an expression's computation. This change follows from typedb/typeql#260, which outlines the capabilities of the new expression syntax.

    Values (representing any of Long, Double, Boolean, String, or DateTime) are returned as part of ConceptMap answers and are subtypes of Concept for the time being. Their main API is made of the .getValue() method and .getValueType() method, along with all the standard safe downcasting methods to convert a Concept into a Value, using Concept.isValue() and Concept.asValue().

    We also move the import location of ValueType from being nested in AttributeType to Concept and remove some APIs such as isKeyable from them.

  • Check BDD value equality using native types

    In BDD steps implementation we checked the equality of all values through the conversion to Strings. It might be incorrect when comparing Doubles especially if one of these values is a result of arithmetics.
    Now we compare Doubles by their absolute error.
    For consistency we compare all values using their native types equality.

  • Support generalised annotations and uniqueness

    We update the Typedb Protocol and TypeQL to the latest versions, which support the uniqueness annotation and generalised Type APIs. These generalised APIs allow querying by a set of annotations, rather than just boolean = true|false.

    For example:
    AttributeType.getOwners(boolean onlyKey) becomes AttributeType.getOwners(Set<TypeQLToken.Annotation> annotations)

    all usages of boolean flags to indicate key-ness should be replaced by using TypeQLToken.Annotation.KEY. The new @unique annotation is available as the token TypeQLToken.Annotation.UNIQUE.

  • Add behaviour test step definition for retrieving the currently connected user

    We've added a behaviour test step get connected user in line with changes made in typedb/typedb-behaviour#247

Bugs Fixed

Code Refactors

Other Improvements

  • Update release notes workflow

    We integrate the new release notes tooling. The release notes are now to be written by a person and committed to the repo.

  • Update BDD steps to reflect new annotation clause commas

  • Add build cache to build-dependency job

  • Add remote cache setup to ci tools

  • Use bazel cache for snapshot deployment jobs

  • Increase JSON serialisation test size

  • Enable the bazel cache

TypeDB Client Java 2.17.1

24 Apr 15:53
24653de
Compare
Choose a tag to compare

Documentation: http://docs.vaticle.com/docs/client-api/java

Distribution

Available through https://repo.vaticle.com

<repositories>
    <repository>
        <id>repo.vaticle.com</id>
        <url>https://repo.vaticle.com/repository/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-client</artifactid>
        <version>2.17.1</version>
    </dependency>
</dependencies>

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Update TypeQL to 2.17.0