boost::redis::config::database_index

(Deprecated) Database index to pass to the SELECT command during connection establishment.

Synopsis

Declared in <boost/redis/config.hpp>

std::optional<int> database_index = 0;

Description

If use_setup is false (the default), and this field is set to a non‐empty optional, and its value is different than zero, a SELECT command will be issued during connection establishment to set the logical database index. By default, no SELECT command is sent.

When using Sentinel, this setting applies to masters and replicas.

Deprecated

This setting is deprecated and will be removed in a subsequent release. Please set setup, instead:

cfg.use_setup = true;
cfg.setup.push("SELECT", 4); // select database index 4

Created with MrDocs