af

package
v3.25.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

func NewConnector

func NewConnector(taos unsafe.Pointer) (*Connector, error)

NewConnector New connector with TDengine connection

func Open

func Open(host, user, pass, db string, port int) (*Connector, error)

Open New connector with TDengine connection information

func (*Connector) Close

func (conn *Connector) Close() error

Close Release TDengine connection

func (*Connector) Exec

func (conn *Connector) Exec(query string, args ...driver.Value) (driver.Result, error)

Exec Execute sql

func (*Connector) ExecWithReqID

func (conn *Connector) ExecWithReqID(query string, reqID int64, args ...driver.Value) (driver.Result, error)

ExecWithReqID Execute sql with reqID

func (*Connector) GetTableVGroupID

func (conn *Connector) GetTableVGroupID(db, table string) (vgID int, err error)

func (*Connector) InfluxDBInsertLines

func (conn *Connector) InfluxDBInsertLines(lines []string, precision string) error

InfluxDBInsertLines Insert data using influxdb line format Deprecated

func (*Connector) InsertStmt

func (conn *Connector) InsertStmt() *insertstmt.InsertStmt

InsertStmt Prepare batch insert stmt

func (*Connector) InsertStmtWithReqID

func (conn *Connector) InsertStmtWithReqID(reqID int64) *insertstmt.InsertStmt

InsertStmtWithReqID Prepare batch insert stmt with reqID

func (*Connector) OpenTSDBInsertJsonPayload

func (conn *Connector) OpenTSDBInsertJsonPayload(payload string) error

OpenTSDBInsertJsonPayload Insert data using opentsdb json format Deprecated

func (*Connector) OpenTSDBInsertTelnetLines

func (conn *Connector) OpenTSDBInsertTelnetLines(lines []string) error

OpenTSDBInsertTelnetLines Insert data using opentsdb telnet format Deprecated

func (*Connector) Query

func (conn *Connector) Query(query string, args ...driver.Value) (driver.Rows, error)

Query Execute query sql

func (*Connector) QueryWithReqID

func (conn *Connector) QueryWithReqID(query string, reqID int64, args ...driver.Value) (driver.Rows, error)

QueryWithReqID Execute query sql with reqID

func (*Connector) SelectDB

func (conn *Connector) SelectDB(db string) error

SelectDB Execute `use db`

func (*Connector) Stmt

func (conn *Connector) Stmt() *Stmt

Stmt Prepare stmt

func (*Connector) StmtExecute

func (conn *Connector) StmtExecute(sql string, params *param.Param) (res driver.Result, err error)

StmtExecute Execute sql through stmt

func (*Connector) StmtExecuteWithReqID

func (conn *Connector) StmtExecuteWithReqID(sql string, params *param.Param, reqID int64) (res driver.Result, err error)

StmtExecuteWithReqID Execute sql through stmt with reqID

type Stmt

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

func NewStmt

func NewStmt(taosConn unsafe.Pointer) *Stmt

func NewStmtWithReqID

func NewStmtWithReqID(taosConn unsafe.Pointer, reqID int64) *Stmt

func (*Stmt) AddBatch

func (s *Stmt) AddBatch() error

func (*Stmt) BindRow

func (s *Stmt) BindRow(row *param.Param) error

func (*Stmt) Close

func (s *Stmt) Close() error

func (*Stmt) Execute

func (s *Stmt) Execute() error

func (*Stmt) GetAffectedRows

func (s *Stmt) GetAffectedRows() int

func (*Stmt) NumParams

func (s *Stmt) NumParams() (int, error)

func (*Stmt) Prepare

func (s *Stmt) Prepare(sql string) error

func (*Stmt) SetTableName

func (s *Stmt) SetTableName(tableName string) error

func (*Stmt) SetTableNameWithTags

func (s *Stmt) SetTableNameWithTags(tableName string, tags *param.Param) error

func (*Stmt) UseResult

func (s *Stmt) UseResult() (driver.Rows, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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