Skip to content

Releases: typedb/typedb-console

TypeDB Console 3.5.0

16 Sep 22:50
93de31d
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.5.0

New Features

  • Make version argument not require other fields and unify error messaging
    Fix an incorrect requirement of username and address when executing console --version. Additionally, unify the format of error messages and add colors (e.g., the "error" header is printed in bold red and argument references are printed in yellow, similar to some of the existing parsing errors).

Bugs Fixed

Code Refactors

Other Improvements

  • Fix incorrect error println

  • Fix build and cargo lock
    Fix build and cargo lock

  • Introduce 'create-init' command to load a new database from schema/data

    We introduce a new command database create-init, which

    1. create the new database
    2. loads a provided schema file (from URL, or from local file)
    3. loads a provided data file (from URL or from local file)

    Command format:

    database create-init <db> <schema file> <data file> <[optional] schema file sha256 (hex or sha256:hex)> <[optional] data file sha256 (hex or sha256:hex)>
    

    Usage example to load bookstore example from typedb-examples:

    >> database create-init bookstore https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-schema.tql https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql
    

    You can also optionally provide sha256 checksums to verify your files are correct (these come from the Github releases page):

    >> database create-init bookstore https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-schema.tql https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql sha256:b2de488d9f64ccdfdba016029c7932be69ec5d35d18977c85bb12ad4cc97e95f sha256:828806afe1ce939d0ee87d6ae89598f5d7f967155c7757263b151673480bcad1
    

    We've also upgraded the source command in a transaction to allow reading from a remote URL, not just local files:

    bookstore::write >> source https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql 
    

    This can also optionally take a sha256 (the sha256: prefix optional):

    bookstore::write >> source https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql 828806afe1ce939d0ee87d6ae89598f5d7f967155c7757263b151673480bcad1
    

    These commands can also receive local in relative or absolute path formats.

TypeDB Console 3.5.0-rc0

08 Sep 21:19
f6dbc69
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.5.0-rc0

New Features

  • Make version argument not require other fields and unify error messaging
    Fix an incorrect requirement of username and address when executing console --version. Additionally, unify the format of error messages and add colors (e.g., the "error" header is printed in bold red and argument references are printed in yellow, similar to some of the existing parsing errors).

Bugs Fixed

Code Refactors

Other Improvements

  • Introduce 'create-init' command to load a new database from schema/data

    We introduce a new command database create-init, which

    1. create the new database
    2. loads a provided schema file (from URL, or from local file)
    3. loads a provided data file (from URL or from local file)

    Command format:

    database create-init <db> <schema file> <data file> <[optional] schema file sha256 (hex or sha256:hex)> <[optional] data file sha256 (hex or sha256:hex)>
    

    Usage example to load bookstore example from typedb-examples:

    >> database create-init bookstore https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-schema.tql https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql
    

    You can also optionally provide sha256 checksums to verify your files are correct (these come from the Github releases page):

    >> database create-init bookstore https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-schema.tql https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql sha256:b2de488d9f64ccdfdba016029c7932be69ec5d35d18977c85bb12ad4cc97e95f sha256:828806afe1ce939d0ee87d6ae89598f5d7f967155c7757263b151673480bcad1
    

    We've also upgraded the source command in a transaction to allow reading from a remote URL, not just local files:

    bookstore::write >> source https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql 
    

    This can also optionally take a sha256 (the sha256: prefix optional):

    bookstore::write >> source https://github.com/typedb/typedb-examples/releases/download/3.5.0/bookstore-data.tql 828806afe1ce939d0ee87d6ae89598f5d7f967155c7757263b151673480bcad1
    

    These commands can also receive local in relative or absolute path formats.

TypeDB Console 3.4.4

05 Aug 09:42
8372f8b
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.4.4

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Create specific exit error codes

    We generate specific error codes to check when executing commands and scripts programmatically.
    We now have the following exit codes:

      Success = 0,
      GeneralError = 1,
      CommandError = 2,
      ConnectionError = 3,
      UserInputError = 4,
      QueryError = 5,
    

TypeDB Console 3.4.0

16 Jun 18:02
c7bdc17
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.4.0

New Features

  • Introduce database export and import
    Add database export and database import operations.

    Database export saves the database information (its schema and data) on the client machine as two files at provided locations:

    # database export <name> <schema file location> <data file location>
    database export my-database export/my-database.typeql export/my-database.typedb
    

    Database import uses the exported files to create a new database with equivalent schema and data:

    # database export <name> <schema file location> <data file location>
    database import their-database export/my-database.typeql export/my-database.typedb
    
  • Support relative script and source commands

    We support using relative paths for the --script command (relative to the current directory), as well as relative paths for the REPL source command.

    When source is invoked from a script, the sourced file is relativised to the script, rather than the current working directory.

Bugs Fixed

Code Refactors

Other Improvements

TypeDB Console 3.4.0-rc0

11 Jun 10:01
8beb064
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.4.0-rc0

New Features

  • Introduce database export and import
    Add database export and database import operations.

    Database export saves the database information (its schema and data) on the client machine as two files at provided locations:

    # database export <name> <schema file location> <data file location>
    database export my-database export/my-database.typeql export/my-database.typedb
    

    Database import uses the exported files to create a new database with equivalent schema and data:

    # database export <name> <schema file location> <data file location>
    database import their-database export/my-database.typeql export/my-database.typedb
    
  • Support relative script and source commands

    We support using relative paths for the --script command (relative to the current directory), as well as relative paths for the REPL source command.

    When source is invoked from a script, the sourced file is relativised to the script, rather than the current working directory.

Bugs Fixed

Code Refactors

Other Improvements

TypeDB Console 3.2.0

06 May 10:47
42949ab
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.2.0

New Features

  • Add database 'schema' command to retrieve the database schema

  • Increase transaction timeout
    Set transaction timeout for opened transactions to 1 hour.

    This change significantly lowers the impact of #287.

  • Improve multiline query support

    We improve multi-line query support to allow copy-pasting queries and scripts containing empty newlines. In particular this makes pasting entire schema definitions from files.

    For example, pasting a console script opening a transaction, defining a schema containing newlines, and committing, is now possible:

    >> transaction schema test
        define 
          entity person;  # newlines are allowed in pasted scripts:
         
          attribute name, value string;
        
          person owns name; 
     
        commit
    

    Empty newlines when written interactively still cause queries to be submitted. However, an explicit query end; clause is a valid alternative now:

    >> transaction schema test
        define 
          entity person;  # newlines are allowed in pasted scripts:
         
          attribute name, value string;
        
          person owns name; 
        end; # <--- will submit immediately
    

    Pasted query pipelines may now be ambiguous, such as the following example which by defaults executs a single "match-insert" query, even though there are newlines:

    > transaction schema test
      match $x isa person;
    
      insert $y isa person;
    
      commit
    

    To make this a "match" query and a separate "insert" query, we must use the end; markers:

    > transaction schema test
      match $x isa person;
      end;
    
      insert $y isa person;
      end;
    
      commit
    

    Note that now end is a reserved keyword and cannot be used as a type!

Bugs Fixed

Code Refactors

Other Improvements

  • Update typedb-driver dependency for token-based authentication

TypeDB Console 3.2.0-rc2

28 Apr 17:38
ef9b57b
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.2.0-rc2

New Features

  • Improve multiline query support

    We improve multi-line query support to allow copy-pasting queries and scripts containing empty newlines. In particular this makes pasting entire schema definitions from files.

    For example, pasting a console script opening a transaction, defining a schema containing newlines, and committing, is now possible:

    >> transaction schema test
        define 
          entity person;  # newlines are allowed in pasted scripts:
         
          attribute name, value string;
        
          person owns name; 
     
        commit
    

    Empty newlines when written interactively still cause queries to be submitted. However, an explicit query end; clause is a valid alternative now:

    >> transaction schema test
        define 
          entity person;  # newlines are allowed in pasted scripts:
         
          attribute name, value string;
        
          person owns name; 
        end; # <--- will submit immediately
    

    Pasted query pipelines may now be ambiguous, such as the following example which by defaults executs a single "match-insert" query, even though there are newlines:

    > transaction schema test
      match $x isa person;
    
      insert $y isa person;
    
      commit
    

    To make this a "match" query and a separate "insert" query, we must use the end; markers:

    > transaction schema test
      match $x isa person;
      end;
    
      insert $y isa person;
      end;
    
      commit
    

    Note that now end is a reserved keyword and cannot be used as a type!

  • Add database 'schema' command to retrieve the database schema

Bugs Fixed

Code Refactors

Other Improvements

TypeDB Console 3.2.0-rc0

15 Apr 14:14
8a8cd9c
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.2.0-rc0

New Features

Bugs Fixed

Code Refactors

Other Improvements

  • Update typedb-driver dependency for token-based authentication
    No changes to the UI/UX.

TypeDB Console 3.1.1

09 Apr 16:40
653a85c
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.1.1

New Features

  • Add user list command
    Add user list command to display the list of users existing on the server.

Bugs Fixed

Code Refactors

Other Improvements

TypeDB Console 3.1.0

07 Apr 16:22
9880676
Compare
Choose a tag to compare

Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:3.1.0

New Features

Rust console

We re-implement TypeDB console in Rust, using a slightly more sophisticated architecture. Most of the UX of the console remains the same, with the exception of three usages:

  • TLS enabled by default

TypeDB console enables TLS connections by default. This further will error if you try to connect to an HTTP endpoint, instead of an HTTPS one. This change was required because username and password are now required to connect to the any TypeDB 3.0 server.

To disable TLS (for example, for local development), use the --tls-disabled flag when booting TypeDB console. Note that this will send passwords in plaintext over the network.

  • Replacement of --core=<address> and --cloud=<address> with --address=<address>

To connect to a TypeDB server (either a Core/CE 3.0, or a Cloud 3.0 deployment) use the new --address=<address> argument to the console.

  • The command to open a transaction has changed
    >> transaction <db> <read|write|schema>
    

Has become:

>> transaction <read|write|schema> <db>

Note how the position of the database name has been swapped.

Build

This repository is now supports dual Bazel/Cargo build systems.

To run TypeDB console directly from this repository, please see the updated README!

Artifacts

As before, Console will be published as platform-specific archives. However, they now contain a single bash/bat file and the compiled console binary. No more Java libs or requirement to have Java installed!

We also no longer deploy a console-runner artifact, since it was only used to run the local assembly test. The assembly test is now written in rust, using an unpublished, repository-local runner library that drives both a Server and a Console in the test.

Note

Some details of the TypeDB Console UX has changed. Please try it out and don't hesitate to reach out to share your thoughts!

Bugs Fixed

Code Refactors

  • Update TypeDB driver dependency and constructor
    Update TypeDB driver dependency and use the unified driver constructor to support the latest API.

Other Improvements

  • Fix query command parsing

  • Fix next-command index bug

  • Improve UX of Ctrl+C and fix bugs in command submission

    We an important bug:
    1.

    >> match
    $x isa person; |
    
    1. navigate cursor and enter newlines
    >> match
    
    | $x isa person;
    

    Various things would break, including submitting the "script" prematurely. Now, the block is only submitted when the sequence of commands entered are a valid script.

    Additionally, the UX if Ctr+C is improved: when hitting Ctrl+C on a non-empty line, the line is retained, rather than cleared.

  • Multiline script paste and unified scripting format

    We refactor the Console to allow pasting a "script" into the current REPL. This will be correctly interpreted and executed as a block of separate commands. The inputs must look as they would when using the console interactively:

    database create tmp
    transaction schema tmp
    define entity person;
    
    commit
    

    With the empty newline, as in regular interactive console, being used to mark the end of the query.

    This is particularly useful for pasting fully self-contained examples from TypeDB documentation into the console!

    The format of --file scripts (now called --script) must follow this same format, instead of using \ to write multiline queries. We will refer to this as the TypeDB Console Script, or Scripted TypeQL in some contexts. We use .tqls for console scripts, instead of the usual .tql which contains pure TypeQL.

  • Strip newline before adding to history

  • Implement search based on currently entered term

  • Fix test-assembly

  • Clear line if ctrl+c is hit with content on the current line

  • Fix UX bugs and documentation

  • Incorporate UX improvements, fix windows distribution

  • Implement uncommitted changes indicator

  • Update database list error messages to print that none were found