clickhouse

package
v0.0.0-...-05d1b2a Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Silent = "silent"
	Warn   = "warn"
	Error  = "error"
	Info   = "info"
)

Variables

This section is empty.

Functions

func Connect

func Connect(opts ...Option) error

func GetDB

func GetDB(name ...string) *gorm.DB

Types

type Option

type Option func(*Options)

func Database

func Database(database string) Option

func Host

func Host(host string) Option

func MaxIdleConn

func MaxIdleConn(num int) Option

func MaxLifeTime

func MaxLifeTime(t time.Duration) Option

func MaxOpenConn

func MaxOpenConn(num int) Option

func Name

func Name(name string) Option

func Password

func Password(password string) Option

func Port

func Port(port int32) Option

func ReadTimeout

func ReadTimeout(t int) Option

func Username

func Username(username string) Option

func WriteTimeout

func WriteTimeout(t int) Option

type Options

type Options struct {
	Name         string
	Host         string
	Port         int32
	Username     string
	Password     string
	Database     string
	MaxIdleConn  int
	MaxOpenConn  int
	MaxLifeTime  time.Duration
	ReadTimeout  int
	WriteTimeout int
	LogLevel     string
}

Jump to

Keyboard shortcuts

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