client

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 12

Documentation

Index

Constants

View Source
const (
	BYTE_ARRAY_COLUMN_ENCODING = ColumnEncoding(iota)
	INT32_ARRAY_COLUMN_ENCODING
	INT64_ARRAY_COLUMN_ENCODING
	BINARY_ARRAY_COLUMN_ENCODING
	RLE_COLUMN_ENCODING
)
View Source
const (
	SuccessStatus       int32 = 200
	IncompatibleVersion int32 = 201
	ConfigurationError  int32 = 202
	StartUpError        int32 = 203
	ShutDownError       int32 = 204

	UnsupportedOperation    int32 = 300
	ExecuteStatementError   int32 = 301
	MultipleError           int32 = 302
	IllegalParameter        int32 = 303
	OverlapWithExistingTask int32 = 304
	InternalServerError     int32 = 305

	RedirectionRecommend int32 = 400

	DatabaseNotExist        int32 = 500
	DatabaseAlreadyExists   int32 = 501
	SeriesOverflow          int32 = 502
	TimeseriesAlreadyExist  int32 = 503
	TimeseriesInBlackList   int32 = 504
	AliasAlreadyExist       int32 = 505
	PathAlreadyExist        int32 = 506
	MetadataError           int32 = 507
	PathNotExist            int32 = 508
	IllegalPath             int32 = 509
	CreateTemplateError     int32 = 510
	DuplicatedTemplate      int32 = 511
	UndefinedTemplate       int32 = 512
	TemplateNotSet          int32 = 513
	DifferentTemplate       int32 = 514
	TemplateIsInUse         int32 = 515
	TemplateIncompatible    int32 = 516
	SegmentNotFound         int32 = 517
	PageOutOfSpace          int32 = 518
	RecordDuplicated        int32 = 519
	SegmentOutOfSpace       int32 = 520
	SchemaFileNotExists     int32 = 521
	OversizeRecord          int32 = 522
	SchemaFileRedoLogBroken int32 = 523
	TemplateNotActivated    int32 = 524

	SystemReadOnly         int32 = 600
	StorageEngineError     int32 = 601
	StorageEngineNotReady  int32 = 602
	DataregionProcessError int32 = 603
	TsfileProcessorError   int32 = 604
	WriteProcessError      int32 = 605
	WriteProcessReject     int32 = 606
	OutOfTtl               int32 = 607
	CompactionError        int32 = 608
	AlignedTimeseriesError int32 = 609
	WalError               int32 = 610
	DiskSpaceInsufficient  int32 = 611

	SqlParseError             int32 = 700
	SemanticError             int32 = 701
	GenerateTimeZoneError     int32 = 702
	SetTimeZoneError          int32 = 703
	QueryNotAllowed           int32 = 704
	LogicalOperatorError      int32 = 705
	LogicalOptimizeError      int32 = 706
	UnsupportedFillType       int32 = 707
	QueryProcessError         int32 = 708
	MppMemoryNotEnough        int32 = 709
	CloseOperationError       int32 = 710
	TsblockSerializeError     int32 = 711
	InternalRequestTimeOut    int32 = 712
	InternalRequestRetryError int32 = 713

	InitAuthError             int32 = 800
	WrongLoginPassword        int32 = 801
	NotLogin                  int32 = 802
	NoPermission              int32 = 803
	UserNotExist              int32 = 804
	UserAlreadyExist          int32 = 805
	UserAlreadyHasRole        int32 = 806
	UserNotHasRole            int32 = 807
	RoleNotExist              int32 = 808
	RoleAlreadyExist          int32 = 809
	AlreadyHasPrivilege       int32 = 810
	NotHasPrivilege           int32 = 811
	ClearPermissionCacheError int32 = 812
	UnknownAuthPrivilege      int32 = 813
	UnsupportedAuthOperation  int32 = 814
	AuthIoException           int32 = 815

	MigrateRegionError        int32 = 900
	CreateRegionError         int32 = 901
	DeleteRegionError         int32 = 902
	PartitionCacheUpdateError int32 = 903
	ConsensusNotInitialized   int32 = 904
	RegionLeaderChangeError   int32 = 905
	NoAvailableRegionGroup    int32 = 906

	DatanodeAlreadyRegistered int32 = 1000
	NoEnoughDatanode          int32 = 1001
	AddConfignodeError        int32 = 1002
	RemoveConfignodeError     int32 = 1003
	DatanodeNotExist          int32 = 1004
	DatanodeStopError         int32 = 1005
	RemoveDatanodeError       int32 = 1006
	RegisterRemovedDatanode   int32 = 1007
	CanNotConnectDatanode     int32 = 1008

	LoadFileError                 int32 = 1100
	LoadPieceOfTsfileError        int32 = 1101
	DeserializePieceOfTsfileError int32 = 1102
	SyncConnectionError           int32 = 1103
	SyncFileRedirectionError      int32 = 1104
	SyncFileError                 int32 = 1105
	CreatePipeSinkError           int32 = 1106
	PipeError                     int32 = 1107
	PipeserverError               int32 = 1108
	VerifyMetadataError           int32 = 1109

	UdfLoadClassError        int32 = 1200
	UdfDownloadError         int32 = 1201
	CreateUdfOnDatanodeError int32 = 1202
	DropUdfOnDatanodeError   int32 = 1203

	CreateTriggerError         int32 = 1300
	DropTriggerError           int32 = 1301
	TriggerFireError           int32 = 1302
	TriggerLoadClassError      int32 = 1303
	TriggerDownloadError       int32 = 1304
	CreateTriggerInstanceError int32 = 1305
	ActiveTriggerInstanceError int32 = 1306
	DropTriggerInstanceError   int32 = 1307
	UpdateTriggerLocationError int32 = 1308

	NoSuchCq                  int32 = 1400
	CqAlreadyActive           int32 = 1401
	CqAlreadyExist            int32 = 1402
	CqUpdateLastExecTimeError int32 = 1403
)

TSStatusCode

View Source
const (
	DefaultTimeZone        = "Asia/Shanghai"
	DefaultFetchSize       = 1024
	DefaultConnectRetryMax = 3
)
View Source
const (
	TimestampColumnName = "Time"
)

Variables

View Source
var BitUtil = []byte{1, 2, 4, 8, 16, 32, 64, 128}
View Source
var UnmarkBitUtil = []byte{
	0xFE,
	0xFD,
	0xFB,
	0xF7,
	0xEF,
	0xDF,
	0xBF,
	0x7F,
}

Functions

func DateToInt32 added in v1.3.5

func DateToInt32(localDate time.Time) (int32, error)

func Int32ToDate added in v1.3.5

func Int32ToDate(val int32) (time.Time, error)

func VerifySuccess

func VerifySuccess(status *common.TSStatus) error

Types

type BatchError

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

func NewBatchError

func NewBatchError(statuses []*common.TSStatus) *BatchError

func (*BatchError) Error

func (e *BatchError) Error() string

func (*BatchError) GetStatuses

func (e *BatchError) GetStatuses() []*common.TSStatus

type Binary added in v1.3.5

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

func NewBinary added in v1.3.5

func NewBinary(v []byte) *Binary

func (*Binary) GetStringValue added in v1.3.5

func (b *Binary) GetStringValue() string

func (*Binary) GetValues added in v1.3.5

func (b *Binary) GetValues() []byte

type BinaryArrayColumnDecoder added in v1.3.5

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

func (*BinaryArrayColumnDecoder) ReadColumn added in v1.3.5

func (decoder *BinaryArrayColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)

func (*BinaryArrayColumnDecoder) ReadTimeColumn added in v1.3.5

func (_ *BinaryArrayColumnDecoder) ReadTimeColumn(_ *bytes.Reader, _ int32) (*TimeColumn, error)

type BinaryColumn added in v1.3.5

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

func NewBinaryColumn added in v1.3.5

func NewBinaryColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []*Binary) (*BinaryColumn, error)

func (*BinaryColumn) GetBinaries added in v1.3.5

func (c *BinaryColumn) GetBinaries() ([]*Binary, error)

func (*BinaryColumn) GetBinary added in v1.3.5

func (c *BinaryColumn) GetBinary(position int32) (*Binary, error)

func (*BinaryColumn) GetBoolean added in v1.3.5

func (c *BinaryColumn) GetBoolean(_ int32) (bool, error)

func (*BinaryColumn) GetBooleans added in v1.3.5

func (c *BinaryColumn) GetBooleans() ([]bool, error)

func (*BinaryColumn) GetDataType added in v1.3.5

func (c *BinaryColumn) GetDataType() TSDataType

func (*BinaryColumn) GetDouble added in v1.3.5

func (c *BinaryColumn) GetDouble(_ int32) (float64, error)

func (*BinaryColumn) GetDoubles added in v1.3.5

func (c *BinaryColumn) GetDoubles() ([]float64, error)

func (*BinaryColumn) GetEncoding added in v1.3.5

func (c *BinaryColumn) GetEncoding() ColumnEncoding

func (*BinaryColumn) GetFloat added in v1.3.5

func (c *BinaryColumn) GetFloat(_ int32) (float32, error)

func (*BinaryColumn) GetFloats added in v1.3.5

func (c *BinaryColumn) GetFloats() ([]float32, error)

func (*BinaryColumn) GetInt added in v1.3.5

func (c *BinaryColumn) GetInt(_ int32) (int32, error)

func (*BinaryColumn) GetInts added in v1.3.5

func (c *BinaryColumn) GetInts() ([]int32, error)

func (*BinaryColumn) GetLong added in v1.3.5

func (c *BinaryColumn) GetLong(_ int32) (int64, error)

func (*BinaryColumn) GetLongs added in v1.3.5

func (c *BinaryColumn) GetLongs() ([]int64, error)

func (*BinaryColumn) GetObject added in v1.3.5

func (c *BinaryColumn) GetObject(position int32) (interface{}, error)

func (*BinaryColumn) GetObjects added in v1.3.5

func (c *BinaryColumn) GetObjects() ([]interface{}, error)

func (*BinaryColumn) GetPositionCount added in v1.3.5

func (c *BinaryColumn) GetPositionCount() int32

func (*BinaryColumn) IsNull added in v1.3.5

func (c *BinaryColumn) IsNull(position int32) bool

func (*BinaryColumn) IsNulls added in v1.3.5

func (c *BinaryColumn) IsNulls() []bool

func (*BinaryColumn) MayHaveNull added in v1.3.5

func (c *BinaryColumn) MayHaveNull() bool

type BitMap added in v1.3.2

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

func NewBitMap added in v1.3.2

func NewBitMap(size int) *BitMap

func (*BitMap) GetBits added in v1.3.2

func (b *BitMap) GetBits() []byte

func (*BitMap) IsAllUnmarked added in v1.3.2

func (b *BitMap) IsAllUnmarked() bool

func (*BitMap) IsMarked added in v1.3.2

func (b *BitMap) IsMarked(position int) bool

func (*BitMap) Mark added in v1.3.2

func (b *BitMap) Mark(position int)

func (*BitMap) UnMark added in v1.3.2

func (b *BitMap) UnMark(position int)

type BooleanColumn added in v1.3.5

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

func NewBooleanColumn added in v1.3.5

func NewBooleanColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []bool) (*BooleanColumn, error)

func (*BooleanColumn) GetBinaries added in v1.3.5

func (c *BooleanColumn) GetBinaries() ([]*Binary, error)

func (*BooleanColumn) GetBinary added in v1.3.5

func (c *BooleanColumn) GetBinary(_ int32) (*Binary, error)

func (*BooleanColumn) GetBoolean added in v1.3.5

func (c *BooleanColumn) GetBoolean(position int32) (bool, error)

func (*BooleanColumn) GetBooleans added in v1.3.5

func (c *BooleanColumn) GetBooleans() ([]bool, error)

func (*BooleanColumn) GetDataType added in v1.3.5

func (c *BooleanColumn) GetDataType() TSDataType

func (*BooleanColumn) GetDouble added in v1.3.5

func (c *BooleanColumn) GetDouble(_ int32) (float64, error)

func (*BooleanColumn) GetDoubles added in v1.3.5

func (c *BooleanColumn) GetDoubles() ([]float64, error)

func (*BooleanColumn) GetEncoding added in v1.3.5

func (c *BooleanColumn) GetEncoding() ColumnEncoding

func (*BooleanColumn) GetFloat added in v1.3.5

func (c *BooleanColumn) GetFloat(_ int32) (float32, error)

func (*BooleanColumn) GetFloats added in v1.3.5

func (c *BooleanColumn) GetFloats() ([]float32, error)

func (*BooleanColumn) GetInt added in v1.3.5

func (c *BooleanColumn) GetInt(_ int32) (int32, error)

func (*BooleanColumn) GetInts added in v1.3.5

func (c *BooleanColumn) GetInts() ([]int32, error)

func (*BooleanColumn) GetLong added in v1.3.5

func (c *BooleanColumn) GetLong(_ int32) (int64, error)

func (*BooleanColumn) GetLongs added in v1.3.5

func (c *BooleanColumn) GetLongs() ([]int64, error)

func (*BooleanColumn) GetObject added in v1.3.5

func (c *BooleanColumn) GetObject(position int32) (interface{}, error)

func (*BooleanColumn) GetObjects added in v1.3.5

func (c *BooleanColumn) GetObjects() ([]interface{}, error)

func (*BooleanColumn) GetPositionCount added in v1.3.5

func (c *BooleanColumn) GetPositionCount() int32

func (*BooleanColumn) IsNull added in v1.3.5

func (c *BooleanColumn) IsNull(position int32) bool

func (*BooleanColumn) IsNulls added in v1.3.5

func (c *BooleanColumn) IsNulls() []bool

func (*BooleanColumn) MayHaveNull added in v1.3.5

func (c *BooleanColumn) MayHaveNull() bool

type ByteArrayColumnDecoder added in v1.3.5

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

func (*ByteArrayColumnDecoder) ReadColumn added in v1.3.5

func (decoder *ByteArrayColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)

func (*ByteArrayColumnDecoder) ReadTimeColumn added in v1.3.5

func (_ *ByteArrayColumnDecoder) ReadTimeColumn(_ *bytes.Reader, _ int32) (*TimeColumn, error)

type ClusterConfig added in v0.12.1

type ClusterConfig struct {
	NodeUrls        []string //ip:port
	UserName        string
	Password        string
	FetchSize       int32
	TimeZone        string
	ConnectRetryMax int
}

type ClusterSession added in v0.12.1

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

type Column added in v1.3.5

type Column interface {
	GetDataType() TSDataType
	GetEncoding() ColumnEncoding
	GetBoolean(position int32) (bool, error)
	GetInt(position int32) (int32, error)
	GetLong(position int32) (int64, error)
	GetFloat(position int32) (float32, error)
	GetDouble(position int32) (float64, error)
	GetBinary(position int32) (*Binary, error)
	GetObject(position int32) (interface{}, error)

	GetBooleans() ([]bool, error)
	GetInts() ([]int32, error)
	GetLongs() ([]int64, error)
	GetFloats() ([]float32, error)
	GetDoubles() ([]float64, error)
	GetBinaries() ([]*Binary, error)
	GetObjects() ([]interface{}, error)

	MayHaveNull() bool
	IsNull(position int32) bool
	IsNulls() []bool

	GetPositionCount() int32
}

type ColumnDecoder added in v1.3.5

type ColumnDecoder interface {
	ReadTimeColumn(reader *bytes.Reader, positionCount int32) (*TimeColumn, error)
	ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)
}

type ColumnEncoding added in v1.3.5

type ColumnEncoding uint8

type Config

type Config struct {
	Host            string
	Port            string
	UserName        string
	Password        string
	FetchSize       int32
	TimeZone        string
	ConnectRetryMax int
}

type DoubleColumn added in v1.3.5

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

func NewDoubleColumn added in v1.3.5

func NewDoubleColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []float64) (*DoubleColumn, error)

func (*DoubleColumn) GetBinaries added in v1.3.5

func (c *DoubleColumn) GetBinaries() ([]*Binary, error)

func (*DoubleColumn) GetBinary added in v1.3.5

func (c *DoubleColumn) GetBinary(_ int32) (*Binary, error)

func (*DoubleColumn) GetBoolean added in v1.3.5

func (c *DoubleColumn) GetBoolean(_ int32) (bool, error)

func (*DoubleColumn) GetBooleans added in v1.3.5

func (c *DoubleColumn) GetBooleans() ([]bool, error)

func (*DoubleColumn) GetDataType added in v1.3.5

func (c *DoubleColumn) GetDataType() TSDataType

func (*DoubleColumn) GetDouble added in v1.3.5

func (c *DoubleColumn) GetDouble(position int32) (float64, error)

func (*DoubleColumn) GetDoubles added in v1.3.5

func (c *DoubleColumn) GetDoubles() ([]float64, error)

func (*DoubleColumn) GetEncoding added in v1.3.5

func (c *DoubleColumn) GetEncoding() ColumnEncoding

func (*DoubleColumn) GetFloat added in v1.3.5

func (c *DoubleColumn) GetFloat(_ int32) (float32, error)

func (*DoubleColumn) GetFloats added in v1.3.5

func (c *DoubleColumn) GetFloats() ([]float32, error)

func (*DoubleColumn) GetInt added in v1.3.5

func (c *DoubleColumn) GetInt(_ int32) (int32, error)

func (*DoubleColumn) GetInts added in v1.3.5

func (c *DoubleColumn) GetInts() ([]int32, error)

func (*DoubleColumn) GetLong added in v1.3.5

func (c *DoubleColumn) GetLong(_ int32) (int64, error)

func (*DoubleColumn) GetLongs added in v1.3.5

func (c *DoubleColumn) GetLongs() ([]int64, error)

func (*DoubleColumn) GetObject added in v1.3.5

func (c *DoubleColumn) GetObject(position int32) (interface{}, error)

func (*DoubleColumn) GetObjects added in v1.3.5

func (c *DoubleColumn) GetObjects() ([]interface{}, error)

func (*DoubleColumn) GetPositionCount added in v1.3.5

func (c *DoubleColumn) GetPositionCount() int32

func (*DoubleColumn) IsNull added in v1.3.5

func (c *DoubleColumn) IsNull(position int32) bool

func (*DoubleColumn) IsNulls added in v1.3.5

func (c *DoubleColumn) IsNulls() []bool

func (*DoubleColumn) MayHaveNull added in v1.3.5

func (c *DoubleColumn) MayHaveNull() bool

type Field

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

func (*Field) GetDataType

func (f *Field) GetDataType() TSDataType

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 FloatColumn added in v1.3.5

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

func NewFloatColumn added in v1.3.5

func NewFloatColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []float32) (*FloatColumn, error)

func (*FloatColumn) GetBinaries added in v1.3.5

func (c *FloatColumn) GetBinaries() ([]*Binary, error)

func (*FloatColumn) GetBinary added in v1.3.5

func (c *FloatColumn) GetBinary(_ int32) (*Binary, error)

func (*FloatColumn) GetBoolean added in v1.3.5

func (c *FloatColumn) GetBoolean(_ int32) (bool, error)

func (*FloatColumn) GetBooleans added in v1.3.5

func (c *FloatColumn) GetBooleans() ([]bool, error)

func (*FloatColumn) GetDataType added in v1.3.5

func (c *FloatColumn) GetDataType() TSDataType

func (*FloatColumn) GetDouble added in v1.3.5

func (c *FloatColumn) GetDouble(_ int32) (float64, error)

func (*FloatColumn) GetDoubles added in v1.3.5

func (c *FloatColumn) GetDoubles() ([]float64, error)

func (*FloatColumn) GetEncoding added in v1.3.5

func (c *FloatColumn) GetEncoding() ColumnEncoding

func (*FloatColumn) GetFloat added in v1.3.5

func (c *FloatColumn) GetFloat(position int32) (float32, error)

func (*FloatColumn) GetFloats added in v1.3.5

func (c *FloatColumn) GetFloats() ([]float32, error)

func (*FloatColumn) GetInt added in v1.3.5

func (c *FloatColumn) GetInt(_ int32) (int32, error)

func (*FloatColumn) GetInts added in v1.3.5

func (c *FloatColumn) GetInts() ([]int32, error)

func (*FloatColumn) GetLong added in v1.3.5

func (c *FloatColumn) GetLong(_ int32) (int64, error)

func (*FloatColumn) GetLongs added in v1.3.5

func (c *FloatColumn) GetLongs() ([]int64, error)

func (*FloatColumn) GetObject added in v1.3.5

func (c *FloatColumn) GetObject(position int32) (interface{}, error)

func (*FloatColumn) GetObjects added in v1.3.5

func (c *FloatColumn) GetObjects() ([]interface{}, error)

func (*FloatColumn) GetPositionCount added in v1.3.5

func (c *FloatColumn) GetPositionCount() int32

func (*FloatColumn) IsNull added in v1.3.5

func (c *FloatColumn) IsNull(position int32) bool

func (*FloatColumn) IsNulls added in v1.3.5

func (c *FloatColumn) IsNulls() []bool

func (*FloatColumn) MayHaveNull added in v1.3.5

func (c *FloatColumn) MayHaveNull() bool

type Int32ArrayColumnDecoder added in v1.3.5

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

func (*Int32ArrayColumnDecoder) ReadColumn added in v1.3.5

func (decoder *Int32ArrayColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)

func (*Int32ArrayColumnDecoder) ReadTimeColumn added in v1.3.5

func (_ *Int32ArrayColumnDecoder) ReadTimeColumn(_ *bytes.Reader, _ int32) (*TimeColumn, error)

type Int64ArrayColumnDecoder added in v1.3.5

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

func (*Int64ArrayColumnDecoder) ReadColumn added in v1.3.5

func (decoder *Int64ArrayColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)

func (*Int64ArrayColumnDecoder) ReadTimeColumn added in v1.3.5

func (decoder *Int64ArrayColumnDecoder) ReadTimeColumn(reader *bytes.Reader, positionCount int32) (*TimeColumn, error)

type IntColumn added in v1.3.5

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

func NewIntColumn added in v1.3.5

func NewIntColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []int32) (*IntColumn, error)

func (*IntColumn) GetBinaries added in v1.3.5

func (c *IntColumn) GetBinaries() ([]*Binary, error)

func (*IntColumn) GetBinary added in v1.3.5

func (c *IntColumn) GetBinary(_ int32) (*Binary, error)

func (*IntColumn) GetBoolean added in v1.3.5

func (c *IntColumn) GetBoolean(_ int32) (bool, error)

func (*IntColumn) GetBooleans added in v1.3.5

func (c *IntColumn) GetBooleans() ([]bool, error)

func (*IntColumn) GetDataType added in v1.3.5

func (c *IntColumn) GetDataType() TSDataType

func (*IntColumn) GetDouble added in v1.3.5

func (c *IntColumn) GetDouble(_ int32) (float64, error)

func (*IntColumn) GetDoubles added in v1.3.5

func (c *IntColumn) GetDoubles() ([]float64, error)

func (*IntColumn) GetEncoding added in v1.3.5

func (c *IntColumn) GetEncoding() ColumnEncoding

func (*IntColumn) GetFloat added in v1.3.5

func (c *IntColumn) GetFloat(_ int32) (float32, error)

func (*IntColumn) GetFloats added in v1.3.5

func (c *IntColumn) GetFloats() ([]float32, error)

func (*IntColumn) GetInt added in v1.3.5

func (c *IntColumn) GetInt(position int32) (int32, error)

func (*IntColumn) GetInts added in v1.3.5

func (c *IntColumn) GetInts() ([]int32, error)

func (*IntColumn) GetLong added in v1.3.5

func (c *IntColumn) GetLong(_ int32) (int64, error)

func (*IntColumn) GetLongs added in v1.3.5

func (c *IntColumn) GetLongs() ([]int64, error)

func (*IntColumn) GetObject added in v1.3.5

func (c *IntColumn) GetObject(position int32) (interface{}, error)

func (*IntColumn) GetObjects added in v1.3.5

func (c *IntColumn) GetObjects() ([]interface{}, error)

func (*IntColumn) GetPositionCount added in v1.3.5

func (c *IntColumn) GetPositionCount() int32

func (*IntColumn) IsNull added in v1.3.5

func (c *IntColumn) IsNull(position int32) bool

func (*IntColumn) IsNulls added in v1.3.5

func (c *IntColumn) IsNulls() []bool

func (*IntColumn) MayHaveNull added in v1.3.5

func (c *IntColumn) MayHaveNull() bool

type IoTDBRpcDataSet

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

func NewIoTDBRpcDataSet

func NewIoTDBRpcDataSet(sql string, columnNameList []string, columnTypeList []string, columnNameIndex map[string]int32, ignoreTimestamp bool, moreData bool, queryId int64, statementId int64, client *rpc.IClientRPCServiceClient, sessionId int64, queryResult [][]byte, fetchSize int32, timeout *int64) (rpcDataSet *IoTDBRpcDataSet, err error)

func (*IoTDBRpcDataSet) Close

func (s *IoTDBRpcDataSet) Close() (err error)

func (*IoTDBRpcDataSet) GetDate added in v1.3.5

func (s *IoTDBRpcDataSet) GetDate(columnName string) (time.Time, error)

func (*IoTDBRpcDataSet) GetDateByIndex added in v1.3.5

func (s *IoTDBRpcDataSet) GetDateByIndex(columnIndex int32) (time.Time, error)

func (*IoTDBRpcDataSet) Next added in v1.3.5

func (s *IoTDBRpcDataSet) Next() (result bool, err error)

type LongColumn added in v1.3.5

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

func NewLongColumn added in v1.3.5

func NewLongColumn(arrayOffset int32, positionCount int32, valueIsNull []bool, values []int64) (*LongColumn, error)

func (*LongColumn) GetBinaries added in v1.3.5

func (c *LongColumn) GetBinaries() ([]*Binary, error)

func (*LongColumn) GetBinary added in v1.3.5

func (c *LongColumn) GetBinary(_ int32) (*Binary, error)

func (*LongColumn) GetBoolean added in v1.3.5

func (c *LongColumn) GetBoolean(_ int32) (bool, error)

func (*LongColumn) GetBooleans added in v1.3.5

func (c *LongColumn) GetBooleans() ([]bool, error)

func (*LongColumn) GetDataType added in v1.3.5

func (c *LongColumn) GetDataType() TSDataType

func (*LongColumn) GetDouble added in v1.3.5

func (c *LongColumn) GetDouble(_ int32) (float64, error)

func (*LongColumn) GetDoubles added in v1.3.5

func (c *LongColumn) GetDoubles() ([]float64, error)

func (*LongColumn) GetEncoding added in v1.3.5

func (c *LongColumn) GetEncoding() ColumnEncoding

func (*LongColumn) GetFloat added in v1.3.5

func (c *LongColumn) GetFloat(_ int32) (float32, error)

func (*LongColumn) GetFloats added in v1.3.5

func (c *LongColumn) GetFloats() ([]float32, error)

func (*LongColumn) GetInt added in v1.3.5

func (c *LongColumn) GetInt(_ int32) (int32, error)

func (*LongColumn) GetInts added in v1.3.5

func (c *LongColumn) GetInts() ([]int32, error)

func (*LongColumn) GetLong added in v1.3.5

func (c *LongColumn) GetLong(position int32) (int64, error)

func (*LongColumn) GetLongs added in v1.3.5

func (c *LongColumn) GetLongs() ([]int64, error)

func (*LongColumn) GetObject added in v1.3.5

func (c *LongColumn) GetObject(position int32) (interface{}, error)

func (*LongColumn) GetObjects added in v1.3.5

func (c *LongColumn) GetObjects() ([]interface{}, error)

func (*LongColumn) GetPositionCount added in v1.3.5

func (c *LongColumn) GetPositionCount() int32

func (*LongColumn) IsNull added in v1.3.5

func (c *LongColumn) IsNull(position int32) bool

func (*LongColumn) IsNulls added in v1.3.5

func (c *LongColumn) IsNulls() []bool

func (*LongColumn) MayHaveNull added in v1.3.5

func (c *LongColumn) MayHaveNull() bool

type MeasurementSchema

type MeasurementSchema struct {
	Measurement string
	DataType    TSDataType
}

type PoolConfig added in v0.13.1

type PoolConfig struct {
	Host            string
	Port            string
	NodeUrls        []string
	UserName        string
	Password        string
	FetchSize       int32
	TimeZone        string
	ConnectRetryMax int
}

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 RunLengthColumnDecoder added in v1.3.5

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

func (*RunLengthColumnDecoder) ReadColumn added in v1.3.5

func (decoder *RunLengthColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error)

func (*RunLengthColumnDecoder) ReadTimeColumn added in v1.3.5

func (_ *RunLengthColumnDecoder) ReadTimeColumn(_ *bytes.Reader, _ int32) (*TimeColumn, error)

type RunLengthEncodedColumn added in v1.3.5

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

func NewRunLengthEncodedColumn added in v1.3.5

func NewRunLengthEncodedColumn(value Column, positionCount int32) (*RunLengthEncodedColumn, error)

func (*RunLengthEncodedColumn) GetBinaries added in v1.3.5

func (c *RunLengthEncodedColumn) GetBinaries() ([]*Binary, error)

func (*RunLengthEncodedColumn) GetBinary added in v1.3.5

func (c *RunLengthEncodedColumn) GetBinary(_ int32) (*Binary, error)

func (*RunLengthEncodedColumn) GetBoolean added in v1.3.5

func (c *RunLengthEncodedColumn) GetBoolean(_ int32) (bool, error)

func (*RunLengthEncodedColumn) GetBooleans added in v1.3.5

func (c *RunLengthEncodedColumn) GetBooleans() ([]bool, error)

func (*RunLengthEncodedColumn) GetDataType added in v1.3.5

func (c *RunLengthEncodedColumn) GetDataType() TSDataType

func (*RunLengthEncodedColumn) GetDouble added in v1.3.5

func (c *RunLengthEncodedColumn) GetDouble(_ int32) (float64, error)

func (*RunLengthEncodedColumn) GetDoubles added in v1.3.5

func (c *RunLengthEncodedColumn) GetDoubles() ([]float64, error)

func (*RunLengthEncodedColumn) GetEncoding added in v1.3.5

func (c *RunLengthEncodedColumn) GetEncoding() ColumnEncoding

func (*RunLengthEncodedColumn) GetFloat added in v1.3.5

func (c *RunLengthEncodedColumn) GetFloat(_ int32) (float32, error)

func (*RunLengthEncodedColumn) GetFloats added in v1.3.5

func (c *RunLengthEncodedColumn) GetFloats() ([]float32, error)

func (*RunLengthEncodedColumn) GetInt added in v1.3.5

func (c *RunLengthEncodedColumn) GetInt(_ int32) (int32, error)

func (*RunLengthEncodedColumn) GetInts added in v1.3.5

func (c *RunLengthEncodedColumn) GetInts() ([]int32, error)

func (*RunLengthEncodedColumn) GetLong added in v1.3.5

func (c *RunLengthEncodedColumn) GetLong(_ int32) (int64, error)

func (*RunLengthEncodedColumn) GetLongs added in v1.3.5

func (c *RunLengthEncodedColumn) GetLongs() ([]int64, error)

func (*RunLengthEncodedColumn) GetObject added in v1.3.5

func (c *RunLengthEncodedColumn) GetObject(_ int32) (interface{}, error)

func (*RunLengthEncodedColumn) GetObjects added in v1.3.5

func (c *RunLengthEncodedColumn) GetObjects() ([]interface{}, error)

func (*RunLengthEncodedColumn) GetPositionCount added in v1.3.5

func (c *RunLengthEncodedColumn) GetPositionCount() int32

func (*RunLengthEncodedColumn) GetValue added in v1.3.5

func (c *RunLengthEncodedColumn) GetValue() Column

func (*RunLengthEncodedColumn) IsNull added in v1.3.5

func (c *RunLengthEncodedColumn) IsNull(_ int32) bool

func (*RunLengthEncodedColumn) IsNulls added in v1.3.5

func (c *RunLengthEncodedColumn) IsNulls() []bool

func (*RunLengthEncodedColumn) MayHaveNull added in v1.3.5

func (c *RunLengthEncodedColumn) MayHaveNull() bool

type Session

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

func NewClusterSession added in v0.12.1

func NewClusterSession(clusterConfig *ClusterConfig) (Session, error)

func NewSession

func NewSession(config *Config) Session

func (*Session) Close

func (s *Session) Close() error

func (*Session) CreateAlignedTimeseries added in v0.13.0

func (s *Session) CreateAlignedTimeseries(prefixPath string, measurements []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType, measurementAlias []string) (r *common.TSStatus, err error)

*create single aligned time series *params *prefixPath: string, time series prefix path (starts from root) *measurements: []string, sensor names *dataTypes: []int32, data types for time series *encodings: []int32, encodings for time series *compressors: []int32, compressing types for time series *measurementAlias: []string, sensor names alias *return *error: correctness of operation

func (*Session) CreateMultiTimeseries

func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType) (r *common.TSStatus, err 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 TSDataType, encoding TSEncoding, compressor TSCompressionType, attributes map[string]string, tags map[string]string) (r *common.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) (r *common.TSStatus, err 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) (r *common.TSStatus, err 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) (r *common.TSStatus, err 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) (r *common.TSStatus, err 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) ExecuteAggregationQuery added in v1.1.5

func (s *Session) ExecuteAggregationQuery(paths []string, aggregations []common.TAggregationType,
	startTime *int64, endTime *int64, interval *int64,
	timeoutMs *int64) (*SessionDataSet, error)

func (*Session) ExecuteAggregationQueryWithLegalNodes added in v1.3.3

func (s *Session) ExecuteAggregationQueryWithLegalNodes(paths []string, aggregations []common.TAggregationType,
	startTime *int64, endTime *int64, interval *int64,
	timeoutMs *int64, legalNodes *bool) (*SessionDataSet, error)

func (*Session) ExecuteBatchStatement

func (s *Session) ExecuteBatchStatement(inserts []string) (r *common.TSStatus, err error)

func (*Session) ExecuteGroupByQueryIntervalQuery added in v1.3.4

func (s *Session) ExecuteGroupByQueryIntervalQuery(database *string, device, measurement string, aggregationType common.TAggregationType,
	dataType int32, startTime *int64, endTime *int64, interval *int64, timeoutMs *int64, isAligned *bool) (*SessionDataSet, error)

func (*Session) ExecuteNonQueryStatement added in v1.0.0

func (s *Session) ExecuteNonQueryStatement(sql string) (r *common.TSStatus, err error)

func (*Session) ExecuteQueryStatement

func (s *Session) ExecuteQueryStatement(sql string, timeoutMs *int64) (*SessionDataSet, error)

func (*Session) ExecuteRawDataQuery

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

func (*Session) ExecuteStatement

func (s *Session) ExecuteStatement(sql string) (*SessionDataSet, error)

func (*Session) ExecuteStatementWithContext added in v1.3.4

func (s *Session) ExecuteStatementWithContext(ctx context.Context, sql string) (*SessionDataSet, error)

func (*Session) ExecuteUpdateStatement

func (s *Session) ExecuteUpdateStatement(sql string) (*SessionDataSet, error)

func (*Session) GetSessionId

func (s *Session) GetSessionId() int64

func (*Session) GetTimeZone

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

func (*Session) InsertAlignedRecord added in v0.13.0

func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *common.TSStatus, err error)

func (*Session) InsertAlignedRecords added in v0.13.0

func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
	timestamps []int64) (r *common.TSStatus, err error)

func (*Session) InsertAlignedRecordsOfOneDevice added in v0.13.0

func (s *Session) InsertAlignedRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *common.TSStatus, err error)

func (*Session) InsertAlignedTablet added in v0.13.0

func (s *Session) InsertAlignedTablet(tablet *Tablet, sorted bool) (r *common.TSStatus, err error)

func (*Session) InsertAlignedTablets added in v0.13.0

func (s *Session) InsertAlignedTablets(tablets []*Tablet, sorted bool) (r *common.TSStatus, err error)

func (*Session) InsertRecord

func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *common.TSStatus, err error)

func (*Session) InsertRecords

func (s *Session) InsertRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
	timestamps []int64) (r *common.TSStatus, err error)

*insert multiple rows of data, records are independent to each other, in other words, there's no relationship *between those records * *params *deviceIds: []string, time series paths for device *measurements: [][]string, each element of outer list indicates measurements of a device *dataTypes: [][]int32, each element of outer list indicates sensor data types of a device *values: [][]interface{}, values to be inserted, for each device *timestamps: []int64, timestamps for records *

func (*Session) InsertRecordsOfOneDevice

func (s *Session) InsertRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *common.TSStatus, err error)

InsertRecordsOfOneDevice Insert multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet method Each row is independent, which could have different deviceId, time, number of measurements

func (*Session) InsertStringRecord

func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) (r *common.TSStatus, err 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) InsertTablet

func (s *Session) InsertTablet(tablet *Tablet, sorted bool) (r *common.TSStatus, err error)

func (*Session) InsertTablets

func (s *Session) InsertTablets(tablets []*Tablet, sorted bool) (r *common.TSStatus, err error)

* InsertTablets insert multiple tablets, tablets are independent to each other *params *tablets: []*client.Tablet, list of tablets

func (*Session) Open

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

func (*Session) OpenCluster added in v0.12.1

func (s *Session) OpenCluster(enableRPCCompression bool) error

func (*Session) SetFetchSize added in v1.3.5

func (s *Session) SetFetchSize(fetchSize int32)

func (*Session) SetStorageGroup

func (s *Session) SetStorageGroup(storageGroupId string) (r *common.TSStatus, err 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) (r *common.TSStatus, err error)

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, statementId int64, client *rpc.IClientRPCServiceClient, sessionId int64, queryResult [][]byte, ignoreTimestamp bool, timeout *int64, moreData bool, fetchSize int32) (*SessionDataSet, error)

func (*SessionDataSet) Close

func (s *SessionDataSet) Close() error

func (*SessionDataSet) FindColumn added in v1.3.5

func (s *SessionDataSet) FindColumn(columnName string) int32

func (*SessionDataSet) GetBlob added in v1.3.5

func (s *SessionDataSet) GetBlob(columnName string) (*Binary, error)

func (*SessionDataSet) GetBlobByIndex added in v1.3.5

func (s *SessionDataSet) GetBlobByIndex(columnIndex int32) (*Binary, error)

func (*SessionDataSet) GetBoolean added in v1.3.5

func (s *SessionDataSet) GetBoolean(columnName string) (bool, error)

func (*SessionDataSet) GetBooleanByIndex added in v1.3.5

func (s *SessionDataSet) GetBooleanByIndex(columnIndex int32) (bool, error)

func (*SessionDataSet) GetColumnNames

func (s *SessionDataSet) GetColumnNames() []string

func (*SessionDataSet) GetColumnTypes added in v1.3.5

func (s *SessionDataSet) GetColumnTypes() []string

func (*SessionDataSet) GetDate added in v1.3.5

func (s *SessionDataSet) GetDate(columnName string) (time.Time, error)

func (*SessionDataSet) GetDateByIndex added in v1.3.5

func (s *SessionDataSet) GetDateByIndex(columnIndex int32) (time.Time, error)

func (*SessionDataSet) GetDouble

func (s *SessionDataSet) GetDouble(columnName string) (float64, error)

func (*SessionDataSet) GetDoubleByIndex added in v1.3.5

func (s *SessionDataSet) GetDoubleByIndex(columnIndex int32) (float64, error)

func (*SessionDataSet) GetFloat

func (s *SessionDataSet) GetFloat(columnName string) (float32, error)

func (*SessionDataSet) GetFloatByIndex added in v1.3.5

func (s *SessionDataSet) GetFloatByIndex(columnIndex int32) (float32, error)

func (*SessionDataSet) GetInt added in v1.3.5

func (s *SessionDataSet) GetInt(columnName string) (int32, error)

func (*SessionDataSet) GetIntByIndex added in v1.3.5

func (s *SessionDataSet) GetIntByIndex(columnIndex int32) (int32, error)

func (*SessionDataSet) GetLong added in v1.3.5

func (s *SessionDataSet) GetLong(columnName string) (int64, error)

func (*SessionDataSet) GetLongByIndex added in v1.3.5

func (s *SessionDataSet) GetLongByIndex(columnIndex int32) (int64, error)

func (*SessionDataSet) GetObject added in v1.3.5

func (s *SessionDataSet) GetObject(columnName string) (interface{}, error)

func (*SessionDataSet) GetObjectByIndex added in v1.3.5

func (s *SessionDataSet) GetObjectByIndex(columnIndex int32) (interface{}, error)

func (*SessionDataSet) GetString added in v1.3.5

func (s *SessionDataSet) GetString(columnName string) (string, error)

func (*SessionDataSet) GetStringByIndex added in v1.3.5

func (s *SessionDataSet) GetStringByIndex(columnIndex int32) (string, error)

func (*SessionDataSet) GetTimestamp

func (s *SessionDataSet) GetTimestamp(columnName string) (time.Time, error)

func (*SessionDataSet) GetTimestampByIndex added in v1.3.5

func (s *SessionDataSet) GetTimestampByIndex(columnIndex int32) (time.Time, error)

func (*SessionDataSet) IsNull added in v1.3.4

func (s *SessionDataSet) IsNull(columnName string) (bool, error)

func (*SessionDataSet) IsNullByIndex added in v1.3.5

func (s *SessionDataSet) IsNullByIndex(columnIndex int32) (bool, error)

func (*SessionDataSet) Next

func (s *SessionDataSet) Next() (bool, error)

type SessionPool added in v0.13.1

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

func NewSessionPool added in v0.13.1

func NewSessionPool(conf *PoolConfig, maxSize, connectionTimeoutInMs, waitToGetSessionTimeoutInMs int,
	enableCompression bool) SessionPool

func (*SessionPool) Close added in v0.13.1

func (spool *SessionPool) Close()

func (*SessionPool) ConstructSession added in v0.13.1

func (spool *SessionPool) ConstructSession(config *PoolConfig) (session Session, err error)

func (*SessionPool) GetSession added in v0.13.1

func (spool *SessionPool) GetSession() (session Session, err error)

func (*SessionPool) PutBack added in v0.13.1

func (spool *SessionPool) PutBack(session Session)

type TSCompressionType

type TSCompressionType uint8
const (
	UNCOMPRESSED TSCompressionType = 0
	SNAPPY       TSCompressionType = 1
	GZIP         TSCompressionType = 2
	LZ4          TSCompressionType = 7
	ZSTD         TSCompressionType = 8
	LZMA2        TSCompressionType = 9
)

type TSDataType

type TSDataType int8
const (
	UNKNOWN   TSDataType = -1
	BOOLEAN   TSDataType = 0
	INT32     TSDataType = 1
	INT64     TSDataType = 2
	FLOAT     TSDataType = 3
	DOUBLE    TSDataType = 4
	TEXT      TSDataType = 5
	TIMESTAMP TSDataType = 8
	DATE      TSDataType = 9
	BLOB      TSDataType = 10
	STRING    TSDataType = 11
)

func GetDataTypeByStr added in v1.3.5

func GetDataTypeByStr(name string) (TSDataType, error)

type TSEncoding

type TSEncoding uint8
const (
	PLAIN      TSEncoding = 0
	DICTIONARY TSEncoding = 1
	RLE        TSEncoding = 2
	DIFF       TSEncoding = 3
	TS_2DIFF   TSEncoding = 4
	BITMAP     TSEncoding = 5
	GORILLA_V1 TSEncoding = 6
	REGULAR    TSEncoding = 7
	GORILLA    TSEncoding = 8
	ZIGZAG     TSEncoding = 9
	FREQ       TSEncoding = 10
	CHIMP      TSEncoding = 11
	SPRINTZ    TSEncoding = 12
	RLBE       TSEncoding = 13
)

type Tablet

type Tablet struct {
	RowSize int
	// contains filtered or unexported fields
}

func NewTablet

func NewTablet(deviceId string, measurementSchemas []*MeasurementSchema, maxRowNumber int) (*Tablet, error)

func (*Tablet) GetMeasurements

func (t *Tablet) GetMeasurements() []string

func (*Tablet) GetRowCount

func (t *Tablet) GetRowCount() int

func (*Tablet) GetTimestampBytes

func (t *Tablet) GetTimestampBytes() []byte

func (*Tablet) GetValueAt

func (t *Tablet) GetValueAt(columnIndex, rowIndex int) (interface{}, error)

func (*Tablet) Len

func (t *Tablet) Len() int

func (*Tablet) Less

func (t *Tablet) Less(i, j int) bool

func (*Tablet) Reset added in v1.1.1

func (t *Tablet) Reset()

func (*Tablet) SetTimestamp

func (t *Tablet) SetTimestamp(timestamp int64, rowIndex int)

func (*Tablet) SetValueAt

func (t *Tablet) SetValueAt(value interface{}, columnIndex, rowIndex int) error

func (*Tablet) Sort

func (t *Tablet) Sort() error

func (*Tablet) Swap

func (t *Tablet) Swap(i, j int)

type TimeColumn added in v1.3.5

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

func NewTimeColumn added in v1.3.5

func NewTimeColumn(arrayOffset int32, positionCount int32, values []int64) (*TimeColumn, error)

func (*TimeColumn) GetBinaries added in v1.3.5

func (c *TimeColumn) GetBinaries() ([]*Binary, error)

func (*TimeColumn) GetBinary added in v1.3.5

func (c *TimeColumn) GetBinary(_ int32) (*Binary, error)

func (*TimeColumn) GetBoolean added in v1.3.5

func (c *TimeColumn) GetBoolean(_ int32) (bool, error)

func (*TimeColumn) GetBooleans added in v1.3.5

func (c *TimeColumn) GetBooleans() ([]bool, error)

func (*TimeColumn) GetDataType added in v1.3.5

func (tc *TimeColumn) GetDataType() TSDataType

func (*TimeColumn) GetDouble added in v1.3.5

func (c *TimeColumn) GetDouble(_ int32) (float64, error)

func (*TimeColumn) GetDoubles added in v1.3.5

func (c *TimeColumn) GetDoubles() ([]float64, error)

func (*TimeColumn) GetEncoding added in v1.3.5

func (tc *TimeColumn) GetEncoding() ColumnEncoding

func (*TimeColumn) GetEndTime added in v1.3.5

func (tc *TimeColumn) GetEndTime() int64

func (*TimeColumn) GetFloat added in v1.3.5

func (c *TimeColumn) GetFloat(_ int32) (float32, error)

func (*TimeColumn) GetFloats added in v1.3.5

func (c *TimeColumn) GetFloats() ([]float32, error)

func (*TimeColumn) GetInt added in v1.3.5

func (c *TimeColumn) GetInt(_ int32) (int32, error)

func (*TimeColumn) GetInts added in v1.3.5

func (c *TimeColumn) GetInts() ([]int32, error)

func (*TimeColumn) GetLong added in v1.3.5

func (tc *TimeColumn) GetLong(position int32) (int64, error)

func (*TimeColumn) GetLongs added in v1.3.5

func (tc *TimeColumn) GetLongs() ([]int64, error)

func (*TimeColumn) GetObject added in v1.3.5

func (c *TimeColumn) GetObject(_ int32) (interface{}, error)

func (*TimeColumn) GetObjects added in v1.3.5

func (c *TimeColumn) GetObjects() ([]interface{}, error)

func (*TimeColumn) GetPositionCount added in v1.3.5

func (tc *TimeColumn) GetPositionCount() int32

func (*TimeColumn) GetStartTime added in v1.3.5

func (tc *TimeColumn) GetStartTime() int64

func (*TimeColumn) GetTimes added in v1.3.5

func (tc *TimeColumn) GetTimes() []int64

func (*TimeColumn) IsNull added in v1.3.5

func (tc *TimeColumn) IsNull(_ int32) bool

func (*TimeColumn) IsNulls added in v1.3.5

func (tc *TimeColumn) IsNulls() []bool

func (*TimeColumn) MayHaveNull added in v1.3.5

func (tc *TimeColumn) MayHaveNull() bool

type TsBlock added in v1.3.5

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

func DeserializeTsBlock added in v1.3.5

func DeserializeTsBlock(data []byte) (*TsBlock, error)

func NewTsBlock added in v1.3.5

func NewTsBlock(positionCount int32, timeColumn *TimeColumn, valueColumns ...Column) (*TsBlock, error)

func (*TsBlock) GetColumn added in v1.3.5

func (t *TsBlock) GetColumn(columnIndex int32) Column

func (*TsBlock) GetEndTime added in v1.3.5

func (t *TsBlock) GetEndTime() int64

func (*TsBlock) GetPositionCount added in v1.3.5

func (t *TsBlock) GetPositionCount() int32

func (*TsBlock) GetStartTime added in v1.3.5

func (t *TsBlock) GetStartTime() int64

func (*TsBlock) GetTimeByIndex added in v1.3.5

func (t *TsBlock) GetTimeByIndex(index int32) (int64, error)

func (*TsBlock) GetTimeColumn added in v1.3.5

func (t *TsBlock) GetTimeColumn() Column

func (*TsBlock) GetValueColumnCount added in v1.3.5

func (t *TsBlock) GetValueColumnCount() int32

func (*TsBlock) GetValueColumns added in v1.3.5

func (t *TsBlock) GetValueColumns() *[]Column

func (*TsBlock) IsEmpty added in v1.3.5

func (t *TsBlock) IsEmpty() bool

Jump to

Keyboard shortcuts

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