Documentation ¶
Index ¶
- Constants
- type DialOption
- type Field
- func (f *Field) GetDataType() int32
- func (f *Field) GetFloat32() float32
- func (f *Field) GetFloat64() float64
- func (f *Field) GetInt32() int32
- func (f *Field) GetInt64() int64
- func (f *Field) GetName() string
- func (f *Field) GetText() string
- func (f *Field) GetValue() interface{}
- func (f *Field) IsNull() bool
- type FuncOption
- type IoTDBRpcDataSet
- type RowRecord
- type Session
- func (s *Session) Close() error
- func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []int32, encodings []int32, compressors []int32) error
- func (s *Session) CreateTimeseries(path string, dataType int32, encoding int32, compressor int32, ...) (r *rpc.TSStatus, err error)
- func (s *Session) DeleteData(paths []string, startTime int64, endTime int64) error
- func (s *Session) DeleteStorageGroup(storageGroupId string) error
- func (s *Session) DeleteStorageGroups(storageGroupIds []string) error
- func (s *Session) DeleteTimeseries(paths []string) error
- func (s *Session) ExecuteQueryStatement(sql string) (*SessionDataSet, error)
- func (s *Session) ExecuteStatement(sql string) (*rpc.TSExecuteStatementResp, error)
- func (s *Session) GetSessionId() int64
- func (s *Session) GetTimeZone() (string, error)
- func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes []int32, ...) error
- func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) error
- func (s *Session) Open(enableRPCCompression bool, connectionTimeoutInMs int) error
- func (s *Session) SetStorageGroup(storageGroupId string) error
- func (s *Session) SetTimeZone(timeZone string) error
- type SessionConn
- type SessionDataSet
- func (s *SessionDataSet) GetBool(columnName string) bool
- func (s *SessionDataSet) GetColumnCount() int
- func (s *SessionDataSet) GetColumnDataType(columnIndex int) int32
- func (s *SessionDataSet) GetColumnName(columnIndex int) string
- func (s *SessionDataSet) GetDouble(columnName string) float64
- func (s *SessionDataSet) GetFloat(columnName string) float32
- func (s *SessionDataSet) GetInt32(columnName string) int32
- func (s *SessionDataSet) GetInt64(columnName string) int64
- func (s *SessionDataSet) GetRowRecord() *RowRecord
- func (s *SessionDataSet) GetText(columnName string) string
- func (s *SessionDataSet) GetTimestamp() int64
- func (s *SessionDataSet) GetValue(columnName string) interface{}
- func (s *SessionDataSet) IsIgnoreTimeStamp() bool
- func (s *SessionDataSet) Next() (bool, error)
- func (s *SessionDataSet) Scan(dest ...interface{}) error
Constants ¶
const ( BOOLEAN int32 = 0 INT32 int32 = 1 INT64 int32 = 2 FLOAT int32 = 3 DOUBLE int32 = 4 TEXT int32 = 5 )
const ( PLAIN int32 = 0 PLAIN_DICTIONARY int32 = 1 RLE int32 = 2 DIFF int32 = 3 TS_2DIFF int32 = 4 BITMAP int32 = 5 GORILLA_V1 int32 = 6 REGULAR int32 = 7 GORILLA int32 = 8 )
const ( UNCOMPRESSED int32 = 0 SNAPPY int32 = 1 GZIP int32 = 2 LZO int32 = 3 SDT int32 = 4 PAA int32 = 5 PLA int32 = 6 LZ4 int32 = 7 )
const ( TIMESTAMP_STR = "Time" START_INDEX = 2 FLAG = 0x80 )
const ( DefaultUser = "root" DefaultPasswd = "root" DefaultZoneId = "Asia/Shanghai" DefaultFetchSize = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialOption ¶
type DialOption interface {
// contains filtered or unexported methods
}
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (*Field) GetDataType ¶
func (*Field) GetFloat32 ¶
func (*Field) GetFloat64 ¶
type FuncOption ¶
type FuncOption struct {
// contains filtered or unexported fields
}
type IoTDBRpcDataSet ¶
type IoTDBRpcDataSet struct {
// contains filtered or unexported fields
}
func NewIoTDBRpcDataSet ¶
func NewIoTDBRpcDataSet(sql string, columnNameList []string, columnTypes []string, columnNameIndex map[string]int32, queryId int64, client *rpc.TSIServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, ignoreTimeStamp bool) *IoTDBRpcDataSet
func (*IoTDBRpcDataSet) GetRowRecord ¶
func (s *IoTDBRpcDataSet) GetRowRecord() *RowRecord
func (*IoTDBRpcDataSet) GetTimestamp ¶
func (s *IoTDBRpcDataSet) GetTimestamp() int64
type RowRecord ¶
type RowRecord struct {
// contains filtered or unexported fields
}
func (*RowRecord) GetTimestamp ¶
type Session ¶
type Session struct { Host string Port string User string Passwd string FetchSize int32 ZoneId string // contains filtered or unexported fields }
func NewSession ¶
func NewSession(host string, port string, opts ...DialOption) Session
func (*Session) CreateMultiTimeseries ¶
func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []int32, encodings []int32, compressors []int32) error
*create multiple time series * *params *paths: []string, complete time series paths (starts from root) *dataTypes: []int32, data types for time series *encodings: []int32, encodings for time series *compressors: []int32, compressing types for time series * *return *error: correctness of operation
func (*Session) CreateTimeseries ¶
func (s *Session) CreateTimeseries(path string, dataType int32, encoding int32, compressor int32, attributes map[string]string, tags map[string]string) (r *rpc.TSStatus, err error)
*create single time series * *params *path: string, complete time series path (starts from root) *dataType: int32, data type for this time series *encoding: int32, data type for this time series *compressor: int32, compressing type for this time series * *return *error: correctness of operation
func (*Session) DeleteData ¶
*delete all startTime <= data <= endTime in multiple time series * *params *paths: []string, time series array that the data in *startTime: int64, start time of deletion range *endTime: int64, end time of deletion range * *return *error: correctness of operation
func (*Session) DeleteStorageGroup ¶
*delete one storage group * *param *storageGroupId: string, storage group name (starts from root) * *return *error: correctness of operation
func (*Session) DeleteStorageGroups ¶
*delete multiple storage group * *param *storageGroupIds: []string, paths of the target storage groups * *return *error: correctness of operation
func (*Session) DeleteTimeseries ¶
*delete multiple time series, including data and schema * *params *paths: []string, time series paths, which should be complete (starts from root) * *return *error: correctness of operation
func (*Session) ExecuteQueryStatement ¶
func (s *Session) ExecuteQueryStatement(sql string) (*SessionDataSet, error)
func (*Session) ExecuteStatement ¶
func (s *Session) ExecuteStatement(sql string) (*rpc.TSExecuteStatementResp, error)
func (*Session) GetSessionId ¶
func (*Session) GetTimeZone ¶
func (*Session) InsertRecord ¶
func (*Session) InsertStringRecord ¶
func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) error
*special case for inserting one row of String (TEXT) value * *params *deviceId: string, time series path for device *measurements: []string, sensor names *values: []string, values to be inserted, for each sensor *timestamp: int64, indicate the timestamp of the row of data * *return *error: correctness of operation
func (*Session) SetStorageGroup ¶
*set one storage group * *param *storageGroupId: string, storage group name (starts from root) * *return *error: correctness of operation
func (*Session) SetTimeZone ¶
type SessionConn ¶
type SessionConn struct {
// contains filtered or unexported fields
}
type SessionDataSet ¶
type SessionDataSet struct {
// contains filtered or unexported fields
}
func NewSessionDataSet ¶
func NewSessionDataSet(sql string, columnNameList []string, columnTypeList []string, columnNameIndex map[string]int32, queryId int64, client *rpc.TSIServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, ignoreTimeStamp bool) *SessionDataSet
func (*SessionDataSet) GetBool ¶
func (s *SessionDataSet) GetBool(columnName string) bool
func (*SessionDataSet) GetColumnCount ¶
func (s *SessionDataSet) GetColumnCount() int
func (*SessionDataSet) GetColumnDataType ¶
func (s *SessionDataSet) GetColumnDataType(columnIndex int) int32
func (*SessionDataSet) GetColumnName ¶
func (s *SessionDataSet) GetColumnName(columnIndex int) string
func (*SessionDataSet) GetDouble ¶
func (s *SessionDataSet) GetDouble(columnName string) float64
func (*SessionDataSet) GetFloat ¶
func (s *SessionDataSet) GetFloat(columnName string) float32
func (*SessionDataSet) GetInt32 ¶
func (s *SessionDataSet) GetInt32(columnName string) int32
func (*SessionDataSet) GetInt64 ¶
func (s *SessionDataSet) GetInt64(columnName string) int64
func (*SessionDataSet) GetRowRecord ¶
func (s *SessionDataSet) GetRowRecord() *RowRecord
func (*SessionDataSet) GetText ¶
func (s *SessionDataSet) GetText(columnName string) string
func (*SessionDataSet) GetTimestamp ¶
func (s *SessionDataSet) GetTimestamp() int64
func (*SessionDataSet) GetValue ¶
func (s *SessionDataSet) GetValue(columnName string) interface{}
func (*SessionDataSet) IsIgnoreTimeStamp ¶
func (s *SessionDataSet) IsIgnoreTimeStamp() bool
func (*SessionDataSet) Next ¶
func (s *SessionDataSet) Next() (bool, error)
func (*SessionDataSet) Scan ¶
func (s *SessionDataSet) Scan(dest ...interface{}) error