async

package
v0.0.0-...-8ca9097 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FetchRowError = errors.New("fetch row error")

Functions

func Init

func Init()

Types

type Async

type Async struct {
	HandlerPool *HandlerPool
}
var GlobalAsync *Async

func NewAsync

func NewAsync(handlerPool *HandlerPool) *Async

func (*Async) TaosExec

func (a *Async) TaosExec(taosConnect unsafe.Pointer, sql string, timeFormat parser.FormatTimeFunc) (*ExecResult, error)

func (*Async) TaosExecWithoutResult

func (a *Async) TaosExecWithoutResult(taosConnect unsafe.Pointer, sql string) error

func (*Async) TaosFetchRawBlockA

func (a *Async) TaosFetchRawBlockA(res unsafe.Pointer, handler *Handler) (*Result, error)

func (*Async) TaosQuery

func (a *Async) TaosQuery(taosConnect unsafe.Pointer, sql string, handler *Handler) (*Result, error)

type Caller

type Caller struct {
	QueryResult chan *Result
	FetchResult chan *Result
	ExecResult  chan *Stmt2ExecResult
}

func NewCaller

func NewCaller() *Caller

func (*Caller) ExecCall

func (c *Caller) ExecCall(res unsafe.Pointer, affected int, code int)

func (*Caller) FetchCall

func (c *Caller) FetchCall(res unsafe.Pointer, numOfRows int)

func (*Caller) QueryCall

func (c *Caller) QueryCall(res unsafe.Pointer, code int)

type ExecResult

type ExecResult struct {
	AffectedRows int
	FieldCount   int
	Header       *wrapper.RowsHeader
	Data         [][]driver.Value
}

type Handler

type Handler struct {
	Handler cgo.Handle
	Caller  *Caller
}

type HandlerPool

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

func NewHandlerPool

func NewHandlerPool(count int) *HandlerPool

func (*HandlerPool) Get

func (c *HandlerPool) Get() *Handler

func (*HandlerPool) Put

func (c *HandlerPool) Put(handler *Handler)

type Result

type Result struct {
	Res unsafe.Pointer
	N   int
}

type Stmt2ExecResult

type Stmt2ExecResult struct {
	Res      unsafe.Pointer
	Affected int
	Code     int
}

Jump to

Keyboard shortcuts

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