af

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 12 Imported by: 11

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 Open

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

func (*Connector) Close

func (conn *Connector) Close() error

func (*Connector) Exec

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

func (*Connector) Query

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

func (*Connector) StmtExecute

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

func (*Connector) StmtQuery

func (conn *Connector) StmtQuery(sql string, params *Param) (rows driver.Rows, err error)

func (*Connector) Subscribe

func (conn *Connector) Subscribe(restart bool, topic string, sql string, interval time.Duration) (Subscriber, error)

type Param

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

func NewParam

func NewParam(size int) *Param

func (*Param) AddBigint

func (p *Param) AddBigint(value int) *Param

func (*Param) AddBinary

func (p *Param) AddBinary(value []byte) *Param

func (*Param) AddBool

func (p *Param) AddBool(value bool) *Param

func (*Param) AddDouble

func (p *Param) AddDouble(value float64) *Param

func (*Param) AddFloat

func (p *Param) AddFloat(value float32) *Param

func (*Param) AddInt

func (p *Param) AddInt(value int) *Param

func (*Param) AddNchar

func (p *Param) AddNchar(value string) *Param

func (*Param) AddNull

func (p *Param) AddNull() *Param

func (*Param) AddSmallint

func (p *Param) AddSmallint(value int) *Param

func (*Param) AddTimestamp

func (p *Param) AddTimestamp(value time.Time, precision int) *Param

func (*Param) AddTinyint

func (p *Param) AddTinyint(value int) *Param

func (*Param) AddUBigint

func (p *Param) AddUBigint(value uint) *Param

func (*Param) AddUInt

func (p *Param) AddUInt(value uint) *Param

func (*Param) AddUSmallint

func (p *Param) AddUSmallint(value uint) *Param

func (*Param) AddUTinyint

func (p *Param) AddUTinyint(value uint) *Param

func (*Param) SetBigint

func (p *Param) SetBigint(column int, value int)

func (*Param) SetBinary

func (p *Param) SetBinary(column int, value []byte)

func (*Param) SetBool

func (p *Param) SetBool(column int, value bool)

func (*Param) SetDouble

func (p *Param) SetDouble(column int, value float64)

func (*Param) SetFloat

func (p *Param) SetFloat(column int, value float32)

func (*Param) SetInt

func (p *Param) SetInt(column int, value int)

func (*Param) SetNchar

func (p *Param) SetNchar(column int, value string)

func (*Param) SetNull

func (p *Param) SetNull(column int)

func (*Param) SetSmallint

func (p *Param) SetSmallint(column int, value int)

func (*Param) SetTimestamp

func (p *Param) SetTimestamp(column int, value time.Time, precision int)

func (*Param) SetTinyint

func (p *Param) SetTinyint(column int, value int)

func (*Param) SetUBigint

func (p *Param) SetUBigint(column int, value uint)

func (*Param) SetUInt

func (p *Param) SetUInt(column int, value uint)

func (*Param) SetUSmallint

func (p *Param) SetUSmallint(column int, value uint)

func (*Param) SetUTinyint

func (p *Param) SetUTinyint(column int, value uint)

type Stmt

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

func NewStmt

func NewStmt(taosConn unsafe.Pointer) *Stmt

func (*Stmt) AddBatch

func (s *Stmt) AddBatch() error

func (*Stmt) BindRow

func (s *Stmt) BindRow(row *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) GetResultRows

func (s *Stmt) GetResultRows() (driver.Rows, 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) error

type Subscriber

type Subscriber interface {
	Consume() (driver.Rows, error)
	Unsubscribe(keepProgress bool)
}

Jump to

Keyboard shortcuts

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