repo

package
v0.0.0-...-e1f17c8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickhouseRepo

type ClickhouseRepo struct {
	// contains filtered or unexported fields
}

func NewClickhouseRepo

func NewClickhouseRepo(config ClickhouseRepoConfig) (*ClickhouseRepo, error)

func (*ClickhouseRepo) BatchInsert

func (cr *ClickhouseRepo) BatchInsert(ctx context.Context, table string, columns []string, vals [][]interface{}, async bool) error

func (*ClickhouseRepo) Exec

func (cr *ClickhouseRepo) Exec(ctx context.Context, sql string) error

func (*ClickhouseRepo) Ping

func (cr *ClickhouseRepo) Ping(ctx context.Context) error

type ClickhouseRepoConfig

type ClickhouseRepoConfig struct {
	Host     string // 服务端主机
	Port     int    // 端口
	DB       string // 数据库
	User     string // 用户名
	Password string // 密码
}

type DemoRepo

type DemoRepo struct {
}

func NewDemoRepo

func NewDemoRepo(config ClickhouseRepoConfig) (*DemoRepo, error)

func (*DemoRepo) BatchInsert

func (cr *DemoRepo) BatchInsert(ctx context.Context, table string, columns []string, vals [][]interface{}, async bool) error

type Repo

type Repo interface {
	InsertM(ctx context.Context, columns []string, val [][]interface{}) error
}

Jump to

Keyboard shortcuts

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