Documentation ¶
Index ¶
- Constants
- func FetchLengths(res unsafe.Pointer, count int) []int
- func FetchRow(row unsafe.Pointer, offset int, colType uint8, length int, arg ...interface{}) driver.Value
- func FetchRowsCallback(p unsafe.Pointer, res *C.TAOS_RES, numOfRows C.int)
- func QueryCallback(p unsafe.Pointer, res *C.TAOS_RES, code C.int)
- func ReadBlock(result, block unsafe.Pointer, blockSize int, colLength []int, colTypes []uint8) [][]driver.Value
- func ReadBlockWithTimeFormat(result, block unsafe.Pointer, blockSize int, colLength []int, colTypes []uint8, ...) [][]driver.Value
- func ReadRow(dest []driver.Value, result, block unsafe.Pointer, row int, colLength []int, ...)
- func TaosAffectedRows(result unsafe.Pointer) int
- func TaosClose(taosConnect unsafe.Pointer)
- func TaosConnect(host, user, pass, db string, port int) (taos unsafe.Pointer, err error)
- func TaosConsume(sub unsafe.Pointer) unsafe.Pointer
- func TaosError(result unsafe.Pointer) int
- func TaosErrorStr(result unsafe.Pointer) string
- func TaosFetchBlock(result unsafe.Pointer) (int, unsafe.Pointer)
- func TaosFetchFields(result unsafe.Pointer) unsafe.Pointer
- func TaosFetchLengths(res unsafe.Pointer) unsafe.Pointer
- func TaosFetchRow(result unsafe.Pointer) unsafe.Pointer
- func TaosFetchRowsA(res unsafe.Pointer, caller cgo.Handle)
- func TaosFieldCount(result unsafe.Pointer) int
- func TaosFreeResult(res unsafe.Pointer)
- func TaosIsUpdateQuery(res unsafe.Pointer) bool
- func TaosLoadTableInfo(taosConnect unsafe.Pointer, tableNameList []string) int
- func TaosNumFields(result unsafe.Pointer) int
- func TaosOptions(option int, value string) int
- func TaosQuery(taosConnect unsafe.Pointer, sql string) unsafe.Pointer
- func TaosQueryA(taosConnect unsafe.Pointer, sql string, caller cgo.Handle)
- func TaosResetCurrentDB(taosConnect unsafe.Pointer)
- func TaosResultBlock(result unsafe.Pointer) unsafe.Pointer
- func TaosResultPrecision(result unsafe.Pointer) int
- func TaosSchemalessInsert(taosConnect unsafe.Pointer, lines []string, protocol int, precision string) unsafe.Pointer
- func TaosSelectDB(taosConnect unsafe.Pointer, db string) int
- func TaosSetConfig(params map[string]string) error
- func TaosStmtAddBatch(stmt unsafe.Pointer) int
- func TaosStmtBindParam(stmt unsafe.Pointer, params []interface{}) int
- func TaosStmtBindParamBatch(stmt unsafe.Pointer, multiBind [][]interface{}, ...) int
- func TaosStmtClose(stmt unsafe.Pointer) int
- func TaosStmtExecute(stmt unsafe.Pointer) int
- func TaosStmtInit(taosConnect unsafe.Pointer) unsafe.Pointer
- func TaosStmtIsInsert(stmt unsafe.Pointer) (is bool, errorCode int)
- func TaosStmtNumParams(stmt unsafe.Pointer) (count int, errorCode int)
- func TaosStmtPrepare(stmt unsafe.Pointer, sql string) int
- func TaosStmtSetSubTBName(stmt unsafe.Pointer, name string) int
- func TaosStmtSetTBName(stmt unsafe.Pointer, name string) int
- func TaosStmtSetTBNameTags(stmt unsafe.Pointer, name string, tags []interface{}) int
- func TaosStmtUseResult(stmt unsafe.Pointer) unsafe.Pointer
- func TaosSubscribe(taosConnect unsafe.Pointer, topic string, sql string, restart bool, ...) unsafe.Pointer
- func TaosUnsubscribe(sub unsafe.Pointer, keepProgress bool)
- func TaosValidateSql(taosConnect unsafe.Pointer, sql string) int
- type Caller
- type FormatTimeFunc
- type RowsHeader
Constants ¶
const ( CBoolNull = 0x02 CTinyintNull = -128 CTinyintUnsignedNull = 255 CSmallintNull = -32768 CSmallintUnsignedNull = 65535 CIntNull = -2147483648 CIntUnsignedNull = 4294967295 CBigintNull = -9223372036854775808 CBigintUnsignedNull = 18446744073709551615 CBinaryNull = byte(0xff) CNcharNull = byte(0xff) CTimestampNull = CBigintNull PointerSize = unsafe.Sizeof(uintptr(1)) Step = unsafe.Sizeof(uintptr(1)) )
const ( InfluxDBLineProtocol = 1 OpenTSDBTelnetLineProtocol = 2 OpenTSDBJsonFormatProtocol = 3 )
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 )
Variables ¶
This section is empty.
Functions ¶
func ReadBlockWithTimeFormat ¶
func TaosAffectedRows ¶
TaosAffectedRows int taos_affected_rows(TAOS_RES *res);
func TaosConnect ¶
TaosConnect TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port);
func TaosConsume ¶
TaosConsume TAOS_RES *taos_consume(TAOS_SUB *tsub);
func TaosErrorStr ¶
TaosErrorStr char *taos_errstr(TAOS_RES *tres);
func TaosFetchBlock ¶
TaosFetchBlock int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows);
func TaosFetchFields ¶
TaosFetchFields TAOS_FIELD *taos_fetch_fields(TAOS_RES *res);
func TaosFetchLengths ¶
TaosFetchLengths int* taos_fetch_lengths(TAOS_RES *res);
func TaosFetchRow ¶
TaosFetchRow TAOS_ROW taos_fetch_row(TAOS_RES *res);
func TaosFetchRowsA ¶
TaosFetchRowsA void taos_fetch_rows_a(TAOS_RES *res, void (*fp)(void *param, TAOS_RES *, int numOfRows), void *param);
func TaosFieldCount ¶
TaosFieldCount int taos_field_count(TAOS_RES *res);
func TaosFreeResult ¶
TaosFreeResult void taos_free_result(TAOS_RES *res);
func TaosIsUpdateQuery ¶
TaosIsUpdateQuery bool taos_is_update_query(TAOS_RES *res);
func TaosLoadTableInfo ¶
TaosLoadTableInfo taos_load_table_info(TAOS *taos, const char* tableNameList);
func TaosNumFields ¶
TaosNumFields int taos_num_fields(TAOS_RES *res);
func TaosOptions ¶
TaosOptions int taos_options(TSDB_OPTION option, const void *arg, ...);
func TaosQueryA ¶
TaosQueryA void taos_query_a(TAOS *taos, const char *sql, void (*fp)(void *param, TAOS_RES *, int code), void *param);
func TaosResetCurrentDB ¶
TaosResetCurrentDB void taos_reset_current_db(TAOS *taos);
func TaosResultBlock ¶
TaosResultBlock TAOS_ROW *taos_result_block(TAOS_RES *res);
func TaosResultPrecision ¶
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);
func TaosSelectDB ¶
TaosSelectDB int taos_select_db(TAOS *taos, const char *db);
func TaosSetConfig ¶
TaosSetConfig int taos_set_config(const char *config);
func TaosStmtAddBatch ¶
TaosStmtAddBatch int taos_stmt_add_batch(TAOS_STMT *stmt);
func TaosStmtBindParam ¶
TaosStmtBindParam int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_BIND *bind);
func TaosStmtBindParamBatch ¶
func TaosStmtBindParamBatch(stmt unsafe.Pointer, multiBind [][]interface{}, bindType []*taosTypes.ColumnType) int
TaosStmtBindParamBatch int taos_stmt_bind_param_batch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind);
func TaosStmtClose ¶
TaosStmtClose int taos_stmt_close(TAOS_STMT *stmt);
func TaosStmtExecute ¶
TaosStmtExecute int taos_stmt_execute(TAOS_STMT *stmt);
func TaosStmtInit ¶
TaosStmtInit TAOS_STMT *taos_stmt_init(TAOS *taos);
func TaosStmtIsInsert ¶
TaosStmtIsInsert int taos_stmt_is_insert(TAOS_STMT *stmt, int *insert);
func TaosStmtNumParams ¶
TaosStmtNumParams int taos_stmt_num_params(TAOS_STMT *stmt, int *nums);
func TaosStmtPrepare ¶
TaosStmtPrepare int taos_stmt_prepare(TAOS_STMT *stmt, const char *sql, unsigned long length);
func TaosStmtSetSubTBName ¶
TaosStmtSetSubTBName int taos_stmt_set_sub_tbname(TAOS_STMT* stmt, const char* name);
func TaosStmtSetTBName ¶
TaosStmtSetTBName int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name);
func TaosStmtSetTBNameTags ¶
TaosStmtSetTBNameTags int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags);
func TaosStmtUseResult ¶
TaosStmtUseResult TAOS_RES * taos_stmt_use_result(TAOS_STMT *stmt);
func TaosSubscribe ¶
func TaosSubscribe(taosConnect unsafe.Pointer, topic string, sql string, restart bool, interval time.Duration) unsafe.Pointer
TaosSubscribe TAOS_SUB *taos_subscribe(TAOS* taos, int restart, const char* topic, const char *sql, TAOS_SUBSCRIBE_CALLBACK fp, void *param, int interval);
func TaosUnsubscribe ¶
TaosUnsubscribe void taos_unsubscribe(TAOS_SUB *tsub, int keepProgress);
Types ¶
type RowsHeader ¶
func ReadColumn ¶
func ReadColumn(result unsafe.Pointer, count int) (*RowsHeader, error)
func (*RowsHeader) TypeDatabaseName ¶
func (rh *RowsHeader) TypeDatabaseName(i int) string