clickhouse

package
v0.4.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Driver drivers.DBDriver = "clickhouse"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickhouseConnector

type ClickhouseConnector struct {
	drivers.GormQuery
	// contains filtered or unexported fields
}

func NewClickhouseConnector

func NewClickhouseConnector(connection string, config *Connection) (*ClickhouseConnector, error)

func (*ClickhouseConnector) Connect

func (i *ClickhouseConnector) Connect() error

func (*ClickhouseConnector) GetConnection

func (i *ClickhouseConnector) GetConnection() string

func (*ClickhouseConnector) GetDB

func (i *ClickhouseConnector) GetDB() any

func (*ClickhouseConnector) GetDriver

type Connection

type Connection struct {
	Driver      drivers.DBDriver `json:"driver"`
	Host        string           `json:"host"`
	Port        int              `json:"port"`
	Database    string           `json:"database"`
	Username    string           `json:"username"`
	Password    string           `json:"password"`
	ReadTimeout int64            `json:"read_timeout"`
	DialTimeout int64            `json:"dial_timeout"`
	Debug       bool             `json:"debug"`
	Pool        *ConnectionPool  `json:"pool"`
}

func (*Connection) GetDriver

func (i *Connection) GetDriver() drivers.DBDriver

func (*Connection) IsDebug

func (i *Connection) IsDebug() bool

func (*Connection) NewConnector

func (i *Connection) NewConnector(name string) (drivers.ConnectorInterface, error)

type ConnectionPool

type ConnectionPool struct {
	MaxIdleConnections int `json:"max_idle_connections"`
	MaxConnections     int `json:"max_connections"`
	ConnectTimeout     int `json:"connect_timeout"`
	MaxIdleTime        int `json:"max_idle_time"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL