Skip to content

Releases: typedb/typedb-driver

TypeDB Driver 3.0.0-alpha-5

04 Oct 15:52
2374db9
Compare
Choose a tag to compare
Pre-release

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>3.0.0-alpha-5</version>
    </dependency>
</dependencies>

Python driver

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

Available through https://pypi.org

pip install typedb-driver==3.0.0-alpha-5

New Features

  • Introduce TypeDB 3.0 Python driver
    We introduce the updated Python driver for the upcoming 3.0 release. To align with the updated Rust driver, we removed Concept API (so you could simplify your querying workflow with a single tx.query() entry point), squeezed sessions and transactions to standalone transactions, and remodeled messaging with the server.

    As it's an alpha release, some of the features are temporarily disabled both on the server and the driver's side:

    • Options;
    • User management;
    • Cloud connection with replicas information.

    Moreover, we no longer support Python 3.8 as its support comes to an end and we want to offer the full support of our newly introduced timezones with the standard library equally for all the versions of the language.

Bugs Fixed

  • Fix native object ownership checks in python driver
    Multiple rarely used features of the python driver used to be broken because of the native object misuse.

Code Refactors

Other Improvements

  • Bumped API version in antora config

  • Rename Maven groupId from "com.vaticle" to "com.typedb" to match the package path

  • Fix CircleCI jobs for Maven installation and Python builds

TypeDB Driver 3.0.0-alpha-4

27 Sep 15:38
3efaba3
Compare
Choose a tag to compare
Pre-release

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>3.0.0-alpha-4</version>
    </dependency>
</dependencies>

New Features

  • Introduce 3.0 Java driver
    We introduce the updated Java driver for the upcoming 3.0 release, featuring all the Rust driver's features in another language.
    Learn more about TypeDB 3.0 incoming features here: https://typedb.com/blog/typedb-3-roadmap

Bugs Fixed

  • Rust driver refinements
    We fix major issues:

    1. correctly passing the driver version string into the driver via the build system, instead of hard-coding it into the sources. This use a Cargo environment variable, which will always be available in released versions and is provided from the crate's Cargo.toml. During development, we just set the version to 0.0.0 because we don't particularly care about it!
    2. correctly request more answers from the query stream once a BatchContinue flag has been read by the user, as they consume the query answer stream. Previously, we immediately request more answers from the server as soon as we see the StreamContinue signal, in the network layer, which meant the whole stream was actually not lazy at all!
  • Fix decimal, datetime, datetime-tz value types processing

Code Refactors

  • Rename Java package com.vaticle.typedb to com.typedb and remove typeql dependencies.
    We rename the Java driver's package from com.vaticle.typedb to com.typedb.
    We remove excessive dependencies on typeql.

Other Improvements

TypeDB Driver 3.0.0-alpha-3

27 Sep 12:17
3663461
Compare
Choose a tag to compare
Pre-release

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

<repositories>
    <repository>
        <id>repo.typedb.com</id>
        <url>https://repo.typedb.com/public/public-release/maven/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>com.vaticle.typedb</groupid>
        <artifactid>typedb-driver</artifactid>
        <version>3.0.0-alpha-3</version>
    </dependency>
</dependencies>

New Features

  • Introduce 3.0 Java driver
    We introduce the updated Java driver for the upcoming 3.0 release, featuring all the Rust driver's features in another language.
    Learn more about TypeDB 3.0 incoming features here: https://typedb.com/blog/typedb-3-roadmap

Bugs Fixed

  • Rust driver refinements
    We fix major issues:

    1. correctly passing the driver version string into the driver via the build system, instead of hard-coding it into the sources. This use a Cargo environment variable, which will always be available in released versions and is provided from the crate's Cargo.toml. During development, we just set the version to 0.0.0 because we don't particularly care about it!
    2. correctly request more answers from the query stream once a BatchContinue flag has been read by the user, as they consume the query answer stream. Previously, we immediately request more answers from the server as soon as we see the StreamContinue signal, in the network layer, which meant the whole stream was actually not lazy at all!
  • Fix decimal, datetime, datetime-tz value types processing

Code Refactors

Other Improvements

TypeDB Driver 2.28.6-rc0

05 Aug 15:27
0e7efb7
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.6rc0

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.6-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.6-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.6-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.6-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.6-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.6-rc0" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.6-rc0
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.6-rc0

New Features

Bugs Fixed

  • Python. Fix driver.close(). Add integration tests for connection closing for both core and cloud
    We fix the issue #669, where the Python Driver didn't close the connection when calling TypeDBDriver.close().

Code Refactors

  • Invert address translation table: map public addresses to private

    NOTE: The address translation table now represents mapping from the desired connection addresses to the addresses the cloud servers are configured with. This change does not impact users of TypeDB Core or TypeDB Cloud through the TypeDB Cloud Platform (https://cloud.typedb.com/)

Other Improvements

  • Hermetic npm deployment

  • Build and deploy for Python 3.12

    We enable support for python 3.12 driver build.

  • Partial go driver implementation
    Implement Basic core driver functionality of creating and closing a database.

  • Make the author of the NodeJS and Python drivers "TypeDB Community"

    The author field of our NodeJS and Python drivers (package.json and PyPi configuration) is now TypeDB Community with the email being [email protected].

  • Fix CI builds with updated error messages from typedb and typedb-cloud artifacts
    We update typedb and typedb-cloud artifacts references to match TypeDB***Runners used in most of the languages with typeql versions used in Rust and Java drivers in CI.

    Previously, the versions were mismatched, which caused errors in CI because of the different error messages received from drivers (Rust typeql for Rust, Java typeql for Java, and direct values from the server for all the other drivers).

TypeDB Driver 2.28.4

14 Jun 12:04
6cfb17d
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.4

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.4" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.4" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.4" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.4" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.4" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.4" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.4
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.4

New Features

Bugs Fixed

  • JNI library loading uses a predetermined file name
    The unpacked JNI library now uses a pre-determined filename. This replaces logic to extract the filename from the packaged resource.

Code Refactors

Other Improvements

  • Update nodejs driver dependencies and fix builds based on the updated typescript rules

TypeDB Driver 2.28.2-rc1

17 May 15:11
a7227fa
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.2-rc1

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.2-rc1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.2-rc1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.2-rc1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.2-rc1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.2-rc1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.2-rc1" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.2-rc1
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.2-rc1

New Features

Bugs Fixed

  • JNI library loading uses a predetermined file name
    The unpacked JNI library now uses a pre-determined filename. This replaces logic to extract the filename from the packaged resource.

Code Refactors

Other Improvements

TypeDB Driver 2.28.1

16 May 10:43
66b096d
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.1

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.1" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.1" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.1
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.1

New Features

  • Copy jni library from input stream rather than file
    We now copy the jni library by reading from it as an input stream rather than as a file copy. This approach works when the JNI jars are nested, such as in Spring Boot projects.

Code Refactors

  • Fix misleading cloud encryption error message
    The old version of the cloud encryption error message confused the user in case, for example, their endpoint is not encrypted, but the connection is. There are also other potential causes of the received corrupt message status message, that we can't understand on a deeper level, so it's more correct to have a less specific error message here.

Other Improvements

  • Each API reference is combined in a single partial for easier preview and usage

    For each driver, we move all AsciiDoc include directives to a dedicated partial called api-reference.adoc in the drivers repo.
    This way, all the content can be previewed from the typedb-driver repo and included in the docs web content with a single include directive.

TypeDB Driver 2.28.0

30 Apr 17:11
e642897
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.0

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.0" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.0
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.0

New Features

  • Implement a method to convert a JSON object to a JSON string

    The toString() method is callable for JSON class objects. It returns a string.

  • Address translation

    We allow the user to provide a translation map from the advertised server addresses (now treated as generic server names) to the actual addresses the driver shall use to connect to the cloud instances. We require the user to provide the full mapping.

    Example usage:

    Python:

    with TypeDB.cloud_driver({
                "0.deployment-UUID.cloud.typedb.com:1729": "localhost:11729",
                "1.deployment-UUID.cloud.typedb.com:1729": "localhost:21729",
                "2.deployment-UUID.cloud.typedb.com:1729": "localhost:31729"
            }, credential) as driver:
        pass

    Rust:

    Connection::new_cloud_with_translation(                                                        
        [                                                                                          
            ("0.deployment-UUID.cloud.typedb.com:1729", "localhost:11729"),
            ("1.deployment-UUID.cloud.typedb.com:1729", "localhost:21729"),
            ("2.deployment-UUID.cloud.typedb.com:1729", "localhost:31729"),
        ].into(),                                                                                  
        credential                                                                                   
    )                                                                                              
  • Introduce packaging, distribution and documentation for the C# driver

    We introduce packaging, distribution and documentation C# driver for TypeDB (the original driver PR). It is built using the cross-platform .NET 6 framework.

    Usage:

    The driver is distributed as a series of Nuget packages. To use the driver, import the latest versions of the driver (TypeDB.Driver) and its Pinvoke runtime (TypeDB.Driver.Pinvoke) suitable for your platform.

    CS project:
    Here is an example from a .csproj for MacOS x86-64:

    <PackageReference Include="TypeDB.Driver" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version={VERSION} />

    If you aim to build a platform-independent package, reference all the needed runtimes (it will affect the size of your application by downloading a respective set of platform-specific dynamic libraries):

    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version={VERSION} />
    ...

    Bazel:

    1. Import both the TypeDB.Driver and TypeDB.Driver.Pinvoke nuget packages as dependencies to your build rule.
    2. For development, you can also use a csharp bazel rule, passing targets //csharp:driver-csharp (the driver itself), //csharp/Api:api (exposed Api namespace), //csharp/Common:common (exposed Common namespace) as dependencies.

    A simple usage example (see csharp/Test/Integration/Examples for more):

    using TypeDB.Driver.Api;
    using TypeDB.Driver.Common;
    
    public class TypeDBExample
    {
            public void SetupTypeDB()
            {
                string dbName = "access-management-db";
                string serverAddr = "127.0.0.1:1729";
    
                try
                {
                    using (ITypeDBDriver driver = Drivers.CoreDriver(serverAddr))
                    {
                        driver.Databases.Create(dbName);
                        IDatabase database = driver.Databases.Get(dbName);
    
                        using (ITypeDBSession session = driver.Session(dbName, SessionType.Schema))
                        {
                            using (ITypeDBTransaction transaction = session.Transaction(TransactionType.Write))
                            {
                                transaction.Query.Define("define person sub entity;").Resolve();
    
                                string longQuery = "define name sub attribute, value string; person owns name;";
                                transaction.Query.Define(longQuery).Resolve();
    
                                transaction.Commit();
                            }
                        }
    
                        database.Delete();
                    }
                }
                catch (TypeDBDriverException e)
                {
                    Console.WriteLine($"Caught TypeDB Driver Exception: {e}");
                }
            }
    }
    
  • Introduce C# driver without documentation and deployment

    We introduce the C# driver for TypeDB. It is built using the cross-platform .NET 6 framework.

    Usage: Deployment and usage examples will be provided in a separate pull request. Current state of the code lets you compiling the driver + writing and running behaviour and integration tests for it.
    The driver is expected to be a Nuget package, which could be added as a dependency to a project and referenced via "using" statements inside the users' code for all platforms.

    Architecture: The C# driver is a thin wrapper around the TypeDB Rust driver, introducing classes for a more intuitive interface. Mostly each C# object holds a reference to the corresponding native Rust object, using an FFI (SWIG for C#) for the native object wrappers generation and resource management.

    Any error encountered will throw a TypeDBDriverException. Note that methods which return an IEnumerable or a Promise and encounter a server-side error will only throw when the return objects are evaluated (e.g. iterate over or call a Linq method for an IEnumerable and call Resolve() for a Promise).

    A simple usage example:

    // Inside a try-catch block
    using (ITypeDBDriver driver = TypeDB.CoreDriver(TypeDB.DEFAULT_ADDRESS))
    {
        string dbName = "mydb";
        driver.Databases.Create(dbName);
        IDatabase mydb = driver.Databases.Get(dbName);
        System.Console.WriteLine(mydb.Name);
    
        using (ITypeDBSession schemaSession = driver.Session(dbName, SessionType.SCHEMA))
        {
            using (ITypeDBTransaction writeTransaction = schemaSession.Transaction(TransactionType.WRITE))
            {
                string defineQuery = "...some define query...";
                writeTransaction.Query.Define(defineQuery).Resolve();
                writeTransaction.Commit();
            }
        }
    
        mydb.Delete();
    }
    

Bugs Fixed

Code Refactors

  • Implement new steps for getting answers from templated get

    We implement a new steps in every driver for a new step: 'get answers of templated typeql get', which is a modification of the existing 'templated typeql get; throws exception'

  • Remove copyright year from apache license headers

    To simplify maintanance, we remove the copyright year from the Apache license headers. These aren't (to our best knowledge) actually legally required, since copyright is granted automatically from the moment a work is created (US law).

Other Improvements

  • Fixes to C++ structure based on feedback from website
    Various improvements to the document generation tools to make the C++ and C driver docs on the website more...
Read more

TypeDB Driver 2.28.0-rc0

16 Apr 10:38
92a91f8
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.28.0rc0

NodeJS driver

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

npm install [email protected]

C# driver

NuGet package: https://www.nuget.org/packages/TypeDB.Driver
Documentation: https://typedb.com/docs/drivers/csharp/overview

<ItemGroup>
    <PackageReference Include="TypeDB.Driver" Version="2.28.0-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version="2.28.0-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version="2.28.0-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version="2.28.0-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version="2.28.0-rc0" />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-arm64" Version="2.28.0-rc0" />
</ItemGroup>

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.28.0-rc0
Documentation: https://typedb.com/docs/drivers/cpp/overview

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.28.0-rc0

New Features

  • Address translation

    We allow the user to provide a translation map from the advertised server addresses (now treated as generic server names) to the actual addresses the driver shall use to connect to the cloud instances. We require the user to provide the full mapping.

    Example usage:

    Python:

    with TypeDB.cloud_driver({
                "0.deployment-UUID.cloud.typedb.com:1729": "localhost:11729",
                "1.deployment-UUID.cloud.typedb.com:1729": "localhost:21729",
                "2.deployment-UUID.cloud.typedb.com:1729": "localhost:31729"
            }, credential) as driver:
        pass

    Rust:

    Connection::new_cloud_with_translation(                                                        
        [                                                                                          
            ("0.deployment-UUID.cloud.typedb.com:1729", "localhost:11729"),
            ("1.deployment-UUID.cloud.typedb.com:1729", "localhost:21729"),
            ("2.deployment-UUID.cloud.typedb.com:1729", "localhost:31729"),
        ].into(),                                                                                  
        credential                                                                                   
    )                                                                                              
  • Introduce packaging, distribution and documentation for the C# driver

    We introduce packaging, distribution and documentation C# driver for TypeDB (the original driver PR). It is built using the cross-platform .NET 6 framework.

    Usage:

    The driver is distributed as a series of Nuget packages. To use the driver, import the latest versions of the driver (TypeDB.Driver) and its Pinvoke runtime (TypeDB.Driver.Pinvoke) suitable for your platform.

    CS project:
    Here is an example from a .csproj for MacOS x86-64:

    <PackageReference Include="TypeDB.Driver" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version={VERSION} />

    If you aim to build a platform-independent package, reference all the needed runtimes (it will affect the size of your application by downloading a respective set of platform-specific dynamic libraries):

    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.linux-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.win-x64" Version={VERSION} />
    <PackageReference Include="TypeDB.Driver.Pinvoke.osx-arm64" Version={VERSION} />
    ...

    Bazel:

    1. Import both the TypeDB.Driver and TypeDB.Driver.Pinvoke nuget packages as dependencies to your build rule.
    2. For development, you can also use a csharp bazel rule, passing targets //csharp:driver-csharp (the driver itself), //csharp/Api:api (exposed Api namespace), //csharp/Common:common (exposed Common namespace) as dependencies.

    A simple usage example (see csharp/Test/Integration/Examples for more):

    using TypeDB.Driver.Api;
    using TypeDB.Driver.Common;
    
    public class TypeDBExample
    {
            public void SetupTypeDB()
            {
                string dbName = "access-management-db";
                string serverAddr = "127.0.0.1:1729";
    
                try
                {
                    using (ITypeDBDriver driver = Drivers.CoreDriver(serverAddr))
                    {
                        driver.Databases.Create(dbName);
                        IDatabase database = driver.Databases.Get(dbName);
    
                        using (ITypeDBSession session = driver.Session(dbName, SessionType.Schema))
                        {
                            using (ITypeDBTransaction transaction = session.Transaction(TransactionType.Write))
                            {
                                transaction.Query.Define("define person sub entity;").Resolve();
    
                                string longQuery = "define name sub attribute, value string; person owns name;";
                                transaction.Query.Define(longQuery).Resolve();
    
                                transaction.Commit();
                            }
                        }
    
                        database.Delete();
                    }
                }
                catch (TypeDBDriverException e)
                {
                    Console.WriteLine($"Caught TypeDB Driver Exception: {e}");
                }
            }
    }
    
  • Introduce C# driver without documentation and deployment

    We introduce the C# driver for TypeDB. It is built using the cross-platform .NET 6 framework.

    Usage: Deployment and usage examples will be provided in a separate pull request. Current state of the code lets you compiling the driver + writing and running behaviour and integration tests for it.
    The driver is expected to be a Nuget package, which could be added as a dependency to a project and referenced via "using" statements inside the users' code for all platforms.

    Architecture: The C# driver is a thin wrapper around the TypeDB Rust driver, introducing classes for a more intuitive interface. Mostly each C# object holds a reference to the corresponding native Rust object, using an FFI (SWIG for C#) for the native object wrappers generation and resource management.

    Any error encountered will throw a TypeDBDriverException. Note that methods which return an IEnumerable or a Promise and encounter a server-side error will only throw when the return objects are evaluated (e.g. iterate over or call a Linq method for an IEnumerable and call Resolve() for a Promise).

    A simple usage example:

    // Inside a try-catch block
    using (ITypeDBDriver driver = TypeDB.CoreDriver(TypeDB.DEFAULT_ADDRESS))
    {
        string dbName = "mydb";
        driver.Databases.Create(dbName);
        IDatabase mydb = driver.Databases.Get(dbName);
        System.Console.WriteLine(mydb.Name);
    
        using (ITypeDBSession schemaSession = driver.Session(dbName, SessionType.SCHEMA))
        {
            using (ITypeDBTransaction writeTransaction = schemaSession.Transaction(TransactionType.WRITE))
            {
                string defineQuery = "...some define query...";
                writeTransaction.Query.Define(defineQuery).Resolve();
                writeTransaction.Commit();
            }
        }
    
        mydb.Delete();
    }
    

Bugs Fixed

  • Update Git patch during Windows Circle CI initial job setup

    We update the Windows Circle CI git patch file to be compatible with the WORKSPACE file which has been recently updated. We also add a check of whether the git patch was successfully applied to catch such mistakes early in the future.

  • Fix deadsnakes ppa in Circle CI sync-dependencies release job

    Add -y to the add-apt-repository command in the Circle CI sync-dependencies release job.

Code Refactors

  • Implement new steps for getting answers from templated get

    We implement a new steps in every driver for a new step: 'get answers of templat...

Read more

TypeDB Driver 2.27.0

23 Mar 22:04
5932aad
Compare
Choose a tag to compare

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

Distribution

Rust driver

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

Java driver

Available through https://repo.typedb.com
Documentation: https://typedb.com/docs/drivers/java/overview

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

Python driver

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

Available through https://pypi.org

pip install typedb-driver==2.27.0

NodeJS driver

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

npm install [email protected]

C++ driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-cpp+version:2.27.0

C driver

Compiled distributions comprising headers and shared libraries available at: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-driver-clib+version:2.27.0
Documentation: https://typedb.com/docs/drivers/cpp/overview

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Enable deploy-snapshot jobs on development

  • Add -y to apt udpate, and replaced apt-get with apt

  • Documentation for C driver
    Adds documentation for the C driver.