Skip to content

Releases: typedb/typedb-console

TypeDB Console 3.5.4

10 Oct 18:51
cd6ea50

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.4

New Features

Bugs Fixed

  • Fix optional argument parsing and add tests

    We fix a reported error where optional arguments (such as the sha for a source command) would cause errors when not present in a script. In particular, the next script line would be consumed as the sha.

    For example, pasting the following script into a open transaction repl would error:

    source attributes.tql
    source entities.tql
    
    ++ source /Users/joshua/Documents/vaticle/gh_vaticle/typedb-console/attributes.tql
    source
    error: **Error executing command**
    Expected 'attributes.tql' to have sha256 'source', but calculated 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
    

    We fix this by annotating which commands are multiline and which are single line. Single-line commands always stop parsing at a newline. Only queries are allowed to be multiline at this point in time.

    We also add a new assembly test, which runs an extensive script testing various parts of Console:

    • user management
    • database management
    • import/export
    • transaction management
    • single line and multi-line queries

Code Refactors

Other Improvements

TypeDB Console 3.5.0

16 Sep 22:50
93de31d

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

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

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

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

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

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

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

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

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