Documentation
¶
Index ¶
- func ParseDestinationTable(sql string) (string, error)
- func ParseInsertFields(sql string) (string, error)
- func ValidateIPPortFormat(address string) error
- type DriverLib
- func (l *DriverLib) CheckSQLValid(handle C.driver_handle, strSQL, filterVal string) *HandleResult
- func (l *DriverLib) Close()
- func (l *DriverLib) ConvertTableDDL(handle C.driver_handle, tableName string) *HandleResult
- func (l *DriverLib) CreateDriver() C.driver_handle
- func (l *DriverLib) DestroyDriver(handle C.driver_handle)
- func (l *DriverLib) GetColumns(handle C.driver_handle, tableName string) *HandleResult
- func (l *DriverLib) GetQuoteFlag(handle C.driver_handle) *HandleResult
- func (l *DriverLib) GetTableDDL(handle C.driver_handle, tableName string) *HandleResult
- func (l *DriverLib) GetTables(handle C.driver_handle) *HandleResult
- func (l *DriverLib) IsConnected(handle C.driver_handle) *HandleResult
- func (l *DriverLib) OpenConnect(handle C.driver_handle, connectJson string, ...) *HandleResult
- func (l *DriverLib) PullData(handle C.driver_handle, strSQL, filterVal, destTable string, batch int, ...) *HandleResult
- func (l *DriverLib) PushData(handle C.driver_handle, strSQL string, batch int, rows *sql.Rows) *HandleResult
- type DriverOperation
- func (op *DriverOperation) CheckSQLValid(strSQL, filterVal string) *HandleResult
- func (op *DriverOperation) ConvertTableDDL(tableName string) *HandleResult
- func (op *DriverOperation) FreeDriver()
- func (op *DriverOperation) GetColumns(tableName string) *HandleResult
- func (op *DriverOperation) GetQuoteFlag() *HandleResult
- func (op *DriverOperation) GetTableDDL(tableName string) *HandleResult
- func (op *DriverOperation) GetTables() *HandleResult
- func (op *DriverOperation) IsConnected() *HandleResult
- func (op *DriverOperation) PullData(strSQL, filterVal, destTable string, batch int, iTimestamp int64, ...) *HandleResult
- func (op *DriverOperation) PushData(strSQL string, batch int, rows *sql.Rows) *HandleResult
- type HandleResult
- type IDbDriver
- type TDBDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDestinationTable ¶
func ParseInsertFields ¶
func ValidateIPPortFormat ¶
Types ¶
type DriverLib ¶
type DriverLib struct {
// contains filtered or unexported fields
}
func LoadDriver ¶
func LoadDriverLib ¶
func (*DriverLib) CheckSQLValid ¶
func (l *DriverLib) CheckSQLValid(handle C.driver_handle, strSQL, filterVal string) *HandleResult
func (*DriverLib) ConvertTableDDL ¶
func (l *DriverLib) ConvertTableDDL(handle C.driver_handle, tableName string) *HandleResult
func (*DriverLib) CreateDriver ¶
func (l *DriverLib) CreateDriver() C.driver_handle
func (*DriverLib) DestroyDriver ¶
func (l *DriverLib) DestroyDriver(handle C.driver_handle)
func (*DriverLib) GetColumns ¶
func (l *DriverLib) GetColumns(handle C.driver_handle, tableName string) *HandleResult
func (*DriverLib) GetQuoteFlag ¶
func (l *DriverLib) GetQuoteFlag(handle C.driver_handle) *HandleResult
func (*DriverLib) GetTableDDL ¶
func (l *DriverLib) GetTableDDL(handle C.driver_handle, tableName string) *HandleResult
func (*DriverLib) GetTables ¶
func (l *DriverLib) GetTables(handle C.driver_handle) *HandleResult
func (*DriverLib) IsConnected ¶
func (l *DriverLib) IsConnected(handle C.driver_handle) *HandleResult
func (*DriverLib) OpenConnect ¶
func (l *DriverLib) OpenConnect(handle C.driver_handle, connectJson string, maxIdleTime, maxOpenConnections, connMaxLifetime, maxIdleConnections int) *HandleResult
func (*DriverLib) PullData ¶
func (l *DriverLib) PullData(handle C.driver_handle, strSQL, filterVal, destTable string, batch int, iTimestamp int64, clickClient *clickHouseLocal.TClickHouseDriver) *HandleResult
func (*DriverLib) PushData ¶
func (l *DriverLib) PushData(handle C.driver_handle, strSQL string, batch int, rows *sql.Rows) *HandleResult
type DriverOperation ¶
type DriverOperation struct {
// contains filtered or unexported fields
}
func NewDriverOperation ¶
func NewDriverOperation(dbDriverDir string, ds *module.TDataSource) (*DriverOperation, error)
NewDriverOperation creates a new driver operation instance.dbDriverDir is the full path to the directory where the driver library is located.
func (*DriverOperation) CheckSQLValid ¶
func (op *DriverOperation) CheckSQLValid(strSQL, filterVal string) *HandleResult
func (*DriverOperation) ConvertTableDDL ¶
func (op *DriverOperation) ConvertTableDDL(tableName string) *HandleResult
func (*DriverOperation) FreeDriver ¶
func (op *DriverOperation) FreeDriver()
func (*DriverOperation) GetColumns ¶
func (op *DriverOperation) GetColumns(tableName string) *HandleResult
func (*DriverOperation) GetQuoteFlag ¶
func (op *DriverOperation) GetQuoteFlag() *HandleResult
func (*DriverOperation) GetTableDDL ¶
func (op *DriverOperation) GetTableDDL(tableName string) *HandleResult
func (*DriverOperation) GetTables ¶
func (op *DriverOperation) GetTables() *HandleResult
func (*DriverOperation) IsConnected ¶
func (op *DriverOperation) IsConnected() *HandleResult
func (*DriverOperation) PullData ¶
func (op *DriverOperation) PullData(strSQL, filterVal, destTable string, batch int, iTimestamp int64, clickClient *clickHouseLocal.TClickHouseDriver) *HandleResult
func (*DriverOperation) PushData ¶
func (op *DriverOperation) PushData(strSQL string, batch int, rows *sql.Rows) *HandleResult
PushData strSQL : insert into table_name (col1, col2,...)
type HandleResult ¶
func (*HandleResult) HandleFailed ¶
func (handle *HandleResult) HandleFailed(msg string)
func (*HandleResult) HandleSuccess ¶
func (handle *HandleResult) HandleSuccess(code int32, msg string)
type IDbDriver ¶
type IDbDriver interface { OpenConnect(connectJson string, maxIdleTime, maxOpenConnections, connMaxLifetime, maxIdleConnections int) error CloseConnect() error CheckSQLValid(strSQL, strFilterVal string) ([]tableInfo.ColumnInfo, error) GetColumns(tableName string) ([]tableInfo.ColumnInfo, error) GetTables() ([]tableInfo.TableInfo, error) PullData(strSQL, filterVal, destTable string, batch int, iTimestamp int64, clickClient *clickHouseLocal.TClickHouseDriver) (int64, error) PushData(insertSQL string, batch int, rows *sql.Rows) (int64, error) //作为函数参数 ConvertTableDDL(tableName string) (*string, error) GetQuoteFlag() string GetSourceTableDDL(tableName string) (*string, error) GetSchema() string IsConnected() bool NewConnect(connectJson string, maxIdleTime, maxOpenConnections, connMaxLifetime, maxIdleConnections int) (IDbDriver, error) }
Click to show internal directories.
Click to hide internal directories.