wrapper

package
v3.7.8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 19 Imported by: 4

Documentation

Index

Constants

View Source
const (
	InfluxDBLineProtocol       = 1
	OpenTSDBTelnetLineProtocol = 2
	OpenTSDBJsonFormatProtocol = 3
)
View Source
const (
	TSDB_SML_TIMESTAMP_NOT_CONFIGURED = iota
	TSDB_SML_TIMESTAMP_HOURS
	TSDB_SML_TIMESTAMP_MINUTES
	TSDB_SML_TIMESTAMP_SECONDS
	TSDB_SML_TIMESTAMP_MILLI_SECONDS
	TSDB_SML_TIMESTAMP_MICRO_SECONDS
	TSDB_SML_TIMESTAMP_NANO_SECONDS
)
View Source
const (
	PointerSize = unsafe.Sizeof(uintptr(1))
)

Variables

This section is empty.

Functions

func BuildRawMeta

func BuildRawMeta(length uint32, metaType uint16, data unsafe.Pointer) unsafe.Pointer

func FetchLengths

func FetchLengths(res unsafe.Pointer, count int) []int

func FetchRawBlockCallback

func FetchRawBlockCallback(p unsafe.Pointer, res *C.TAOS_RES, numOfRows C.int)

func FetchRow

func FetchRow(row unsafe.Pointer, offset int, colType uint8, length int, arg ...interface{}) driver.Value

func FetchRowsCallback

func FetchRowsCallback(p unsafe.Pointer, res *C.TAOS_RES, numOfRows C.int)

func NotifyCallback added in v3.5.0

func NotifyCallback(p unsafe.Pointer, ext unsafe.Pointer, notifyType C.int)

func ParseJsonMeta

func ParseJsonMeta(jsonMeta unsafe.Pointer) []byte

func ParseRawMeta

func ParseRawMeta(rawMeta unsafe.Pointer) (length uint32, metaType uint16, data unsafe.Pointer)

func PutTMQCommitCallbackResult

func PutTMQCommitCallbackResult(result *TMQCommitCallbackResult)

func QueryCallback

func QueryCallback(p unsafe.Pointer, res *C.TAOS_RES, code C.int)

func Stmt2ExecCallback added in v3.6.0

func Stmt2ExecCallback(p unsafe.Pointer, res *C.TAOS_RES, code C.int)

func Stmt2ParseAllFields added in v3.6.0

func Stmt2ParseAllFields(num int, fields unsafe.Pointer) []*stmt.Stmt2AllField

func StmtParseFields

func StmtParseFields(num int, fields unsafe.Pointer) []*stmt.StmtField

func TMQAutoCommitCB added in v3.5.1

func TMQAutoCommitCB(consumer unsafe.Pointer, resp C.int32_t, param unsafe.Pointer)

func TMQCommitAsync

func TMQCommitAsync(consumer unsafe.Pointer, message unsafe.Pointer, h cgo.Handle)

TMQCommitAsync DLL_EXPORT void tmq_commit_async(tmq_t *tmq, const TAOS_RES *msg, tmq_commit_cb *cb, void *param);

func TMQCommitCB

func TMQCommitCB(consumer unsafe.Pointer, resp C.int32_t, param unsafe.Pointer)

func TMQCommitOffsetAsync added in v3.5.1

func TMQCommitOffsetAsync(consumer unsafe.Pointer, topic string, vGroupID int32, offset int64, h cgo.Handle)

TMQCommitOffsetAsync DLL_EXPORT void tmq_commit_offset_async(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset, tmq_commit_cb *cb, void *param);

func TMQCommitOffsetCB added in v3.5.1

func TMQCommitOffsetCB(consumer unsafe.Pointer, resp C.int32_t, param unsafe.Pointer)

func TMQCommitOffsetSync added in v3.5.1

func TMQCommitOffsetSync(consumer unsafe.Pointer, topic string, vGroupID int32, offset int64) int32

TMQCommitOffsetSync DLL_EXPORT int32_t tmq_commit_offset_sync(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset);

func TMQCommitSync

func TMQCommitSync(consumer unsafe.Pointer, message unsafe.Pointer) int32

TMQCommitSync DLL_EXPORT int32_t tmq_commit_sync(tmq_t *tmq, const TAOS_RES *msg);

func TMQCommitted added in v3.5.1

func TMQCommitted(consumer unsafe.Pointer, topic string, vGroupID int32) int64

TMQCommitted DLL_EXPORT int64_t tmq_committed(tmq_t *tmq, const char *pTopicName, int32_t vgId);

func TMQConfDestroy

func TMQConfDestroy(conf unsafe.Pointer)

TMQConfDestroy void tmq_conf_destroy(tmq_conf_t *conf);

func TMQConfNew

func TMQConfNew() unsafe.Pointer

TMQConfNew tmq_conf_t *tmq_conf_new();

func TMQConfSet

func TMQConfSet(conf unsafe.Pointer, key string, value string) int32

TMQConfSet tmq_conf_res_t tmq_conf_set(tmq_conf_t *conf, const char *key, const char *value);

func TMQConfSetAutoCommitCB

func TMQConfSetAutoCommitCB(conf unsafe.Pointer, h cgo.Handle)

TMQConfSetAutoCommitCB DLL_EXPORT void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param);

func TMQConsumerClose

func TMQConsumerClose(consumer unsafe.Pointer) int32

TMQConsumerClose tmq_resp_err_t tmq_consumer_close(tmq_t *tmq);

func TMQConsumerNew

func TMQConsumerNew(conf unsafe.Pointer) (unsafe.Pointer, error)

TMQConsumerNew tmq_t *tmq_consumer_new1(tmq_conf_t *conf, char *errstr, int32_t errstrLen);

func TMQConsumerPoll

func TMQConsumerPoll(consumer unsafe.Pointer, blockingTime int64) unsafe.Pointer

TMQConsumerPoll TAOS_RES *tmq_consumer_poll(tmq_t *tmq, int64_t blocking_time);

func TMQErr2Str

func TMQErr2Str(code int32) string

TMQErr2Str const char *tmq_err2str(int32_t);

func TMQFreeAssignment added in v3.5.0

func TMQFreeAssignment(assignment unsafe.Pointer)

TMQFreeAssignment DLL_EXPORT void tmq_free_assignment(tmq_topic_assignment* pAssignment);

func TMQFreeJsonMeta

func TMQFreeJsonMeta(jsonMeta unsafe.Pointer)

TMQFreeJsonMeta DLL_EXPORT void tmq_free_json_meta(char* jsonMeta);

func TMQFreeRaw

func TMQFreeRaw(raw unsafe.Pointer)

TMQFreeRaw DLL_EXPORT void tmq_free_raw(tmq_raw_data raw);

func TMQGetConnect added in v3.6.0

func TMQGetConnect(consumer unsafe.Pointer) unsafe.Pointer

TMQGetConnect TAOS *tmq_get_connect(tmq_t *tmq)

func TMQGetDBName

func TMQGetDBName(message unsafe.Pointer) string

TMQGetDBName const char *tmq_get_db_name(TAOS_RES *res);

func TMQGetJsonMeta

func TMQGetJsonMeta(message unsafe.Pointer) unsafe.Pointer

TMQGetJsonMeta DLL_EXPORT char *tmq_get_json_meta(TAOS_RES *res); // Returning null means error. Returned result need to be freed by tmq_free_json_meta

func TMQGetRaw

func TMQGetRaw(message unsafe.Pointer) (int32, unsafe.Pointer)

TMQGetRaw DLL_EXPORT int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw);

func TMQGetResType

func TMQGetResType(message unsafe.Pointer) int32

TMQGetResType DLL_EXPORT tmq_res_t tmq_get_res_type(TAOS_RES *res);

func TMQGetTableName

func TMQGetTableName(message unsafe.Pointer) string

TMQGetTableName DLL_EXPORT const char *tmq_get_table_name(TAOS_RES *res);

func TMQGetTopicAssignment added in v3.5.0

func TMQGetTopicAssignment(consumer unsafe.Pointer, topic string) (int32, []*tmq.Assignment)

TMQGetTopicAssignment DLL_EXPORT int32_t tmq_get_topic_assignment(tmq_t *tmq, const char* pTopicName, tmq_topic_assignment **assignment, int32_t *numOfAssignment)

func TMQGetTopicName

func TMQGetTopicName(message unsafe.Pointer) string

TMQGetTopicName char *tmq_get_topic_name(tmq_message_t *message);

func TMQGetVgroupID

func TMQGetVgroupID(message unsafe.Pointer) int32

TMQGetVgroupID int32_t tmq_get_vgroup_id(tmq_message_t *message);

func TMQGetVgroupOffset added in v3.5.0

func TMQGetVgroupOffset(message unsafe.Pointer) int64

TMQGetVgroupOffset DLL_EXPORT int64_t tmq_get_vgroup_offset(TAOS_RES* res, int32_t vgroupId);

func TMQListAppend

func TMQListAppend(list unsafe.Pointer, str string) int32

TMQListAppend int32_t tmq_list_append(tmq_list_t *, const char *);

func TMQListDestroy

func TMQListDestroy(list unsafe.Pointer)

TMQListDestroy void tmq_list_destroy(tmq_list_t *);

func TMQListGetSize

func TMQListGetSize(list unsafe.Pointer) int32

TMQListGetSize int32_t tmq_list_get_size(const tmq_list_t *);

func TMQListNew

func TMQListNew() unsafe.Pointer

TMQListNew tmq_list_t *tmq_list_new();

func TMQListToCArray

func TMQListToCArray(list unsafe.Pointer, size int) []string

TMQListToCArray char **tmq_list_to_c_array(const tmq_list_t *);

func TMQOffsetSeek added in v3.5.0

func TMQOffsetSeek(consumer unsafe.Pointer, topic string, vGroupID int32, offset int64) int32

TMQOffsetSeek DLL_EXPORT int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgroupHandle, int64_t offset);

func TMQPosition added in v3.5.1

func TMQPosition(consumer unsafe.Pointer, topic string, vGroupID int32) int64

TMQPosition DLL_EXPORT int64_t tmq_position(tmq_t *tmq, const char *pTopicName, int32_t vgId);

func TMQSubscribe

func TMQSubscribe(consumer unsafe.Pointer, topicList unsafe.Pointer) int32

TMQSubscribe tmq_resp_err_t tmq_subscribe(tmq_t *tmq, tmq_list_t *topic_list);

func TMQSubscription

func TMQSubscription(consumer unsafe.Pointer) (int32, unsafe.Pointer)

TMQSubscription tmq_resp_err_t tmq_subscription(tmq_t *tmq, tmq_list_t **topics);

func TMQUnsubscribe

func TMQUnsubscribe(consumer unsafe.Pointer) int32

TMQUnsubscribe tmq_resp_err_t tmq_unsubscribe(tmq_t *tmq);

func TMQWriteRaw

func TMQWriteRaw(conn unsafe.Pointer, raw unsafe.Pointer) int32

TMQWriteRaw DLL_EXPORT int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw);

func TaosAffectedRows

func TaosAffectedRows(result unsafe.Pointer) int

TaosAffectedRows int taos_affected_rows(TAOS_RES *res);

func TaosClose

func TaosClose(taosConnect unsafe.Pointer)

TaosClose void taos_close(TAOS *taos);

func TaosConnect

func TaosConnect(host, user, pass, db string, port int) (taos unsafe.Pointer, err error)

TaosConnect TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port);

func TaosError

func TaosError(result unsafe.Pointer) int

TaosError int taos_errno(TAOS_RES *tres);

func TaosErrorStr

func TaosErrorStr(result unsafe.Pointer) string

TaosErrorStr char *taos_errstr(TAOS_RES *tres);

func TaosFetchBlock

func TaosFetchBlock(result unsafe.Pointer) (int, unsafe.Pointer)

TaosFetchBlock int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows);

func TaosFetchFields

func TaosFetchFields(result unsafe.Pointer) unsafe.Pointer

TaosFetchFields TAOS_FIELD *taos_fetch_fields(TAOS_RES *res);

func TaosFetchFieldsE added in v3.7.0

func TaosFetchFieldsE(result unsafe.Pointer) unsafe.Pointer

TaosFetchFieldsE TAOS_FIELD_E *taos_fetch_fields_e(TAOS_RES *res); 3.3.6.0

func TaosFetchLengths

func TaosFetchLengths(res unsafe.Pointer) unsafe.Pointer

TaosFetchLengths int* taos_fetch_lengths(TAOS_RES *res);

func TaosFetchRawBlock

func TaosFetchRawBlock(result unsafe.Pointer) (int, int, unsafe.Pointer)

TaosFetchRawBlock int taos_fetch_raw_block(TAOS_RES *res, int* numOfRows, void** pData);

func TaosFetchRawBlockA

func TaosFetchRawBlockA(res unsafe.Pointer, caller cgo.Handle)

TaosFetchRawBlockA void taos_fetch_raw_block_a(TAOS_RES* res, __taos_async_fn_t fp, void* param);

func TaosFetchRow

func TaosFetchRow(result unsafe.Pointer) unsafe.Pointer

TaosFetchRow TAOS_ROW taos_fetch_row(TAOS_RES *res);

func TaosFetchRowsA

func TaosFetchRowsA(res unsafe.Pointer, caller cgo.Handle)

TaosFetchRowsA void taos_fetch_rows_a(TAOS_RES *res, void (*fp)(void *param, TAOS_RES *, int numOfRows), void *param);

func TaosFetchWhitelistA added in v3.6.0

func TaosFetchWhitelistA(taosConnect unsafe.Pointer, caller cgo.Handle)

TaosFetchWhitelistA DLL_EXPORT void taos_fetch_whitelist_a(TAOS *taos, __taos_async_whitelist_fn_t fp, void *param);

func TaosFieldCount

func TaosFieldCount(result unsafe.Pointer) int

TaosFieldCount int taos_field_count(TAOS_RES *res);

func TaosFreeResult

func TaosFreeResult(res unsafe.Pointer)

TaosFreeResult void taos_free_result(TAOS_RES *res);

func TaosGetClientInfo

func TaosGetClientInfo() string

TaosGetClientInfo const char *taos_get_client_info();

func TaosGetCurrentDB added in v3.5.1

func TaosGetCurrentDB(conn unsafe.Pointer) (db string, err error)

TaosGetCurrentDB DLL_EXPORT int taos_get_current_db(TAOS *taos, char *database, int len, int *required)

func TaosGetRawBlock

func TaosGetRawBlock(result unsafe.Pointer) unsafe.Pointer

TaosGetRawBlock const void *taos_get_raw_block(TAOS_RES* res);

func TaosGetServerInfo added in v3.5.1

func TaosGetServerInfo(conn unsafe.Pointer) string

TaosGetServerInfo DLL_EXPORT const char *taos_get_server_info(TAOS *taos)

func TaosGetTableVgID added in v3.0.4

func TaosGetTableVgID(conn unsafe.Pointer, db, table string) (vgID int, code int)

TaosGetTableVgID DLL_EXPORT int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId)

func TaosGetTablesVgID added in v3.1.0

func TaosGetTablesVgID(conn unsafe.Pointer, db string, tables []string) (vgIDs []int, code int)

TaosGetTablesVgID DLL_EXPORT int taos_get_tables_vgId(TAOS *taos, const char *db, const char *table[], int tableNum, int *vgId)

func TaosIsUpdateQuery

func TaosIsUpdateQuery(res unsafe.Pointer) bool

TaosIsUpdateQuery bool taos_is_update_query(TAOS_RES *res);

func TaosLoadTableInfo

func TaosLoadTableInfo(taosConnect unsafe.Pointer, tableNameList []string) int

TaosLoadTableInfo taos_load_table_info(TAOS *taos, const char* tableNameList);

func TaosNumFields

func TaosNumFields(result unsafe.Pointer) int

TaosNumFields int taos_num_fields(TAOS_RES *res);

func TaosOptions

func TaosOptions(option int, value string) int

TaosOptions int taos_options(TSDB_OPTION option, const void *arg, ...);

func TaosOptionsConnection added in v3.7.4

func TaosOptionsConnection(conn unsafe.Pointer, option int, value *string) int

TaosOptionsConnection int taos_options_connection(TAOS *taos, TSDB_OPTION_CONNECTION option, const void *arg, ...)

func TaosQuery

func TaosQuery(taosConnect unsafe.Pointer, sql string) unsafe.Pointer

TaosQuery TAOS_RES *taos_query(TAOS *taos, const char *sql);

func TaosQueryA

func TaosQueryA(taosConnect unsafe.Pointer, sql string, caller cgo.Handle)

TaosQueryA void taos_query_a(TAOS *taos, const char *sql, void (*fp)(void *param, TAOS_RES *, int code), void *param);

func TaosQueryAWithReqID added in v3.0.4

func TaosQueryAWithReqID(taosConn unsafe.Pointer, sql string, caller cgo.Handle, reqID int64)

TaosQueryAWithReqID void taos_query_a_with_reqid(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param, int64_t reqid);

func TaosQueryWithReqID added in v3.5.7

func TaosQueryWithReqID(taosConn unsafe.Pointer, sql string, reqID int64) unsafe.Pointer

TaosQueryWithReqID TAOS_RES *taos_query_with_reqid(TAOS *taos, const char *sql, int64_t reqID);

func TaosResetCurrentDB

func TaosResetCurrentDB(taosConnect unsafe.Pointer)

TaosResetCurrentDB void taos_reset_current_db(TAOS *taos);

func TaosResultPrecision

func TaosResultPrecision(result unsafe.Pointer) int

TaosResultPrecision int taos_result_precision(TAOS_RES *res);

func TaosSchemalessInsert

func TaosSchemalessInsert(taosConnect unsafe.Pointer, lines []string, protocol int, precision string) unsafe.Pointer

TaosSchemalessInsert TAOS_RES *taos_schemaless_insert(TAOS* taos, char* lines[], int numLines, int protocol, int precision); Deprecated

func TaosSchemalessInsertRaw added in v3.0.3

func TaosSchemalessInsertRaw(taosConnect unsafe.Pointer, lines string, protocol int, precision string) (int32, unsafe.Pointer)

TaosSchemalessInsertRaw TAOS_RES *taos_schemaless_insert_raw(TAOS* taos, char* lines, int len, int32_t *totalRows, int protocol, int precision);

func TaosSchemalessInsertRawTTL added in v3.0.4

func TaosSchemalessInsertRawTTL(taosConnect unsafe.Pointer, lines string, protocol int, precision string, ttl int) (int32, unsafe.Pointer)

TaosSchemalessInsertRawTTL TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int32_t ttl);

func TaosSchemalessInsertRawTTLWithReqID added in v3.0.4

func TaosSchemalessInsertRawTTLWithReqID(taosConnect unsafe.Pointer, lines string, protocol int, precision string, ttl int, reqID int64) (int32, unsafe.Pointer)

TaosSchemalessInsertRawTTLWithReqID TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int32_t ttl, int64_t reqid)

func TaosSchemalessInsertRawTTLWithReqIDTBNameKey added in v3.6.0

func TaosSchemalessInsertRawTTLWithReqIDTBNameKey(taosConnect unsafe.Pointer, lines string, protocol int, precision string, ttl int, reqID int64, tbNameKey string) (int32, unsafe.Pointer)

TaosSchemalessInsertRawTTLWithReqIDTBNameKey TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid_tbname_key(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int32_t ttl, int64_t reqid, char *tbnameKey);

func TaosSchemalessInsertRawWithReqID added in v3.0.4

func TaosSchemalessInsertRawWithReqID(taosConnect unsafe.Pointer, lines string, protocol int, precision string, reqID int64) (int32, unsafe.Pointer)

TaosSchemalessInsertRawWithReqID TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int64_t reqid);

func TaosSchemalessInsertTTL added in v3.0.4

func TaosSchemalessInsertTTL(taosConnect unsafe.Pointer, lines []string, protocol int, precision string, ttl int) unsafe.Pointer

TaosSchemalessInsertTTL TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl) Deprecated

func TaosSchemalessInsertTTLWithReqID added in v3.0.4

func TaosSchemalessInsertTTLWithReqID(taosConnect unsafe.Pointer, lines []string, protocol int, precision string, ttl int, reqID int64) unsafe.Pointer

TaosSchemalessInsertTTLWithReqID TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl, int64_t reqid) Deprecated

func TaosSchemalessInsertWithReqID added in v3.0.4

func TaosSchemalessInsertWithReqID(taosConnect unsafe.Pointer, lines []string, protocol int, precision string, reqID int64) unsafe.Pointer

TaosSchemalessInsertWithReqID TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int64_t reqid); Deprecated

func TaosSelectDB

func TaosSelectDB(taosConnect unsafe.Pointer, db string) int

TaosSelectDB int taos_select_db(TAOS *taos, const char *db);

func TaosSetConfig

func TaosSetConfig(params map[string]string) error

TaosSetConfig int taos_set_config(const char *config);

func TaosSetConnMode added in v3.6.0

func TaosSetConnMode(conn unsafe.Pointer, mode int, value int) int

func TaosSetNotifyCB added in v3.5.0

func TaosSetNotifyCB(taosConnect unsafe.Pointer, caller cgo.Handle, notifyType int) int32

func TaosStmt2BindBinary added in v3.6.0

func TaosStmt2BindBinary(stmt2 unsafe.Pointer, data []byte, colIdx int32) error

TaosStmt2BindBinary bind binary data to stmt2

func TaosStmt2BindParam added in v3.6.0

func TaosStmt2BindParam(stmt2 unsafe.Pointer, isInsert bool, params []*stmt.TaosStmt2BindData, fields []*stmt.Stmt2AllField, colIdx int32) error

TaosStmt2BindParam int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx);

func TaosStmt2Close added in v3.6.0

func TaosStmt2Close(stmt2 unsafe.Pointer) int

TaosStmt2Close int taos_stmt2_close(TAOS_STMT2 *stmt);

func TaosStmt2Error added in v3.6.0

func TaosStmt2Error(stmt2 unsafe.Pointer) string

TaosStmt2Error char *taos_stmt2_error(TAOS_STMT2 *stmt)

func TaosStmt2Exec added in v3.6.0

func TaosStmt2Exec(stmt2 unsafe.Pointer) int

TaosStmt2Exec int taos_stmt2_exec(TAOS_STMT2 *stmt, int *affected_rows);

func TaosStmt2FreeFields added in v3.6.0

func TaosStmt2FreeFields(stmt2 unsafe.Pointer, fields unsafe.Pointer)

TaosStmt2FreeFields void taos_stmt2_free_fields(TAOS_STMT2 *stmt, TAOS_FIELD_ALL *fields);

func TaosStmt2GetFields added in v3.6.0

func TaosStmt2GetFields(stmt2 unsafe.Pointer) (code, count int, fields unsafe.Pointer)

TaosStmt2GetFields int taos_stmt2_get_fields(TAOS_STMT2 *stmt, int *count, TAOS_FIELD_ALL **fields);

func TaosStmt2Init added in v3.6.0

func TaosStmt2Init(taosConnect unsafe.Pointer, reqID int64, singleStbInsert bool, singleTableBindOnce bool, handler cgo.Handle) unsafe.Pointer

TaosStmt2Init TAOS_STMT2 *taos_stmt2_init(TAOS *taos, TAOS_STMT2_OPTION *option);

func TaosStmt2IsInsert added in v3.6.0

func TaosStmt2IsInsert(stmt2 unsafe.Pointer) (is bool, errorCode int)

TaosStmt2IsInsert int taos_stmt2_is_insert(TAOS_STMT2 *stmt, int *insert);

func TaosStmt2Prepare added in v3.6.0

func TaosStmt2Prepare(stmt2 unsafe.Pointer, sql string) int

TaosStmt2Prepare int taos_stmt2_prepare(TAOS_STMT2 *stmt, const char *sql, unsigned long length);

func TaosStmtAddBatch

func TaosStmtAddBatch(stmt unsafe.Pointer) int

TaosStmtAddBatch int taos_stmt_add_batch(TAOS_STMT *stmt);

func TaosStmtAffectedRows

func TaosStmtAffectedRows(stmt unsafe.Pointer) int

TaosStmtAffectedRows int taos_stmt_affected_rows(TAOS_STMT *stmt);

func TaosStmtAffectedRowsOnce

func TaosStmtAffectedRowsOnce(stmt unsafe.Pointer) int

TaosStmtAffectedRowsOnce int taos_stmt_affected_rows_once(TAOS_STMT *stmt);

func TaosStmtBindParam

func TaosStmtBindParam(stmt unsafe.Pointer, params []driver.Value) int

TaosStmtBindParam int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind);

func TaosStmtBindParamBatch

func TaosStmtBindParamBatch(stmt unsafe.Pointer, multiBind [][]driver.Value, bindType []*taosTypes.ColumnType) int

TaosStmtBindParamBatch int taos_stmt_bind_param_batch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind);

func TaosStmtClose

func TaosStmtClose(stmt unsafe.Pointer) int

TaosStmtClose int taos_stmt_close(TAOS_STMT *stmt);

func TaosStmtErrStr

func TaosStmtErrStr(stmt unsafe.Pointer) string

TaosStmtErrStr char *taos_stmt_errstr(TAOS_STMT *stmt);

func TaosStmtExecute

func TaosStmtExecute(stmt unsafe.Pointer) int

TaosStmtExecute int taos_stmt_execute(TAOS_STMT *stmt);

func TaosStmtGetColFields

func TaosStmtGetColFields(stmt unsafe.Pointer) (code, num int, fields unsafe.Pointer)

TaosStmtGetColFields DLL_EXPORT int taos_stmt_get_col_fields(TAOS_STMT *stmt, int* fieldNum, TAOS_FIELD_E** fields);

func TaosStmtGetParam added in v3.5.1

func TaosStmtGetParam(stmt unsafe.Pointer, idx int) (dataType int, dataLength int, err error)

TaosStmtGetParam DLL_EXPORT int taos_stmt_get_param(TAOS_STMT *stmt, int idx, int *type, int *bytes)

func TaosStmtGetTagFields

func TaosStmtGetTagFields(stmt unsafe.Pointer) (code, num int, fields unsafe.Pointer)

TaosStmtGetTagFields DLL_EXPORT int taos_stmt_get_tag_fields(TAOS_STMT *stmt, int* fieldNum, TAOS_FIELD_E** fields);

func TaosStmtInit

func TaosStmtInit(taosConnect unsafe.Pointer) unsafe.Pointer

TaosStmtInit TAOS_STMT *taos_stmt_init(TAOS *taos);

func TaosStmtInitWithReqID added in v3.0.4

func TaosStmtInitWithReqID(taosConn unsafe.Pointer, reqID int64) unsafe.Pointer

TaosStmtInitWithReqID TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid);

func TaosStmtIsInsert

func TaosStmtIsInsert(stmt unsafe.Pointer) (is bool, errorCode int)

TaosStmtIsInsert int taos_stmt_is_insert(TAOS_STMT *stmt, int *insert);

func TaosStmtNumParams

func TaosStmtNumParams(stmt unsafe.Pointer) (count int, errorCode int)

TaosStmtNumParams int taos_stmt_num_params(TAOS_STMT *stmt, int *nums);

func TaosStmtPrepare

func TaosStmtPrepare(stmt unsafe.Pointer, sql string) int

TaosStmtPrepare int taos_stmt_prepare(TAOS_STMT *stmt, const char *sql, unsigned long length);

func TaosStmtReclaimFields added in v3.3.1

func TaosStmtReclaimFields(stmt unsafe.Pointer, fields unsafe.Pointer)

TaosStmtReclaimFields DLL_EXPORT void taos_stmt_reclaim_fields(TAOS_STMT *stmt, TAOS_FIELD_E *fields);

func TaosStmtSetSubTBName

func TaosStmtSetSubTBName(stmt unsafe.Pointer, name string) int

TaosStmtSetSubTBName int taos_stmt_set_sub_tbname(TAOS_STMT* stmt, const char* name);

func TaosStmtSetTBName

func TaosStmtSetTBName(stmt unsafe.Pointer, name string) int

TaosStmtSetTBName int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name);

func TaosStmtSetTBNameTags

func TaosStmtSetTBNameTags(stmt unsafe.Pointer, name string, tags []driver.Value) int

TaosStmtSetTBNameTags int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_MULTI_BIND* tags);

func TaosStmtSetTags

func TaosStmtSetTags(stmt unsafe.Pointer, tags []driver.Value) int

TaosStmtSetTags int taos_stmt_set_tags(TAOS_STMT *stmt, TAOS_MULTI_BIND *tags);

func TaosStmtUseResult

func TaosStmtUseResult(stmt unsafe.Pointer) unsafe.Pointer

TaosStmtUseResult TAOS_RES * taos_stmt_use_result(TAOS_STMT *stmt);

func TaosValidateSql

func TaosValidateSql(taosConnect unsafe.Pointer, sql string) int

TaosValidateSql int taos_validate_sql(TAOS *taos, const char *sql);

func TaosWriteRawBlock

func TaosWriteRawBlock(conn unsafe.Pointer, numOfRows int, pData unsafe.Pointer, tableName string) int

TaosWriteRawBlock DLL_EXPORT int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char* tbname);

func TaosWriteRawBlockWithFields added in v3.0.4

func TaosWriteRawBlockWithFields(conn unsafe.Pointer, numOfRows int, pData unsafe.Pointer, tableName string, fields unsafe.Pointer, numFields int) int

TaosWriteRawBlockWithFields DLL_EXPORT int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD *fields, int numFields);

func TaosWriteRawBlockWithFieldsWithReqID added in v3.5.1

func TaosWriteRawBlockWithFieldsWithReqID(conn unsafe.Pointer, numOfRows int, pData unsafe.Pointer, tableName string, fields unsafe.Pointer, numFields int, reqID int64) int

DLL_EXPORT int taos_write_raw_block_with_fields_with_reqid(TAOS *taos, int rows, char *pData, const char *tbname,TAOS_FIELD *fields, int numFields, int64_t reqid);

func TaosWriteRawBlockWithReqID added in v3.5.1

func TaosWriteRawBlockWithReqID(conn unsafe.Pointer, numOfRows int, pData unsafe.Pointer, tableName string, reqID int64) int

DLL_EXPORT int taos_write_raw_block_with_reqid(TAOS *taos, int numOfRows, char *pData, const char *tbname, int64_t reqid);

func ToUnsafeBytes added in v3.6.0

func ToUnsafeBytes(s string) (b []byte)

ToUnsafeBytes converts s to a byte slice without memory allocations.

The returned byte slice is valid only until s is reachable and unmodified.

func WhitelistCallback added in v3.5.1

func WhitelistCallback(param unsafe.Pointer, code int, taosConnect unsafe.Pointer, numOfWhiteLists int, pWhiteLists unsafe.Pointer)

Types

type Caller

type Caller interface {
	QueryCall(res unsafe.Pointer, code int)
	FetchCall(res unsafe.Pointer, numOfRows int)
}

type FormatTimeFunc

type FormatTimeFunc func(ts int64, precision int) driver.Value

type RowsHeader

type RowsHeader struct {
	ColNames   []string
	ColTypes   []uint8
	ColLength  []int64
	Precisions []int64
	Scales     []int64
}

func ReadColumn

func ReadColumn(result unsafe.Pointer, count int) (*RowsHeader, error)

func (*RowsHeader) ScanType

func (rh *RowsHeader) ScanType(i int) reflect.Type

func (*RowsHeader) TypeDatabaseName

func (rh *RowsHeader) TypeDatabaseName(i int) string

type TMQCommitCallbackResult

type TMQCommitCallbackResult struct {
	ErrCode  int32
	Consumer unsafe.Pointer
}

func GetTMQCommitCallbackResult

func GetTMQCommitCallbackResult(errCode int32, consumer unsafe.Pointer) *TMQCommitCallbackResult

func (*TMQCommitCallbackResult) GetError

func (t *TMQCommitCallbackResult) GetError() error

type TaosStmt2CallbackCaller added in v3.6.0

type TaosStmt2CallbackCaller interface {
	ExecCall(res unsafe.Pointer, affected int, code int)
}

type WhitelistResult added in v3.5.1

type WhitelistResult struct {
	ErrCode int32
	IPNets  []*net.IPNet
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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