ClickhouseDriver-class: Class ClickhouseDriver

Description Usage Arguments Value Examples

Description

This driver never needs to be unloaded and hence dbUnload() is a null-op.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clickhouse()

## S4 method for signature 'ClickhouseDriver'
show(object)

## S4 method for signature 'ClickhouseDriver'
dbGetInfo(dbObj, ...)

## S4 method for signature 'ClickhouseDriver'
dbIsValid(dbObj, ...)

## S4 method for signature 'ClickhouseDriver'
dbUnloadDriver(drv, ...)

loadConfig(CONFIG_PATHS, DEFAULT_PARAMS, pre_config)

## S4 method for signature 'ClickhouseDriver'
dbConnect(
  drv,
  host = "localhost",
  port = 9000,
  dbname = "default",
  user = "default",
  password = "",
  compression = "lz4",
  config_paths = c("./RClickhouse.yaml", "~/.R/RClickhouse.yaml",
    "/etc/RClickhouse.yaml"),
  Int64 = c("integer64", "integer", "numeric", "character"),
  toUTF8 = TRUE,
  ...
)

## S4 method for signature 'ClickhouseDriver'
dbDataType(dbObj, obj, ...)

Arguments

drv

ClickHouse database driver.

CONFIG_PATHS

a list of configuration paths

DEFAULT_PARAMS

a list of configuration defaults

pre_config

initialization set

host

name of the host on which the database is running.

port

port on which the database is listening.

user

name of the user to connect as.

password

the user's password.

compression

the compression method for the connection (lz4 by default).

config_paths

paths where config files are searched for; order of paths denotes hierarchy (first string has highest priority etc.).

Int64

The R type that 64-bit integer types should be mapped to, default is [bit64::integer64], which allows the full range of 64 bit integers.

toUTF8

logical, should character variables be converted to UTF-8. Default is TRUE.

db

name of the default database.

Value

a merged configuration

A database connection.

Examples

1
2
3
4
5
6
library(DBI)
RClickhouse::clickhouse()
## Not run: 
conn <- dbConnect(RClickhouse::clickhouse(), host="localhost")

## End(Not run)

RClickhouse documentation built on Jan. 13, 2022, 5:10 p.m.