function createClient({ host, port, https, username, password, database, readonly }) {
  return new ClickHouse({
    host,
    port,
    protocol: https ? 'https:' : 'http:',
    auth: `${username || 'default'}:${password}`,
    queryOptions: {
      database,
      readonly: readonly ? 1 : 0
    }
  });
}
The following function will create a ClickHouse client
@param {String} host server host
@param {Number} port server port
@param {String} username Clickhouse username
@param {String} password Clickhouse password
@param {String} database database name
@returns {Object} ClickHouse client