public String getDatabase(ClickHouseConfig config) {
        return !ClickHouseChecker.nonNull(config, ClickHouseConfig.TYPE_NAME).hasOption(ClickHouseClientOption.DATABASE)
                && hasPreferredDatabase() ? this.config.getDatabase() : config.getDatabase();
    }
Gets database of the node. When {@link #hasPreferredDatabase()} is
{@code false}, it will use database from the given configuration.

@param config non-null configuration to get default database
@return database of the node
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java