ScalarDB SQL Configurations
This document explains the configurations of ScalarDB SQL.
Client side configurations
The ScalarDB SQL client-side library offers two connection modes: Direct and Server. With Direct mode, the library directly uses the ScalarDB API. On the other hand, with Server mode, the library uses the ScalarDB API indirectly through ScalarDB SQL Server.
ScalarDB SQL has Direct mode–specific configurations and Server mode–specific configurations. The following sections explain the common configurations for the two connection modes, the Direct mode–specific configurations, and the Server mode–specific configurations.
Common configurations
The common configurations for the connection modes (Direct mode and Server mode) are as follows:
Name | Description | Default |
---|---|---|
scalar.db.sql.connection_mode | Connection mode. DIRECT or SERVER can be set. | |
scalar.db.sql.default_transaction_mode | Default transaction mode. TRANSACTION or TWO_PHASE_COMMIT_TRANSACTION can be set. | TRANSACTION |
scalar.db.sql.default_namespace_name | Default namespace name. If you don't specify a namespace name in your SQL statement, this value is used. |
If you don't specify the connection mode and if you have only one dependency on the connection mode, the connection mode will be used.
Configurations for Direct mode
The configurations for Direct mode are as follows:
Name | Description | Default |
---|---|---|
scalar.db.sql.statement_cache.enabled | Enable the statement cache. | false |
scalar.db.sql.statement_cache.size | Maximum number of cached statements. | 100 |
Note that in Direct mode, you need to configure the transaction manager, as well. For details about configurations for the transaction manager, see Transaction manager configurations.
In addition, for details about ScalarDB SQL Server, see ScalarDB SQL Server.
Configurations for Server mode
The configurations for Server mode are as follows:
Name | Description | Default |
---|---|---|
scalar.db.sql.server_mode.host | Host name for ScalarDB SQL Server to connect to. | false |
scalar.db.sql.server_mode.port | Port number for ScalarDB SQL Server. | 60052 |
scalar.db.sql.server_mode.deadline_duration_millis | Deadline duration (milliseconds) for gRPC connections. | 60000 (60 seconds) |
scalar.db.sql.server_mode.max_inbound_message_size | Maximum message size allowed for a single gRPC frame. | The gRPC default value |
scalar.db.sql.server_mode.max_inbound_metadata_size | Maximum size of metadata allowed to be received. | The gRPC default value |