command

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetResultTaskStatistics        commandType = iota // 137 Exec * 无返回数据
	GetTableComment                                   // 17 Query * 出错
	GetTableColumns                                   // 20 Query * Scan 时出错(第7列数据为NULL)
	GetTableDefinition                                // 20 use getTableColumns
	GetViewDefinition                                 // ??? 不知如何执行
	GetTabletData                                     // 75 Query * 无返回数据
	GetSchemaBfiles                                   // 111 get user executeQuery(sql, 搭"select * from bfiles"执行
	GetTableDistribution                              // 71 Query *****
	GetTableDistributionStatistics                    // 71 Query * 需要处理返回的数据
	GetOnlineSessions                                 // 82 Exec * no param 返回的数据缺一列
	GetRunningSQL                                     // 80 Query * no param 无返回数据
	GetSQLStatistics                                  // 135 Exec *****
	GetHistorySQLs                                    // 128 Exec * 无返回数据
	GetCloudwaveVersion                               // 103 Exec ***** no param
	GetUserPrivileges                                 // 114 Exec * Unsupported request type code: 114
	GetMasterServerList                               // 70 Query *** no param
	GetTabletServerList                               // 70 Query *** no param
	GetServerList                                     // 70 Query *** no param
	GetServerStatus                                   // 70 Query *** no param
	GetSystemUtilization                              // 106 Query *** no param
	GetMemorySize                                     // 107 Query *** no param
	GetNetworkStatus                                  // 132 Query ***** no param
	GetDfsStatus                                      // 76 Exec *** no param
	GetConfigOptions                                  // 108 Exec *** no param
	SaveConfigOptions                                 // 131 ??? 写数据到服务器
	GetServerLogger                                   // 140 Exec ***
	GetProcessJstack                                  // 93 Exec ***
	GetHealthDiagnostic                               // 133 Exec * Unsupported request type code: 133
	GetSystemOverview                                 // 109 Exec * no param  Unsupported request type code: 109
	DoRestartServer                                   // 113 Exrc * 发完命令后还需再连接
	GetSchemaNameList                                 // 15 Query *****
	GetTableNameList                                  // 17 Query * 出错
	GetViewNameList                                   // 17 Query * 出错
	GetUserNameList                                   // 25 Query ***** no param
	GetSchemas                                        // ??? 不知如何执行
	GetTables                                         // ??? 不知如何执行
	GetViews                                          // ??? 不知如何执行
	GetRuntimeReport                                  // 130 Exec ***** no param

)
View Source
const MaxResultReturnRecord = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type DbWorker

type DbWorker struct {
	Dsn string
	Db  *sql.DB
}

func (*DbWorker) DoRestartServer

func (db *DbWorker) DoRestartServer(target string) (bool, error)

func (*DbWorker) GetHealthDiagnostic

func (db *DbWorker) GetHealthDiagnostic(simpleCheck bool) ([]string, error)

func (*DbWorker) GetHistorySQLs

func (db *DbWorker) GetHistorySQLs() ([][]string, error)

func (*DbWorker) GetInfoNoparamCommon

func (db *DbWorker) GetInfoNoparamCommon(cmd commandType) (interface{}, error)

func (*DbWorker) GetNameList

func (db *DbWorker) GetNameList(cmd commandType, catalog string, schema []byte, table []byte) ([]string, error)

cmd : getTableComment, getTableNameList, getViewNameList

func (*DbWorker) GetProcessJstack

func (db *DbWorker) GetProcessJstack(trim bool, server []byte) (string, error)

func (*DbWorker) GetResultTaskStatistics

func (db *DbWorker) GetResultTaskStatistics(requestID int64) ([][]string, error)

func (*DbWorker) GetSQLStatistics

func (db *DbWorker) GetSQLStatistics(timeRange int64) (string, error)

func (*DbWorker) GetSchemaNameList

func (db *DbWorker) GetSchemaNameList(catalog string) ([]string, error)

func (*DbWorker) GetServerLogger

func (db *DbWorker) GetServerLogger(server []byte, tail bool, count int) (string, error)

func (*DbWorker) GetTableColumns

func (db *DbWorker) GetTableColumns(schema []byte, table []byte, requestID int64) ([][]string, error)

func (*DbWorker) GetTableDefinition

func (db *DbWorker) GetTableDefinition(schema []byte, table []byte, requestID int64) ([][]string, error)

func (*DbWorker) GetTableDistribution

func (db *DbWorker) GetTableDistribution(schema string, table string, requestID int64) ([][]string, error)

func (*DbWorker) GetTableDistributionStatistics

func (db *DbWorker) GetTableDistributionStatistics(schema string, table string) ([][]string, error)

func (*DbWorker) GetTabletData

func (db *DbWorker) GetTabletData(schema string, table string, tabletID int64, requestID int64) ([][]string, error)

func (*DbWorker) GetUserPrivileges

func (db *DbWorker) GetUserPrivileges(user string) (string, error)

Jump to

Keyboard shortcuts

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