Documentation
¶
Index ¶
- Variables
- func LookupClickHouseClient() (string, error)
- func NativeExportCH(ctx context.Context, cfg *shared.DBConfig, tables []string, ...) error
- func NativeImportCH(ctx context.Context, cfg *shared.DBConfig, files []string, ...) error
- func New() driver.Driver
- func QuoteCol(name string) string
- func QuoteVal(v string) string
- func SupportedCmdExport() bool
- func SupportedCmdImport() bool
- type ClickHouse
- func (c *ClickHouse) CreateData() error
- func (c *ClickHouse) CreateDb() error
- func (c *ClickHouse) CreateTable() error
- func (c *ClickHouse) Export() error
- func (c *ClickHouse) Import() error
- func (c *ClickHouse) Indexes() error
- func (c *ClickHouse) Info() error
- func (c *ClickHouse) Init(ctx echo.Context, auth *driver.DbAuth)
- func (c *ClickHouse) IsSupported(operation string) bool
- func (c *ClickHouse) ListData() error
- func (c *ClickHouse) ListDb() error
- func (c *ClickHouse) ListTable() error
- func (c *ClickHouse) Login() error
- func (c *ClickHouse) Logined() bool
- func (c *ClickHouse) Logout() error
- func (c *ClickHouse) ModifyDb() error
- func (c *ClickHouse) ModifyTable() error
- func (c *ClickHouse) Name() string
- func (c *ClickHouse) Privileges() error
- func (c *ClickHouse) ProcessList() error
- func (c *ClickHouse) RunCommand() error
- func (c *ClickHouse) ViewTable() error
- type FieldInfo
- type TableStatus
Constants ¶
This section is empty.
Variables ¶
var ErrConnectTimeout = errors.New(`连接超时,请重试`)
Functions ¶
func LookupClickHouseClient ¶
LookupClickHouseClient finds clickhouse-client binary.
func NativeExportCH ¶
func NativeExportCH(ctx context.Context, cfg *shared.DBConfig, tables []string, structWriter, dataWriter io.Writer) error
NativeExportCH uses clickhouse-client to export tables as INSERT statements.
func NativeImportCH ¶
func NativeImportCH(ctx context.Context, cfg *shared.DBConfig, files []string, noticer *notice.NoticeAndProgress) error
NativeImportCH uses clickhouse-client to import SQL files.
func SupportedCmdExport ¶
func SupportedCmdExport() bool
SupportedExport returns true if the native export tool for the given driver is available.
func SupportedCmdImport ¶
func SupportedCmdImport() bool
SupportedImport returns true if the native import tool for the given driver is available.
Types ¶
type ClickHouse ¶
type ClickHouse struct {
*driver.BaseDriver
// contains filtered or unexported fields
}
func (*ClickHouse) CreateData ¶
func (c *ClickHouse) CreateData() error
CreateData handles insert, update, and delete of table data
func (*ClickHouse) CreateDb ¶
func (c *ClickHouse) CreateDb() error
CreateDb handles the create database operation
func (*ClickHouse) CreateTable ¶
func (c *ClickHouse) CreateTable() error
CreateTable handles the create table operation
func (*ClickHouse) Import ¶
func (c *ClickHouse) Import() error
func (*ClickHouse) Indexes ¶
func (c *ClickHouse) Indexes() error
Indexes handles showing indexes for a table (ClickHouse uses ORDER BY / PRIMARY KEY)
func (*ClickHouse) IsSupported ¶
func (c *ClickHouse) IsSupported(operation string) bool
func (*ClickHouse) ListData ¶
func (c *ClickHouse) ListData() error
ListData handles displaying table data (paginated)
func (*ClickHouse) ListDb ¶
func (c *ClickHouse) ListDb() error
ListDb handles the list databases operation
func (*ClickHouse) ListTable ¶
func (c *ClickHouse) ListTable() error
ListTable handles the list tables operation
func (*ClickHouse) Login ¶
func (c *ClickHouse) Login() error
func (*ClickHouse) Logined ¶
func (c *ClickHouse) Logined() bool
func (*ClickHouse) Logout ¶
func (c *ClickHouse) Logout() error
func (*ClickHouse) ModifyDb ¶
func (c *ClickHouse) ModifyDb() error
ModifyDb handles the modify/delete database operation
func (*ClickHouse) ModifyTable ¶
func (c *ClickHouse) ModifyTable() error
ModifyTable handles the modify table operation
func (*ClickHouse) Name ¶
func (c *ClickHouse) Name() string
func (*ClickHouse) Privileges ¶
func (c *ClickHouse) Privileges() error
Privileges handles the privileges management operation
func (*ClickHouse) ProcessList ¶
func (c *ClickHouse) ProcessList() error
ProcessList handles showing the process list
func (*ClickHouse) RunCommand ¶
func (c *ClickHouse) RunCommand() error
RunCommand handles running SQL commands
func (*ClickHouse) ViewTable ¶
func (c *ClickHouse) ViewTable() error
ViewTable handles the view table structure operation