client

package
v0.0.0-...-3106ca4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOOLEAN int32 = 0
	INT32   int32 = 1
	INT64   int32 = 2
	FLOAT   int32 = 3
	DOUBLE  int32 = 4
	TEXT    int32 = 5
)
View Source
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
)
View Source
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
)
View Source
const (
	TIMESTAMP_STR = "Time"
	START_INDEX   = 2
	FLAG          = 0x80
)
View Source
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 (f *Field) GetDataType() int32

func (*Field) GetFloat32

func (f *Field) GetFloat32() float32

func (*Field) GetFloat64

func (f *Field) GetFloat64() float64

func (*Field) GetInt32

func (f *Field) GetInt32() int32

func (*Field) GetInt64

func (f *Field) GetInt64() int64

func (*Field) GetName

func (f *Field) GetName() string

func (*Field) GetText

func (f *Field) GetText() string

func (*Field) GetValue

func (f *Field) GetValue() interface{}

func (*Field) IsNull

func (f *Field) IsNull() bool

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) GetFields

func (r *RowRecord) GetFields() []*Field

func (*RowRecord) GetTimestamp

func (r *RowRecord) GetTimestamp() int64

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) Close

func (s *Session) Close() error

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

func (s *Session) DeleteData(paths []string, startTime int64, endTime int64) error

*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

func (s *Session) DeleteStorageGroup(storageGroupId string) error

*delete one storage group * *param *storageGroupId: string, storage group name (starts from root) * *return *error: correctness of operation

func (*Session) DeleteStorageGroups

func (s *Session) DeleteStorageGroups(storageGroupIds []string) error

*delete multiple storage group * *param *storageGroupIds: []string, paths of the target storage groups * *return *error: correctness of operation

func (*Session) DeleteTimeseries

func (s *Session) DeleteTimeseries(paths []string) error

*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 (s *Session) GetSessionId() int64

func (*Session) GetTimeZone

func (s *Session) GetTimeZone() (string, error)

func (*Session) InsertRecord

func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes []int32, values []interface{}, timestamp int64) error

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) Open

func (s *Session) Open(enableRPCCompression bool, connectionTimeoutInMs int) error

func (*Session) SetStorageGroup

func (s *Session) SetStorageGroup(storageGroupId string) error

*set one storage group * *param *storageGroupId: string, storage group name (starts from root) * *return *error: correctness of operation

func (*Session) SetTimeZone

func (s *Session) SetTimeZone(timeZone string) error

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

Jump to

Keyboard shortcuts

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