Scalar DB 3.6 is released!

Toshihiro Suzuki
Scalar Engineering
Published in
2 min readJul 20, 2022

We recently released Scalar DB 3.6.0 as a new minor version of Scalar DB. The new release adds a new SQL-like interface in addition to the existing interfaces such as CRUD and GraphQL.This release also has significant improvements on existing APIs while preserving backward compatibility, making the library much easier to use.

This article briefly describes the SQL interface and the API improvements.

SQL interface

The SQL interface added in this release allows Scalar DB users to interact with Scalar DB in an SQL-like language. This enables you to run SQL for achieving not only universal transaction management on heterogeneous databases, but also transaction management for Microservices added in version 3.2. In addition, we provide a JDBC driver using the SQL interface so that you can interact with Scalar DB in the same way as you would do with other JDBC-compliant databases.

The documentation for Scalar DB SQL can be found here. If you want to learn Scalar DB SQL, please see Getting Started with Scalar DB SQL first. If you are interested in using Scalar DB JDBC, please see Getting Started with Scalar DB JDBC. If you would like to know what features are available, please see Scalar DB SQL Grammar, which explains the syntax of Scalar DB SQL.

API improvements

Please see here for a description of the new API.

There are many minor changes to the API after the improvements, but this article describes some of the major changes. All of the changes have been made while preserving backward compatibility, so the previous code will still work with Scalar DB 3.6.0.

Add Builder for operations (Get, Scan, Put, Delete)

In Scalar DB 3.6.0, you can create operations by using Builder as follows:

Examples of operation builders

NULL can now be set for all data types

Previously, NULL could be set only for Text and Blob types, but from Scalar DB 3.6.0, NULL can be set for all data types as follows:

Example of Put with NULL

Changes in the usage of the Result class

The way to get the value of a column in the Result class has been changed as follows:

Examples of how to get column values in Result

Also, the following is how to get whether a column value is null or not:

Example of isNull() in Result

Add DistributedTransactionAdmin

We added DistributedTransactionAdmin to abstract administrative operations such as creating/deleting transaction tables. With this, you can execute administrative operations without being aware of the transaction implementation. For more information, please see here.

Summary

This article described the recently released Scalar DB 3.6.0. This release primarily added an SQL-like declarative interface and significant API improvements while preserving backward compatibility, which this article briefly described.

--

--