You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2023/06/07 11:03:38 UTC
[iotdb-client-go] branch executeGroupByQueryIntervalQueryAPI created (now c70935a)
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a change to branch executeGroupByQueryIntervalQueryAPI
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git
at c70935a add ExecuteGroupByQueryIntervalQuery api
This branch includes the following new commits:
new c70935a add ExecuteGroupByQueryIntervalQuery api
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb-client-go] 01/01: add ExecuteGroupByQueryIntervalQuery api
Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch executeGroupByQueryIntervalQueryAPI
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git
commit c70935a17e5131bec535756ee579052c1891b8fa
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Wed Jun 7 19:03:25 2023 +0800
add ExecuteGroupByQueryIntervalQuery api
---
client/session.go | 75 +-
example/session_example.go | 40 +-
rpc/client.go | 8727 ++++++++++++++++++++++++--------------------
3 files changed, 4889 insertions(+), 3953 deletions(-)
diff --git a/client/session.go b/client/session.go
index 8307c1f..1a48c65 100644
--- a/client/session.go
+++ b/client/session.go
@@ -534,6 +534,33 @@ func (s *Session) ExecuteAggregationQueryWithLegalNodes(paths []string, aggregat
}
}
+func (s *Session) ExecuteGroupByQueryIntervalQuery(database *string, device, measurement string, aggregationType common.TAggregationType,
+ dataType int32, startTime *int64, endTime *int64, interval *int64, timeoutMs *int64) (*SessionDataSet, error) {
+
+ request := rpc.TSGroupByQueryIntervalReq{SessionId: s.sessionId, StatementId: s.requestStatementId,
+ Database: database, Device: device, Measurement: measurement, AggregationType: aggregationType, DataType: dataType,
+ StartTime: startTime, EndTime: endTime, Interval: interval, FetchSize: &s.config.FetchSize,
+ Timeout: timeoutMs}
+ if resp, err := s.client.ExecuteGroupByQueryIntervalQuery(context.Background(), &request); err == nil {
+ if statusErr := VerifySuccess(resp.Status); statusErr == nil {
+ return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err
+ } else {
+ return nil, statusErr
+ }
+ } else {
+ if s.reconnect() {
+ request.SessionId = s.sessionId
+ resp, err = s.client.ExecuteGroupByQueryIntervalQuery(context.Background(), &request)
+ if statusErr := VerifySuccess(resp.Status); statusErr == nil {
+ return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err
+ } else {
+ return nil, statusErr
+ }
+ }
+ return nil, err
+ }
+}
+
func (s *Session) genTSInsertRecordReq(deviceId string, time int64,
measurements []string,
types []TSDataType,
@@ -587,54 +614,6 @@ func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, da
return r, err
}
-func (s *Session) genFastInsertRecordReq(deviceIds []string,
- timestamps []int64,
- dataTypes [][]TSDataType,
- values [][]interface{}) (*rpc.TSFastInsertRecordsReq, error) {
- length := len(deviceIds)
- if length != len(timestamps) || length != len(values) {
- return nil, errLength
- }
-
- request := rpc.TSFastInsertRecordsReq{
- SessionId: s.sessionId,
- PrefixPaths: deviceIds,
- Timestamps: timestamps,
- }
-
- v := make([][]byte, length)
- for i := 0; i < len(timestamps); i++ {
- if bys, err := valuesToBytesForFast(dataTypes[i], values[i]); err == nil {
- v[i] = bys
- } else {
- return nil, err
- }
- }
-
- request.ValuesList = v
- return &request, nil
-}
-
-func (s *Session) FastInsertRecords(deviceIds []string,
- dataTypes [][]TSDataType,
- values [][]interface{},
- timestamps []int64) (r *common.TSStatus, err error) {
- request, err := s.genFastInsertRecordReq(deviceIds, timestamps, dataTypes, values)
- if err != nil {
- return nil, err
- } else {
- r, err = s.client.FastInsertRecords(context.Background(), request)
- if err != nil && r == nil {
- if s.reconnect() {
- request.SessionId = s.sessionId
- r, err = s.client.FastInsertRecords(context.Background(), request)
- }
- }
- }
-
- return r, err
-}
-
type deviceData struct {
timestamps []int64
measurementsSlice [][]string
diff --git a/example/session_example.go b/example/session_example.go
index c49e189..c4eea36 100644
--- a/example/session_example.go
+++ b/example/session_example.go
@@ -57,7 +57,7 @@ func main() {
}
defer session.Close()
- fastInsertRecords()
+ // testExecuteGroupByQueryIntervalQuery()
setStorageGroup("root.ln1")
deleteStorageGroup("root.ln1")
@@ -145,6 +145,24 @@ func main() {
deleteTimeseries("root.ln.device1.*")
}
+func testExecuteGroupByQueryIntervalQuery() {
+ db := "root.sg"
+ device := "root.sg.cpu.host_1"
+ measurement := "usage_user"
+ aggregationType := common.TAggregationType_MAX_VALUE
+ dateType := int32(2)
+ startTime := int64(1451754531000)
+ endTime := int64(1451758131000)
+ interval := int64(60000)
+ timeOut := int64(60000)
+
+ ret, err := session.ExecuteGroupByQueryIntervalQuery(&db, device, measurement, aggregationType,
+ dateType, &startTime, &endTime, &interval, &timeOut)
+ if err == nil {
+ printDataSet1(ret)
+ }
+}
+
func printDevice1(sds *client.SessionDataSet) {
showTimestamp := !sds.IsIgnoreTimeStamp()
if showTimestamp {
@@ -383,26 +401,6 @@ func insertAlignedRecord() {
fmt.Println()
}
-func fastInsertRecords() {
- var (
- deviceIds = []string{"root.fast.d1", "root.fast.d2"}
- dataTypes = [][]client.TSDataType{{client.INT32, client.INT32}, {client.INT32, client.INT32}}
- values = [][]interface{}{{int32(120), int32(121)}, {int32(130), int32(131)}}
- timestamp = []int64{12, 13}
- )
- checkError(session.FastInsertRecords(deviceIds, dataTypes, values, timestamp))
- sessionDataSet, err := session.ExecuteStatement("show devices")
- if err == nil {
- printDataSet0(sessionDataSet)
- sessionDataSet.Close()
- } else {
- log.Println(err)
- }
-
- deleteTimeseries("root.fast.**")
- fmt.Println()
-}
-
func insertRecords() {
var (
deviceId = []string{"root.sg1.dev1"}
diff --git a/rpc/client.go b/rpc/client.go
index b3668b8..d9ec8b0 100644
--- a/rpc/client.go
+++ b/rpc/client.go
@@ -7256,45 +7256,64 @@ func (p *TSInsertTabletsReq) String() string {
// Attributes:
// - SessionId
// - PrefixPaths
-// - Timestamps
+// - MeasurementsList
// - ValuesList
-type TSFastInsertRecordsReq struct {
+// - Timestamps
+// - IsAligned
+type TSInsertRecordsReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"`
- // unused field # 3
+ MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"`
ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"`
+ IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"`
}
-func NewTSFastInsertRecordsReq() *TSFastInsertRecordsReq {
- return &TSFastInsertRecordsReq{}
+func NewTSInsertRecordsReq() *TSInsertRecordsReq {
+ return &TSInsertRecordsReq{}
}
-func (p *TSFastInsertRecordsReq) GetSessionId() int64 {
+func (p *TSInsertRecordsReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSFastInsertRecordsReq) GetPrefixPaths() []string {
+func (p *TSInsertRecordsReq) GetPrefixPaths() []string {
return p.PrefixPaths
}
-func (p *TSFastInsertRecordsReq) GetTimestamps() []int64 {
- return p.Timestamps
+func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string {
+ return p.MeasurementsList
}
-func (p *TSFastInsertRecordsReq) GetValuesList() [][]byte {
+func (p *TSInsertRecordsReq) GetValuesList() [][]byte {
return p.ValuesList
}
-func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+
+func (p *TSInsertRecordsReq) GetTimestamps() []int64 {
+ return p.Timestamps
+}
+var TSInsertRecordsReq_IsAligned_DEFAULT bool
+func (p *TSInsertRecordsReq) GetIsAligned() bool {
+ if !p.IsSetIsAligned() {
+ return TSInsertRecordsReq_IsAligned_DEFAULT
+ }
+return *p.IsAligned
+}
+func (p *TSInsertRecordsReq) IsSetIsAligned() bool {
+ return p.IsAligned != nil
+}
+
+func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
var issetPrefixPaths bool = false;
- var issetTimestamps bool = false;
+ var issetMeasurementsList bool = false;
var issetValuesList bool = false;
+ var issetTimestamps bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -7325,12 +7344,12 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco
return err
}
}
- case 5:
+ case 3:
if fieldTypeId == thrift.LIST {
- if err := p.ReadField5(ctx, iprot); err != nil {
+ if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetTimestamps = true
+ issetMeasurementsList = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -7347,6 +7366,27 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco
return err
}
}
+ case 5:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField5(ctx, iprot); err != nil {
+ return err
+ }
+ issetTimestamps = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 6:
+ if fieldTypeId == thrift.BOOL {
+ if err := p.ReadField6(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
default:
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -7365,16 +7405,19 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco
if !issetPrefixPaths{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set"));
}
- if !issetTimestamps{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set"));
+ if !issetMeasurementsList{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set"));
}
if !issetValuesList{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set"));
}
+ if !issetTimestamps{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set"));
+ }
return nil
}
-func (p *TSFastInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -7383,7 +7426,7 @@ func (p *TSFastInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.T
return nil
}
-func (p *TSFastInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -7405,21 +7448,33 @@ var _elem63 string
return nil
}
-func (p *TSFastInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
- tSlice := make([]int64, 0, size)
- p.Timestamps = tSlice
+ tSlice := make([][]string, 0, size)
+ p.MeasurementsList = tSlice
for i := 0; i < size; i ++ {
-var _elem64 int64
- if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ _elem64 := tSlice
+ for i := 0; i < size; i ++ {
+var _elem65 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem64 = v
+ _elem65 = v
}
- p.Timestamps = append(p.Timestamps, _elem64)
+ _elem64 = append(_elem64, _elem65)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ p.MeasurementsList = append(p.MeasurementsList, _elem64)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -7427,7 +7482,7 @@ var _elem64 int64
return nil
}
-func (p *TSFastInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -7435,13 +7490,35 @@ func (p *TSFastInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.T
tSlice := make([][]byte, 0, size)
p.ValuesList = tSlice
for i := 0; i < size; i ++ {
-var _elem65 []byte
+var _elem66 []byte
if v, err := iprot.ReadBinary(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem65 = v
+ _elem66 = v
+}
+ p.ValuesList = append(p.ValuesList, _elem66)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]int64, 0, size)
+ p.Timestamps = tSlice
+ for i := 0; i < size; i ++ {
+var _elem67 int64
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _elem67 = v
}
- p.ValuesList = append(p.ValuesList, _elem65)
+ p.Timestamps = append(p.Timestamps, _elem67)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -7449,14 +7526,25 @@ var _elem65 []byte
return nil
}
-func (p *TSFastInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSFastInsertRecordsReq"); err != nil {
+func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 6: ", err)
+} else {
+ p.IsAligned = &v
+}
+ return nil
+}
+
+func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
+ if err := p.writeField3(ctx, oprot); err != nil { return err }
if err := p.writeField4(ctx, oprot); err != nil { return err }
if err := p.writeField5(ctx, oprot); err != nil { return err }
+ if err := p.writeField6(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -7465,7 +7553,7 @@ func (p *TSFastInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtoc
return nil
}
-func (p *TSFastInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -7475,7 +7563,7 @@ func (p *TSFastInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.T
return err
}
-func (p *TSFastInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil {
@@ -7493,7 +7581,33 @@ func (p *TSFastInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.T
return err
}
-func (p *TSFastInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.MeasurementsList {
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range v {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) }
+ return err
+}
+
+func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil {
@@ -7511,7 +7625,7 @@ func (p *TSFastInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.T
return err
}
-func (p *TSFastInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil {
@@ -7529,7 +7643,19 @@ func (p *TSFastInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.T
return err
}
-func (p *TSFastInsertRecordsReq) Equals(other *TSFastInsertRecordsReq) bool {
+func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetIsAligned() {
+ if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) }
+ }
+ return err
+}
+
+func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -7538,87 +7664,102 @@ func (p *TSFastInsertRecordsReq) Equals(other *TSFastInsertRecordsReq) bool {
if p.SessionId != other.SessionId { return false }
if len(p.PrefixPaths) != len(other.PrefixPaths) { return false }
for i, _tgt := range p.PrefixPaths {
- _src66 := other.PrefixPaths[i]
- if _tgt != _src66 { return false }
+ _src68 := other.PrefixPaths[i]
+ if _tgt != _src68 { return false }
+ }
+ if len(p.MeasurementsList) != len(other.MeasurementsList) { return false }
+ for i, _tgt := range p.MeasurementsList {
+ _src69 := other.MeasurementsList[i]
+ if len(_tgt) != len(_src69) { return false }
+ for i, _tgt := range _tgt {
+ _src70 := _src69[i]
+ if _tgt != _src70 { return false }
+ }
}
if len(p.ValuesList) != len(other.ValuesList) { return false }
for i, _tgt := range p.ValuesList {
- _src67 := other.ValuesList[i]
- if bytes.Compare(_tgt, _src67) != 0 { return false }
+ _src71 := other.ValuesList[i]
+ if bytes.Compare(_tgt, _src71) != 0 { return false }
}
if len(p.Timestamps) != len(other.Timestamps) { return false }
for i, _tgt := range p.Timestamps {
- _src68 := other.Timestamps[i]
- if _tgt != _src68 { return false }
+ _src72 := other.Timestamps[i]
+ if _tgt != _src72 { return false }
+ }
+ if p.IsAligned != other.IsAligned {
+ if p.IsAligned == nil || other.IsAligned == nil {
+ return false
+ }
+ if (*p.IsAligned) != (*other.IsAligned) { return false }
}
return true
}
-func (p *TSFastInsertRecordsReq) String() string {
+func (p *TSInsertRecordsReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSFastInsertRecordsReq(%+v)", *p)
+ return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - PrefixPaths
+// - PrefixPath
// - MeasurementsList
// - ValuesList
// - Timestamps
// - IsAligned
-type TSInsertRecordsReq struct {
+type TSInsertRecordsOfOneDeviceReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"`
+ PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"`
ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"`
IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"`
}
-func NewTSInsertRecordsReq() *TSInsertRecordsReq {
- return &TSInsertRecordsReq{}
+func NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq {
+ return &TSInsertRecordsOfOneDeviceReq{}
}
-func (p *TSInsertRecordsReq) GetSessionId() int64 {
+func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSInsertRecordsReq) GetPrefixPaths() []string {
- return p.PrefixPaths
+func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string {
+ return p.PrefixPath
}
-func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string {
+func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string {
return p.MeasurementsList
}
-func (p *TSInsertRecordsReq) GetValuesList() [][]byte {
+func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte {
return p.ValuesList
}
-func (p *TSInsertRecordsReq) GetTimestamps() []int64 {
+func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 {
return p.Timestamps
}
-var TSInsertRecordsReq_IsAligned_DEFAULT bool
-func (p *TSInsertRecordsReq) GetIsAligned() bool {
+var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool
+func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool {
if !p.IsSetIsAligned() {
- return TSInsertRecordsReq_IsAligned_DEFAULT
+ return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT
}
return *p.IsAligned
}
-func (p *TSInsertRecordsReq) IsSetIsAligned() bool {
+func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool {
return p.IsAligned != nil
}
-func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPrefixPaths bool = false;
+ var issetPrefixPath bool = false;
var issetMeasurementsList bool = false;
var issetValuesList bool = false;
var issetTimestamps bool = false;
@@ -7642,11 +7783,11 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e
}
}
case 2:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPrefixPaths = true
+ issetPrefixPath = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -7710,8 +7851,8 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPrefixPaths{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set"));
+ if !issetPrefixPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
}
if !issetMeasurementsList{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set"));
@@ -7725,7 +7866,7 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e
return nil
}
-func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -7734,29 +7875,16 @@ func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProt
return nil
}
-func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.PrefixPaths = tSlice
- for i := 0; i < size; i ++ {
-var _elem69 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
} else {
- _elem69 = v
+ p.PrefixPath = v
}
- p.PrefixPaths = append(p.PrefixPaths, _elem69)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -7769,20 +7897,20 @@ func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProt
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- _elem70 := tSlice
+ _elem73 := tSlice
for i := 0; i < size; i ++ {
-var _elem71 string
+var _elem74 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem71 = v
+ _elem74 = v
}
- _elem70 = append(_elem70, _elem71)
+ _elem73 = append(_elem73, _elem74)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
- p.MeasurementsList = append(p.MeasurementsList, _elem70)
+ p.MeasurementsList = append(p.MeasurementsList, _elem73)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -7790,7 +7918,7 @@ var _elem71 string
return nil
}
-func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -7798,13 +7926,13 @@ func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProt
tSlice := make([][]byte, 0, size)
p.ValuesList = tSlice
for i := 0; i < size; i ++ {
-var _elem72 []byte
+var _elem75 []byte
if v, err := iprot.ReadBinary(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem72 = v
+ _elem75 = v
}
- p.ValuesList = append(p.ValuesList, _elem72)
+ p.ValuesList = append(p.ValuesList, _elem75)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -7812,7 +7940,7 @@ var _elem72 []byte
return nil
}
-func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -7820,13 +7948,13 @@ func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProt
tSlice := make([]int64, 0, size)
p.Timestamps = tSlice
for i := 0; i < size; i ++ {
-var _elem73 int64
+var _elem76 int64
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem73 = v
+ _elem76 = v
}
- p.Timestamps = append(p.Timestamps, _elem73)
+ p.Timestamps = append(p.Timestamps, _elem76)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -7834,7 +7962,7 @@ var _elem73 int64
return nil
}
-func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
@@ -7843,8 +7971,8 @@ func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProt
return nil
}
-func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); err != nil {
+func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsOfOneDeviceReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -7861,7 +7989,7 @@ func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol)
return nil
}
-func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -7871,25 +7999,17 @@ func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.PrefixPaths {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
return err
}
-func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil {
@@ -7915,7 +8035,7 @@ func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil {
@@ -7933,7 +8053,7 @@ func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil {
@@ -7951,7 +8071,7 @@ func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetIsAligned() {
if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) }
@@ -7963,36 +8083,32 @@ func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool {
+func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if len(p.PrefixPaths) != len(other.PrefixPaths) { return false }
- for i, _tgt := range p.PrefixPaths {
- _src74 := other.PrefixPaths[i]
- if _tgt != _src74 { return false }
- }
+ if p.PrefixPath != other.PrefixPath { return false }
if len(p.MeasurementsList) != len(other.MeasurementsList) { return false }
for i, _tgt := range p.MeasurementsList {
- _src75 := other.MeasurementsList[i]
- if len(_tgt) != len(_src75) { return false }
+ _src77 := other.MeasurementsList[i]
+ if len(_tgt) != len(_src77) { return false }
for i, _tgt := range _tgt {
- _src76 := _src75[i]
- if _tgt != _src76 { return false }
+ _src78 := _src77[i]
+ if _tgt != _src78 { return false }
}
}
if len(p.ValuesList) != len(other.ValuesList) { return false }
for i, _tgt := range p.ValuesList {
- _src77 := other.ValuesList[i]
- if bytes.Compare(_tgt, _src77) != 0 { return false }
+ _src79 := other.ValuesList[i]
+ if bytes.Compare(_tgt, _src79) != 0 { return false }
}
if len(p.Timestamps) != len(other.Timestamps) { return false }
for i, _tgt := range p.Timestamps {
- _src78 := other.Timestamps[i]
- if _tgt != _src78 { return false }
+ _src80 := other.Timestamps[i]
+ if _tgt != _src80 { return false }
}
if p.IsAligned != other.IsAligned {
if p.IsAligned == nil || other.IsAligned == nil {
@@ -8003,11 +8119,11 @@ func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool {
return true
}
-func (p *TSInsertRecordsReq) String() string {
+func (p *TSInsertRecordsOfOneDeviceReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p)
+ return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p)
}
// Attributes:
@@ -8017,51 +8133,51 @@ func (p *TSInsertRecordsReq) String() string {
// - ValuesList
// - Timestamps
// - IsAligned
-type TSInsertRecordsOfOneDeviceReq struct {
+type TSInsertStringRecordsOfOneDeviceReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"`
- ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
+ ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"`
IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"`
}
-func NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq {
- return &TSInsertRecordsOfOneDeviceReq{}
+func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq {
+ return &TSInsertStringRecordsOfOneDeviceReq{}
}
-func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 {
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string {
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string {
return p.PrefixPath
}
-func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string {
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string {
return p.MeasurementsList
}
-func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte {
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string {
return p.ValuesList
}
-func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 {
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 {
return p.Timestamps
}
-var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool
-func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool {
+var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool
+func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool {
if !p.IsSetIsAligned() {
- return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT
+ return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT
}
return *p.IsAligned
}
-func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool {
+func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool {
return p.IsAligned != nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
@@ -8174,7 +8290,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.T
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -8183,7 +8299,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot t
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
@@ -8192,7 +8308,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot t
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -8205,20 +8321,20 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot t
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- _elem79 := tSlice
+ _elem81 := tSlice
for i := 0; i < size; i ++ {
-var _elem80 string
+var _elem82 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem80 = v
+ _elem82 = v
}
- _elem79 = append(_elem79, _elem80)
+ _elem81 = append(_elem81, _elem82)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
- p.MeasurementsList = append(p.MeasurementsList, _elem79)
+ p.MeasurementsList = append(p.MeasurementsList, _elem81)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8226,21 +8342,33 @@ var _elem80 string
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
- tSlice := make([][]byte, 0, size)
+ tSlice := make([][]string, 0, size)
p.ValuesList = tSlice
for i := 0; i < size; i ++ {
-var _elem81 []byte
- if v, err := iprot.ReadBinary(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ _elem83 := tSlice
+ for i := 0; i < size; i ++ {
+var _elem84 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem81 = v
+ _elem84 = v
}
- p.ValuesList = append(p.ValuesList, _elem81)
+ _elem83 = append(_elem83, _elem84)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ p.ValuesList = append(p.ValuesList, _elem83)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8248,7 +8376,7 @@ var _elem81 []byte
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -8256,13 +8384,13 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot t
tSlice := make([]int64, 0, size)
p.Timestamps = tSlice
for i := 0; i < size; i ++ {
-var _elem82 int64
+var _elem85 int64
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem82 = v
+ _elem85 = v
}
- p.Timestamps = append(p.Timestamps, _elem82)
+ p.Timestamps = append(p.Timestamps, _elem85)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8270,7 +8398,7 @@ var _elem82 int64
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
@@ -8279,8 +8407,8 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot t
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsOfOneDeviceReq"); err != nil {
+func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsOfOneDeviceReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -8297,7 +8425,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.
return nil
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -8307,7 +8435,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
@@ -8317,7 +8445,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil {
@@ -8343,15 +8471,23 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil {
+ if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.ValuesList {
- if err := oprot.WriteBinary(ctx, v); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range v {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
}
if err := oprot.WriteListEnd(ctx); err != nil {
return thrift.PrependError("error writing list end: ", err)
@@ -8361,7 +8497,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil {
@@ -8379,7 +8515,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetIsAligned() {
if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) }
@@ -8391,7 +8527,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot t
return err
}
-func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool {
+func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -8401,22 +8537,26 @@ func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDevice
if p.PrefixPath != other.PrefixPath { return false }
if len(p.MeasurementsList) != len(other.MeasurementsList) { return false }
for i, _tgt := range p.MeasurementsList {
- _src83 := other.MeasurementsList[i]
- if len(_tgt) != len(_src83) { return false }
+ _src86 := other.MeasurementsList[i]
+ if len(_tgt) != len(_src86) { return false }
for i, _tgt := range _tgt {
- _src84 := _src83[i]
- if _tgt != _src84 { return false }
+ _src87 := _src86[i]
+ if _tgt != _src87 { return false }
}
}
if len(p.ValuesList) != len(other.ValuesList) { return false }
for i, _tgt := range p.ValuesList {
- _src85 := other.ValuesList[i]
- if bytes.Compare(_tgt, _src85) != 0 { return false }
+ _src88 := other.ValuesList[i]
+ if len(_tgt) != len(_src88) { return false }
+ for i, _tgt := range _tgt {
+ _src89 := _src88[i]
+ if _tgt != _src89 { return false }
+ }
}
if len(p.Timestamps) != len(other.Timestamps) { return false }
for i, _tgt := range p.Timestamps {
- _src86 := other.Timestamps[i]
- if _tgt != _src86 { return false }
+ _src90 := other.Timestamps[i]
+ if _tgt != _src90 { return false }
}
if p.IsAligned != other.IsAligned {
if p.IsAligned == nil || other.IsAligned == nil {
@@ -8427,71 +8567,71 @@ func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDevice
return true
}
-func (p *TSInsertRecordsOfOneDeviceReq) String() string {
+func (p *TSInsertStringRecordsOfOneDeviceReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p)
+ return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - PrefixPath
+// - PrefixPaths
// - MeasurementsList
// - ValuesList
// - Timestamps
// - IsAligned
-type TSInsertStringRecordsOfOneDeviceReq struct {
+type TSInsertStringRecordsReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
+ PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"`
MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"`
ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"`
IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"`
}
-func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq {
- return &TSInsertStringRecordsOfOneDeviceReq{}
+func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq {
+ return &TSInsertStringRecordsReq{}
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 {
+func (p *TSInsertStringRecordsReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string {
- return p.PrefixPath
+func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string {
+ return p.PrefixPaths
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string {
+func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string {
return p.MeasurementsList
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string {
+func (p *TSInsertStringRecordsReq) GetValuesList() [][]string {
return p.ValuesList
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 {
+func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 {
return p.Timestamps
}
-var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool
-func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool {
+var TSInsertStringRecordsReq_IsAligned_DEFAULT bool
+func (p *TSInsertStringRecordsReq) GetIsAligned() bool {
if !p.IsSetIsAligned() {
- return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT
+ return TSInsertStringRecordsReq_IsAligned_DEFAULT
}
return *p.IsAligned
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool {
+func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool {
return p.IsAligned != nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPrefixPath bool = false;
+ var issetPrefixPaths bool = false;
var issetMeasurementsList bool = false;
var issetValuesList bool = false;
var issetTimestamps bool = false;
@@ -8515,11 +8655,11 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th
}
}
case 2:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPrefixPath = true
+ issetPrefixPaths = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -8583,8 +8723,8 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPrefixPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
+ if !issetPrefixPaths{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set"));
}
if !issetMeasurementsList{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set"));
@@ -8598,7 +8738,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -8607,16 +8747,29 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, i
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
+func (p *TSInsertStringRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.PrefixPaths = tSlice
+ for i := 0; i < size; i ++ {
+var _elem91 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.PrefixPath = v
+ _elem91 = v
}
+ p.PrefixPaths = append(p.PrefixPaths, _elem91)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -8629,20 +8782,20 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, i
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- _elem87 := tSlice
+ _elem92 := tSlice
for i := 0; i < size; i ++ {
-var _elem88 string
+var _elem93 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem88 = v
+ _elem93 = v
}
- _elem87 = append(_elem87, _elem88)
+ _elem92 = append(_elem92, _elem93)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
- p.MeasurementsList = append(p.MeasurementsList, _elem87)
+ p.MeasurementsList = append(p.MeasurementsList, _elem92)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8650,7 +8803,7 @@ var _elem88 string
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -8663,20 +8816,20 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, i
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- _elem89 := tSlice
+ _elem94 := tSlice
for i := 0; i < size; i ++ {
-var _elem90 string
+var _elem95 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem90 = v
+ _elem95 = v
}
- _elem89 = append(_elem89, _elem90)
+ _elem94 = append(_elem94, _elem95)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
- p.ValuesList = append(p.ValuesList, _elem89)
+ p.ValuesList = append(p.ValuesList, _elem94)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8684,7 +8837,7 @@ var _elem90 string
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -8692,13 +8845,13 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, i
tSlice := make([]int64, 0, size)
p.Timestamps = tSlice
for i := 0; i < size; i ++ {
-var _elem91 int64
+var _elem96 int64
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem91 = v
+ _elem96 = v
}
- p.Timestamps = append(p.Timestamps, _elem91)
+ p.Timestamps = append(p.Timestamps, _elem96)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -8706,7 +8859,7 @@ var _elem91 int64
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
@@ -8715,8 +8868,8 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, i
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsOfOneDeviceReq"); err != nil {
+func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -8733,7 +8886,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot t
return nil
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -8743,17 +8896,25 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, o
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
+func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.PrefixPaths {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) }
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil {
@@ -8779,7 +8940,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, o
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil {
@@ -8805,7 +8966,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, o
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil {
@@ -8823,7 +8984,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, o
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetIsAligned() {
if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) }
@@ -8835,36 +8996,40 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, o
return err
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool {
+func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if p.PrefixPath != other.PrefixPath { return false }
+ if len(p.PrefixPaths) != len(other.PrefixPaths) { return false }
+ for i, _tgt := range p.PrefixPaths {
+ _src97 := other.PrefixPaths[i]
+ if _tgt != _src97 { return false }
+ }
if len(p.MeasurementsList) != len(other.MeasurementsList) { return false }
for i, _tgt := range p.MeasurementsList {
- _src92 := other.MeasurementsList[i]
- if len(_tgt) != len(_src92) { return false }
+ _src98 := other.MeasurementsList[i]
+ if len(_tgt) != len(_src98) { return false }
for i, _tgt := range _tgt {
- _src93 := _src92[i]
- if _tgt != _src93 { return false }
+ _src99 := _src98[i]
+ if _tgt != _src99 { return false }
}
}
if len(p.ValuesList) != len(other.ValuesList) { return false }
for i, _tgt := range p.ValuesList {
- _src94 := other.ValuesList[i]
- if len(_tgt) != len(_src94) { return false }
+ _src100 := other.ValuesList[i]
+ if len(_tgt) != len(_src100) { return false }
for i, _tgt := range _tgt {
- _src95 := _src94[i]
- if _tgt != _src95 { return false }
+ _src101 := _src100[i]
+ if _tgt != _src101 { return false }
}
}
if len(p.Timestamps) != len(other.Timestamps) { return false }
for i, _tgt := range p.Timestamps {
- _src96 := other.Timestamps[i]
- if _tgt != _src96 { return false }
+ _src102 := other.Timestamps[i]
+ if _tgt != _src102 { return false }
}
if p.IsAligned != other.IsAligned {
if p.IsAligned == nil || other.IsAligned == nil {
@@ -8875,74 +9040,54 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecord
return true
}
-func (p *TSInsertStringRecordsOfOneDeviceReq) String() string {
+func (p *TSInsertStringRecordsReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p)
+ return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - PrefixPaths
-// - MeasurementsList
-// - ValuesList
-// - Timestamps
-// - IsAligned
-type TSInsertStringRecordsReq struct {
- SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"`
- MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"`
- ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"`
- Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"`
- IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"`
+// - Paths
+// - StartTime
+// - EndTime
+type TSDeleteDataReq struct {
+ SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
+ Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"`
+ StartTime int64 `thrift:"startTime,3,required" db:"startTime" json:"startTime"`
+ EndTime int64 `thrift:"endTime,4,required" db:"endTime" json:"endTime"`
}
-func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq {
- return &TSInsertStringRecordsReq{}
+func NewTSDeleteDataReq() *TSDeleteDataReq {
+ return &TSDeleteDataReq{}
}
-func (p *TSInsertStringRecordsReq) GetSessionId() int64 {
+func (p *TSDeleteDataReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string {
- return p.PrefixPaths
-}
-
-func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string {
- return p.MeasurementsList
+func (p *TSDeleteDataReq) GetPaths() []string {
+ return p.Paths
}
-func (p *TSInsertStringRecordsReq) GetValuesList() [][]string {
- return p.ValuesList
+func (p *TSDeleteDataReq) GetStartTime() int64 {
+ return p.StartTime
}
-func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 {
- return p.Timestamps
-}
-var TSInsertStringRecordsReq_IsAligned_DEFAULT bool
-func (p *TSInsertStringRecordsReq) GetIsAligned() bool {
- if !p.IsSetIsAligned() {
- return TSInsertStringRecordsReq_IsAligned_DEFAULT
- }
-return *p.IsAligned
-}
-func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool {
- return p.IsAligned != nil
+func (p *TSDeleteDataReq) GetEndTime() int64 {
+ return p.EndTime
}
-
-func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPrefixPaths bool = false;
- var issetMeasurementsList bool = false;
- var issetValuesList bool = false;
- var issetTimestamps bool = false;
+ var issetPaths bool = false;
+ var issetStartTime bool = false;
+ var issetEndTime bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -8967,50 +9112,29 @@ func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProto
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPrefixPaths = true
+ issetPaths = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetMeasurementsList = true
+ issetStartTime = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetValuesList = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 5:
- if fieldTypeId == thrift.LIST {
- if err := p.ReadField5(ctx, iprot); err != nil {
- return err
- }
- issetTimestamps = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 6:
- if fieldTypeId == thrift.BOOL {
- if err := p.ReadField6(ctx, iprot); err != nil {
- return err
- }
+ issetEndTime = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -9031,22 +9155,19 @@ func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProto
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPrefixPaths{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set"));
- }
- if !issetMeasurementsList{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set"));
+ if !issetPaths{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
}
- if !issetValuesList{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set"));
+ if !issetStartTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set"));
}
- if !issetTimestamps{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set"));
+ if !issetEndTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set"));
}
return nil
}
-func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -9055,89 +9176,21 @@ func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift
return nil
}
-func (p *TSInsertStringRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- p.PrefixPaths = tSlice
+ p.Paths = tSlice
for i := 0; i < size; i ++ {
-var _elem97 string
+var _elem103 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem97 = v
-}
- p.PrefixPaths = append(p.PrefixPaths, _elem97)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([][]string, 0, size)
- p.MeasurementsList = tSlice
- for i := 0; i < size; i ++ {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- _elem98 := tSlice
- for i := 0; i < size; i ++ {
-var _elem99 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem99 = v
-}
- _elem98 = append(_elem98, _elem99)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- p.MeasurementsList = append(p.MeasurementsList, _elem98)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([][]string, 0, size)
- p.ValuesList = tSlice
- for i := 0; i < size; i ++ {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- _elem100 := tSlice
- for i := 0; i < size; i ++ {
-var _elem101 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem101 = v
+ _elem103 = v
}
- _elem100 = append(_elem100, _elem101)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- p.ValuesList = append(p.ValuesList, _elem100)
+ p.Paths = append(p.Paths, _elem103)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -9145,47 +9198,32 @@ var _elem101 string
return nil
}
-func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int64, 0, size)
- p.Timestamps = tSlice
- for i := 0; i < size; i ++ {
-var _elem102 int64
- if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSDeleteDataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
} else {
- _elem102 = v
+ p.StartTime = v
}
- p.Timestamps = append(p.Timestamps, _elem102)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 6: ", err)
+func (p *TSDeleteDataReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
} else {
- p.IsAligned = &v
+ p.EndTime = v
}
return nil
}
-func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsReq"); err != nil {
+func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSDeleteDataReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
if err := p.writeField4(ctx, oprot); err != nil { return err }
- if err := p.writeField5(ctx, oprot); err != nil { return err }
- if err := p.writeField6(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -9194,7 +9232,7 @@ func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProt
return nil
}
-func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -9204,13 +9242,13 @@ func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift
return err
}
-func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil {
+func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
- for _, v := range p.PrefixPaths {
+ for _, v := range p.Paths {
if err := oprot.WriteString(ctx, string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
}
@@ -9218,184 +9256,148 @@ func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) }
return err
}
-func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.MeasurementsList {
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range v {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSDeleteDataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.startTime (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startTime: ", p), err) }
return err
}
-func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.ValuesList {
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range v {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) }
- return err
-}
-
-func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Timestamps {
- if err := oprot.WriteI64(ctx, int64(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSDeleteDataReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.endTime (4) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) }
- return err
-}
-
-func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetIsAligned() {
- if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) }
- }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endTime: ", p), err) }
return err
}
-func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool {
+func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if len(p.PrefixPaths) != len(other.PrefixPaths) { return false }
- for i, _tgt := range p.PrefixPaths {
- _src103 := other.PrefixPaths[i]
- if _tgt != _src103 { return false }
- }
- if len(p.MeasurementsList) != len(other.MeasurementsList) { return false }
- for i, _tgt := range p.MeasurementsList {
- _src104 := other.MeasurementsList[i]
- if len(_tgt) != len(_src104) { return false }
- for i, _tgt := range _tgt {
- _src105 := _src104[i]
- if _tgt != _src105 { return false }
- }
- }
- if len(p.ValuesList) != len(other.ValuesList) { return false }
- for i, _tgt := range p.ValuesList {
- _src106 := other.ValuesList[i]
- if len(_tgt) != len(_src106) { return false }
- for i, _tgt := range _tgt {
- _src107 := _src106[i]
- if _tgt != _src107 { return false }
- }
- }
- if len(p.Timestamps) != len(other.Timestamps) { return false }
- for i, _tgt := range p.Timestamps {
- _src108 := other.Timestamps[i]
- if _tgt != _src108 { return false }
- }
- if p.IsAligned != other.IsAligned {
- if p.IsAligned == nil || other.IsAligned == nil {
- return false
- }
- if (*p.IsAligned) != (*other.IsAligned) { return false }
+ if len(p.Paths) != len(other.Paths) { return false }
+ for i, _tgt := range p.Paths {
+ _src104 := other.Paths[i]
+ if _tgt != _src104 { return false }
}
+ if p.StartTime != other.StartTime { return false }
+ if p.EndTime != other.EndTime { return false }
return true
}
-func (p *TSInsertStringRecordsReq) String() string {
+func (p *TSDeleteDataReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p)
+ return fmt.Sprintf("TSDeleteDataReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - Paths
-// - StartTime
-// - EndTime
-type TSDeleteDataReq struct {
+// - Path
+// - DataType
+// - Encoding
+// - Compressor
+// - Props
+// - Tags
+// - Attributes
+// - MeasurementAlias
+type TSCreateTimeseriesReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"`
- StartTime int64 `thrift:"startTime,3,required" db:"startTime" json:"startTime"`
- EndTime int64 `thrift:"endTime,4,required" db:"endTime" json:"endTime"`
+ Path string `thrift:"path,2,required" db:"path" json:"path"`
+ DataType int32 `thrift:"dataType,3,required" db:"dataType" json:"dataType"`
+ Encoding int32 `thrift:"encoding,4,required" db:"encoding" json:"encoding"`
+ Compressor int32 `thrift:"compressor,5,required" db:"compressor" json:"compressor"`
+ Props map[string]string `thrift:"props,6" db:"props" json:"props,omitempty"`
+ Tags map[string]string `thrift:"tags,7" db:"tags" json:"tags,omitempty"`
+ Attributes map[string]string `thrift:"attributes,8" db:"attributes" json:"attributes,omitempty"`
+ MeasurementAlias *string `thrift:"measurementAlias,9" db:"measurementAlias" json:"measurementAlias,omitempty"`
}
-func NewTSDeleteDataReq() *TSDeleteDataReq {
- return &TSDeleteDataReq{}
+func NewTSCreateTimeseriesReq() *TSCreateTimeseriesReq {
+ return &TSCreateTimeseriesReq{}
}
-func (p *TSDeleteDataReq) GetSessionId() int64 {
+func (p *TSCreateTimeseriesReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSDeleteDataReq) GetPaths() []string {
- return p.Paths
+func (p *TSCreateTimeseriesReq) GetPath() string {
+ return p.Path
}
-func (p *TSDeleteDataReq) GetStartTime() int64 {
- return p.StartTime
+func (p *TSCreateTimeseriesReq) GetDataType() int32 {
+ return p.DataType
}
-func (p *TSDeleteDataReq) GetEndTime() int64 {
- return p.EndTime
+func (p *TSCreateTimeseriesReq) GetEncoding() int32 {
+ return p.Encoding
}
-func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+
+func (p *TSCreateTimeseriesReq) GetCompressor() int32 {
+ return p.Compressor
+}
+var TSCreateTimeseriesReq_Props_DEFAULT map[string]string
+
+func (p *TSCreateTimeseriesReq) GetProps() map[string]string {
+ return p.Props
+}
+var TSCreateTimeseriesReq_Tags_DEFAULT map[string]string
+
+func (p *TSCreateTimeseriesReq) GetTags() map[string]string {
+ return p.Tags
+}
+var TSCreateTimeseriesReq_Attributes_DEFAULT map[string]string
+
+func (p *TSCreateTimeseriesReq) GetAttributes() map[string]string {
+ return p.Attributes
+}
+var TSCreateTimeseriesReq_MeasurementAlias_DEFAULT string
+func (p *TSCreateTimeseriesReq) GetMeasurementAlias() string {
+ if !p.IsSetMeasurementAlias() {
+ return TSCreateTimeseriesReq_MeasurementAlias_DEFAULT
+ }
+return *p.MeasurementAlias
+}
+func (p *TSCreateTimeseriesReq) IsSetProps() bool {
+ return p.Props != nil
+}
+
+func (p *TSCreateTimeseriesReq) IsSetTags() bool {
+ return p.Tags != nil
+}
+
+func (p *TSCreateTimeseriesReq) IsSetAttributes() bool {
+ return p.Attributes != nil
+}
+
+func (p *TSCreateTimeseriesReq) IsSetMeasurementAlias() bool {
+ return p.MeasurementAlias != nil
+}
+
+func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPaths bool = false;
- var issetStartTime bool = false;
- var issetEndTime bool = false;
+ var issetPath bool = false;
+ var issetDataType bool = false;
+ var issetEncoding bool = false;
+ var issetCompressor bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -9416,33 +9418,84 @@ func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) erro
}
}
case 2:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPaths = true
+ issetPath = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetStartTime = true
+ issetDataType = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetEndTime = true
+ issetEncoding = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 5:
+ if fieldTypeId == thrift.I32 {
+ if err := p.ReadField5(ctx, iprot); err != nil {
+ return err
+ }
+ issetCompressor = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 6:
+ if fieldTypeId == thrift.MAP {
+ if err := p.ReadField6(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 7:
+ if fieldTypeId == thrift.MAP {
+ if err := p.ReadField7(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 8:
+ if fieldTypeId == thrift.MAP {
+ if err := p.ReadField8(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 9:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField9(ctx, iprot); err != nil {
+ return err
+ }
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -9463,19 +9516,22 @@ func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) erro
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPaths{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
+ if !issetPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set"));
}
- if !issetStartTime{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set"));
+ if !issetDataType{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set"));
}
- if !issetEndTime{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set"));
+ if !issetEncoding{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encoding is not set"));
+ }
+ if !issetCompressor{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressor is not set"));
}
return nil
}
-func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -9484,54 +9540,148 @@ func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtoco
return nil
}
-func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.Paths = tSlice
- for i := 0; i < size; i ++ {
-var _elem109 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem109 = v
-}
- p.Paths = append(p.Paths, _elem109)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
+func (p *TSCreateTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Path = v
+}
return nil
}
-func (p *TSDeleteDataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSCreateTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
- p.StartTime = v
+ p.DataType = v
}
return nil
}
-func (p *TSDeleteDataReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSCreateTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 4: ", err)
} else {
- p.EndTime = v
+ p.Encoding = v
}
return nil
}
-func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSDeleteDataReq"); err != nil {
+func (p *TSCreateTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 5: ", err)
+} else {
+ p.Compressor = v
+}
+ return nil
+}
+
+func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ _, _, size, err := iprot.ReadMapBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading map begin: ", err)
+ }
+ tMap := make(map[string]string, size)
+ p.Props = tMap
+ for i := 0; i < size; i ++ {
+var _key105 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _key105 = v
+}
+var _val106 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _val106 = v
+}
+ p.Props[_key105] = _val106
+ }
+ if err := iprot.ReadMapEnd(ctx); err != nil {
+ return thrift.PrependError("error reading map end: ", err)
+ }
+ return nil
+}
+
+func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ _, _, size, err := iprot.ReadMapBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading map begin: ", err)
+ }
+ tMap := make(map[string]string, size)
+ p.Tags = tMap
+ for i := 0; i < size; i ++ {
+var _key107 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _key107 = v
+}
+var _val108 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _val108 = v
+}
+ p.Tags[_key107] = _val108
+ }
+ if err := iprot.ReadMapEnd(ctx); err != nil {
+ return thrift.PrependError("error reading map end: ", err)
+ }
+ return nil
+}
+
+func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+ _, _, size, err := iprot.ReadMapBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading map begin: ", err)
+ }
+ tMap := make(map[string]string, size)
+ p.Attributes = tMap
+ for i := 0; i < size; i ++ {
+var _key109 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _key109 = v
+}
+var _val110 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _val110 = v
+}
+ p.Attributes[_key109] = _val110
+ }
+ if err := iprot.ReadMapEnd(ctx); err != nil {
+ return thrift.PrependError("error reading map end: ", err)
+ }
+ return nil
+}
+
+func (p *TSCreateTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 9: ", err)
+} else {
+ p.MeasurementAlias = &v
+}
+ return nil
+}
+
+func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSCreateTimeseriesReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
if err := p.writeField4(ctx, oprot); err != nil { return err }
+ if err := p.writeField5(ctx, oprot); err != nil { return err }
+ if err := p.writeField6(ctx, oprot); err != nil { return err }
+ if err := p.writeField7(ctx, oprot); err != nil { return err }
+ if err := p.writeField8(ctx, oprot); err != nil { return err }
+ if err := p.writeField9(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -9540,7 +9690,7 @@ func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) err
return nil
}
-func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -9550,162 +9700,254 @@ func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtoco
return err
}
-func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Paths {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSCreateTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Path)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.path (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) }
return err
}
-func (p *TSDeleteDataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startTime: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.startTime (3) field write error: ", p), err) }
+func (p *TSCreateTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataType: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.dataType (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startTime: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataType: ", p), err) }
return err
}
-func (p *TSDeleteDataReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endTime: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.endTime (4) field write error: ", p), err) }
+func (p *TSCreateTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "encoding", thrift.I32, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encoding: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.Encoding)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.encoding (4) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endTime: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encoding: ", p), err) }
return err
}
-func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool {
- if p == other {
- return true
- } else if p == nil || other == nil {
- return false
- }
- if p.SessionId != other.SessionId { return false }
- if len(p.Paths) != len(other.Paths) { return false }
- for i, _tgt := range p.Paths {
- _src110 := other.Paths[i]
- if _tgt != _src110 { return false }
- }
- if p.StartTime != other.StartTime { return false }
- if p.EndTime != other.EndTime { return false }
- return true
+func (p *TSCreateTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "compressor", thrift.I32, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressor: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.Compressor)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.compressor (5) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressor: ", p), err) }
+ return err
}
-func (p *TSDeleteDataReq) String() string {
- if p == nil {
- return "<nil>"
+func (p *TSCreateTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetProps() {
+ if err := oprot.WriteFieldBegin(ctx, "props", thrift.MAP, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:props: ", p), err) }
+ if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Props)); err != nil {
+ return thrift.PrependError("error writing map begin: ", err)
+ }
+ for k, v := range p.Props {
+ if err := oprot.WriteString(ctx, string(k)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteMapEnd(ctx); err != nil {
+ return thrift.PrependError("error writing map end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:props: ", p), err) }
}
- return fmt.Sprintf("TSDeleteDataReq(%+v)", *p)
-}
-
-// Attributes:
-// - SessionId
-// - Path
-// - DataType
-// - Encoding
-// - Compressor
-// - Props
-// - Tags
-// - Attributes
-// - MeasurementAlias
-type TSCreateTimeseriesReq struct {
- SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- Path string `thrift:"path,2,required" db:"path" json:"path"`
- DataType int32 `thrift:"dataType,3,required" db:"dataType" json:"dataType"`
- Encoding int32 `thrift:"encoding,4,required" db:"encoding" json:"encoding"`
- Compressor int32 `thrift:"compressor,5,required" db:"compressor" json:"compressor"`
- Props map[string]string `thrift:"props,6" db:"props" json:"props,omitempty"`
- Tags map[string]string `thrift:"tags,7" db:"tags" json:"tags,omitempty"`
- Attributes map[string]string `thrift:"attributes,8" db:"attributes" json:"attributes,omitempty"`
- MeasurementAlias *string `thrift:"measurementAlias,9" db:"measurementAlias" json:"measurementAlias,omitempty"`
+ return err
}
-func NewTSCreateTimeseriesReq() *TSCreateTimeseriesReq {
- return &TSCreateTimeseriesReq{}
+func (p *TSCreateTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetTags() {
+ if err := oprot.WriteFieldBegin(ctx, "tags", thrift.MAP, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tags: ", p), err) }
+ if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Tags)); err != nil {
+ return thrift.PrependError("error writing map begin: ", err)
+ }
+ for k, v := range p.Tags {
+ if err := oprot.WriteString(ctx, string(k)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteMapEnd(ctx); err != nil {
+ return thrift.PrependError("error writing map end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tags: ", p), err) }
+ }
+ return err
}
+func (p *TSCreateTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetAttributes() {
+ if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributes: ", p), err) }
+ if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil {
+ return thrift.PrependError("error writing map begin: ", err)
+ }
+ for k, v := range p.Attributes {
+ if err := oprot.WriteString(ctx, string(k)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteMapEnd(ctx); err != nil {
+ return thrift.PrependError("error writing map end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributes: ", p), err) }
+ }
+ return err
+}
-func (p *TSCreateTimeseriesReq) GetSessionId() int64 {
- return p.SessionId
-}
-
-func (p *TSCreateTimeseriesReq) GetPath() string {
- return p.Path
+func (p *TSCreateTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetMeasurementAlias() {
+ if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.STRING, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAlias: ", p), err) }
+ if err := oprot.WriteString(ctx, string(*p.MeasurementAlias)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.measurementAlias (9) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAlias: ", p), err) }
+ }
+ return err
}
-func (p *TSCreateTimeseriesReq) GetDataType() int32 {
- return p.DataType
+func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool {
+ if p == other {
+ return true
+ } else if p == nil || other == nil {
+ return false
+ }
+ if p.SessionId != other.SessionId { return false }
+ if p.Path != other.Path { return false }
+ if p.DataType != other.DataType { return false }
+ if p.Encoding != other.Encoding { return false }
+ if p.Compressor != other.Compressor { return false }
+ if len(p.Props) != len(other.Props) { return false }
+ for k, _tgt := range p.Props {
+ _src111 := other.Props[k]
+ if _tgt != _src111 { return false }
+ }
+ if len(p.Tags) != len(other.Tags) { return false }
+ for k, _tgt := range p.Tags {
+ _src112 := other.Tags[k]
+ if _tgt != _src112 { return false }
+ }
+ if len(p.Attributes) != len(other.Attributes) { return false }
+ for k, _tgt := range p.Attributes {
+ _src113 := other.Attributes[k]
+ if _tgt != _src113 { return false }
+ }
+ if p.MeasurementAlias != other.MeasurementAlias {
+ if p.MeasurementAlias == nil || other.MeasurementAlias == nil {
+ return false
+ }
+ if (*p.MeasurementAlias) != (*other.MeasurementAlias) { return false }
+ }
+ return true
}
-func (p *TSCreateTimeseriesReq) GetEncoding() int32 {
- return p.Encoding
+func (p *TSCreateTimeseriesReq) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("TSCreateTimeseriesReq(%+v)", *p)
}
-func (p *TSCreateTimeseriesReq) GetCompressor() int32 {
- return p.Compressor
+// Attributes:
+// - SessionId
+// - PrefixPath
+// - Measurements
+// - DataTypes
+// - Encodings
+// - Compressors
+// - MeasurementAlias
+// - TagsList
+// - AttributesList
+type TSCreateAlignedTimeseriesReq struct {
+ SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
+ PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
+ Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"`
+ DataTypes []int32 `thrift:"dataTypes,4,required" db:"dataTypes" json:"dataTypes"`
+ Encodings []int32 `thrift:"encodings,5,required" db:"encodings" json:"encodings"`
+ Compressors []int32 `thrift:"compressors,6,required" db:"compressors" json:"compressors"`
+ MeasurementAlias []string `thrift:"measurementAlias,7" db:"measurementAlias" json:"measurementAlias,omitempty"`
+ TagsList []map[string]string `thrift:"tagsList,8" db:"tagsList" json:"tagsList,omitempty"`
+ AttributesList []map[string]string `thrift:"attributesList,9" db:"attributesList" json:"attributesList,omitempty"`
}
-var TSCreateTimeseriesReq_Props_DEFAULT map[string]string
-func (p *TSCreateTimeseriesReq) GetProps() map[string]string {
- return p.Props
+func NewTSCreateAlignedTimeseriesReq() *TSCreateAlignedTimeseriesReq {
+ return &TSCreateAlignedTimeseriesReq{}
}
-var TSCreateTimeseriesReq_Tags_DEFAULT map[string]string
-func (p *TSCreateTimeseriesReq) GetTags() map[string]string {
- return p.Tags
+
+func (p *TSCreateAlignedTimeseriesReq) GetSessionId() int64 {
+ return p.SessionId
}
-var TSCreateTimeseriesReq_Attributes_DEFAULT map[string]string
-func (p *TSCreateTimeseriesReq) GetAttributes() map[string]string {
- return p.Attributes
+func (p *TSCreateAlignedTimeseriesReq) GetPrefixPath() string {
+ return p.PrefixPath
}
-var TSCreateTimeseriesReq_MeasurementAlias_DEFAULT string
-func (p *TSCreateTimeseriesReq) GetMeasurementAlias() string {
- if !p.IsSetMeasurementAlias() {
- return TSCreateTimeseriesReq_MeasurementAlias_DEFAULT
- }
-return *p.MeasurementAlias
+
+func (p *TSCreateAlignedTimeseriesReq) GetMeasurements() []string {
+ return p.Measurements
}
-func (p *TSCreateTimeseriesReq) IsSetProps() bool {
- return p.Props != nil
+
+func (p *TSCreateAlignedTimeseriesReq) GetDataTypes() []int32 {
+ return p.DataTypes
}
-func (p *TSCreateTimeseriesReq) IsSetTags() bool {
- return p.Tags != nil
+func (p *TSCreateAlignedTimeseriesReq) GetEncodings() []int32 {
+ return p.Encodings
}
-func (p *TSCreateTimeseriesReq) IsSetAttributes() bool {
- return p.Attributes != nil
+func (p *TSCreateAlignedTimeseriesReq) GetCompressors() []int32 {
+ return p.Compressors
}
+var TSCreateAlignedTimeseriesReq_MeasurementAlias_DEFAULT []string
-func (p *TSCreateTimeseriesReq) IsSetMeasurementAlias() bool {
+func (p *TSCreateAlignedTimeseriesReq) GetMeasurementAlias() []string {
+ return p.MeasurementAlias
+}
+var TSCreateAlignedTimeseriesReq_TagsList_DEFAULT []map[string]string
+
+func (p *TSCreateAlignedTimeseriesReq) GetTagsList() []map[string]string {
+ return p.TagsList
+}
+var TSCreateAlignedTimeseriesReq_AttributesList_DEFAULT []map[string]string
+
+func (p *TSCreateAlignedTimeseriesReq) GetAttributesList() []map[string]string {
+ return p.AttributesList
+}
+func (p *TSCreateAlignedTimeseriesReq) IsSetMeasurementAlias() bool {
return p.MeasurementAlias != nil
}
-func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSCreateAlignedTimeseriesReq) IsSetTagsList() bool {
+ return p.TagsList != nil
+}
+
+func (p *TSCreateAlignedTimeseriesReq) IsSetAttributesList() bool {
+ return p.AttributesList != nil
+}
+
+func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPath bool = false;
- var issetDataType bool = false;
- var issetEncoding bool = false;
- var issetCompressor bool = false;
+ var issetPrefixPath bool = false;
+ var issetMeasurements bool = false;
+ var issetDataTypes bool = false;
+ var issetEncodings bool = false;
+ var issetCompressors bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -9730,57 +9972,58 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPath = true
+ issetPrefixPath = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetDataType = true
+ issetMeasurements = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetEncoding = true
+ issetDataTypes = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 5:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField5(ctx, iprot); err != nil {
return err
}
- issetCompressor = true
+ issetEncodings = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 6:
- if fieldTypeId == thrift.MAP {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField6(ctx, iprot); err != nil {
return err
}
+ issetCompressors = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 7:
- if fieldTypeId == thrift.MAP {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField7(ctx, iprot); err != nil {
return err
}
@@ -9790,7 +10033,7 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol
}
}
case 8:
- if fieldTypeId == thrift.MAP {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField8(ctx, iprot); err != nil {
return err
}
@@ -9800,7 +10043,7 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol
}
}
case 9:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField9(ctx, iprot); err != nil {
return err
}
@@ -9824,22 +10067,25 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set"));
+ if !issetPrefixPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
}
- if !issetDataType{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set"));
+ if !issetMeasurements{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set"));
}
- if !issetEncoding{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encoding is not set"));
+ if !issetDataTypes{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set"));
}
- if !issetCompressor{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressor is not set"));
+ if !issetEncodings{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set"));
+ }
+ if !issetCompressors{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set"));
}
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -9848,137 +10094,207 @@ func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TP
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSCreateAlignedTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
- p.Path = v
+ p.PrefixPath = v
}
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
+func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.Measurements = tSlice
+ for i := 0; i < size; i ++ {
+var _elem114 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.DataType = v
+ _elem114 = v
}
+ p.Measurements = append(p.Measurements, _elem114)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
+func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]int32, 0, size)
+ p.DataTypes = tSlice
+ for i := 0; i < size; i ++ {
+var _elem115 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.Encoding = v
+ _elem115 = v
}
+ p.DataTypes = append(p.DataTypes, _elem115)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 5: ", err)
-} else {
- p.Compressor = v
-}
- return nil
-}
-
-func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- _, _, size, err := iprot.ReadMapBegin(ctx)
+func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
if err != nil {
- return thrift.PrependError("error reading map begin: ", err)
+ return thrift.PrependError("error reading list begin: ", err)
}
- tMap := make(map[string]string, size)
- p.Props = tMap
+ tSlice := make([]int32, 0, size)
+ p.Encodings = tSlice
for i := 0; i < size; i ++ {
-var _key111 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _key111 = v
-}
-var _val112 string
- if v, err := iprot.ReadString(ctx); err != nil {
+var _elem116 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _val112 = v
+ _elem116 = v
}
- p.Props[_key111] = _val112
+ p.Encodings = append(p.Encodings, _elem116)
}
- if err := iprot.ReadMapEnd(ctx); err != nil {
- return thrift.PrependError("error reading map end: ", err)
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
}
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
- _, _, size, err := iprot.ReadMapBegin(ctx)
+func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
if err != nil {
- return thrift.PrependError("error reading map begin: ", err)
+ return thrift.PrependError("error reading list begin: ", err)
}
- tMap := make(map[string]string, size)
- p.Tags = tMap
+ tSlice := make([]int32, 0, size)
+ p.Compressors = tSlice
for i := 0; i < size; i ++ {
-var _key113 string
- if v, err := iprot.ReadString(ctx); err != nil {
+var _elem117 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _key113 = v
+ _elem117 = v
+}
+ p.Compressors = append(p.Compressors, _elem117)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
}
-var _val114 string
+
+func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.MeasurementAlias = tSlice
+ for i := 0; i < size; i ++ {
+var _elem118 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _val114 = v
+ _elem118 = v
}
- p.Tags[_key113] = _val114
+ p.MeasurementAlias = append(p.MeasurementAlias, _elem118)
}
- if err := iprot.ReadMapEnd(ctx); err != nil {
- return thrift.PrependError("error reading map end: ", err)
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
}
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
- _, _, size, err := iprot.ReadMapBegin(ctx)
+func (p *TSCreateAlignedTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
if err != nil {
- return thrift.PrependError("error reading map begin: ", err)
+ return thrift.PrependError("error reading list begin: ", err)
}
- tMap := make(map[string]string, size)
- p.Attributes = tMap
+ tSlice := make([]map[string]string, 0, size)
+ p.TagsList = tSlice
for i := 0; i < size; i ++ {
-var _key115 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+ _, _, size, err := iprot.ReadMapBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading map begin: ", err)
+ }
+ tMap := make(map[string]string, size)
+ _elem119 := tMap
+ for i := 0; i < size; i ++ {
+var _key120 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- _key115 = v
+ _key120 = v
}
-var _val116 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+var _val121 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- _val116 = v
+ _val121 = v
}
- p.Attributes[_key115] = _val116
+ _elem119[_key120] = _val121
+ }
+ if err := iprot.ReadMapEnd(ctx); err != nil {
+ return thrift.PrependError("error reading map end: ", err)
+ }
+ p.TagsList = append(p.TagsList, _elem119)
}
- if err := iprot.ReadMapEnd(ctx); err != nil {
- return thrift.PrependError("error reading map end: ", err)
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
}
return nil
}
-func (p *TSCreateTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 9: ", err)
+func (p *TSCreateAlignedTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]map[string]string, 0, size)
+ p.AttributesList = tSlice
+ for i := 0; i < size; i ++ {
+ _, _, size, err := iprot.ReadMapBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading map begin: ", err)
+ }
+ tMap := make(map[string]string, size)
+ _elem122 := tMap
+ for i := 0; i < size; i ++ {
+var _key123 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.MeasurementAlias = &v
+ _key123 = v
}
+var _val124 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _val124 = v
+}
+ _elem122[_key123] = _val124
+ }
+ if err := iprot.ReadMapEnd(ctx); err != nil {
+ return thrift.PrependError("error reading map end: ", err)
+ }
+ p.AttributesList = append(p.AttributesList, _elem122)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSCreateTimeseriesReq"); err != nil {
+func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSCreateAlignedTimeseriesReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -9998,7 +10314,7 @@ func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtoco
return nil
}
-func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -10008,254 +10324,342 @@ func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TP
return err
}
-func (p *TSCreateTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.Path)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.path (2) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
return err
}
-func (p *TSCreateTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataType: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.dataType (3) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Measurements {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataType: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) }
return err
}
-func (p *TSCreateTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "encoding", thrift.I32, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encoding: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(p.Encoding)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.encoding (4) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataTypes: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.DataTypes {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encoding: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataTypes: ", p), err) }
return err
}
-func (p *TSCreateTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "compressor", thrift.I32, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressor: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(p.Compressor)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.compressor (5) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:encodings: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Encodings {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressor: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:encodings: ", p), err) }
return err
}
-func (p *TSCreateTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetProps() {
- if err := oprot.WriteFieldBegin(ctx, "props", thrift.MAP, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:props: ", p), err) }
- if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Props)); err != nil {
- return thrift.PrependError("error writing map begin: ", err)
- }
- for k, v := range p.Props {
- if err := oprot.WriteString(ctx, string(k)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteMapEnd(ctx); err != nil {
- return thrift.PrependError("error writing map end: ", err)
- }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:props: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressors: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Compressors {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
}
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressors: ", p), err) }
return err
}
-func (p *TSCreateTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetTags() {
- if err := oprot.WriteFieldBegin(ctx, "tags", thrift.MAP, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tags: ", p), err) }
- if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Tags)); err != nil {
- return thrift.PrependError("error writing map begin: ", err)
+func (p *TSCreateAlignedTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetMeasurementAlias() {
+ if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.LIST, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:measurementAlias: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAlias)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
}
- for k, v := range p.Tags {
- if err := oprot.WriteString(ctx, string(k)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ for _, v := range p.MeasurementAlias {
if err := oprot.WriteString(ctx, string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
}
- if err := oprot.WriteMapEnd(ctx); err != nil {
- return thrift.PrependError("error writing map end: ", err)
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tags: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:measurementAlias: ", p), err) }
}
return err
}
-func (p *TSCreateTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetAttributes() {
- if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributes: ", p), err) }
- if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil {
- return thrift.PrependError("error writing map begin: ", err)
- }
- for k, v := range p.Attributes {
- if err := oprot.WriteString(ctx, string(k)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetTagsList() {
+ if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:tagsList: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
}
- if err := oprot.WriteMapEnd(ctx); err != nil {
- return thrift.PrependError("error writing map end: ", err)
+ for _, v := range p.TagsList {
+ if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil {
+ return thrift.PrependError("error writing map begin: ", err)
+ }
+ for k, v := range v {
+ if err := oprot.WriteString(ctx, string(k)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteMapEnd(ctx); err != nil {
+ return thrift.PrependError("error writing map end: ", err)
+ }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributes: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:tagsList: ", p), err) }
}
return err
}
-func (p *TSCreateTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetMeasurementAlias() {
- if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.STRING, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAlias: ", p), err) }
- if err := oprot.WriteString(ctx, string(*p.MeasurementAlias)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.measurementAlias (9) field write error: ", p), err) }
+func (p *TSCreateAlignedTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetAttributesList() {
+ if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributesList: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.AttributesList {
+ if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil {
+ return thrift.PrependError("error writing map begin: ", err)
+ }
+ for k, v := range v {
+ if err := oprot.WriteString(ctx, string(k)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteMapEnd(ctx); err != nil {
+ return thrift.PrependError("error writing map end: ", err)
+ }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAlias: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributesList: ", p), err) }
}
return err
}
-func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool {
+func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if p.Path != other.Path { return false }
- if p.DataType != other.DataType { return false }
- if p.Encoding != other.Encoding { return false }
- if p.Compressor != other.Compressor { return false }
- if len(p.Props) != len(other.Props) { return false }
- for k, _tgt := range p.Props {
- _src117 := other.Props[k]
- if _tgt != _src117 { return false }
+ if p.PrefixPath != other.PrefixPath { return false }
+ if len(p.Measurements) != len(other.Measurements) { return false }
+ for i, _tgt := range p.Measurements {
+ _src125 := other.Measurements[i]
+ if _tgt != _src125 { return false }
}
- if len(p.Tags) != len(other.Tags) { return false }
- for k, _tgt := range p.Tags {
- _src118 := other.Tags[k]
- if _tgt != _src118 { return false }
+ if len(p.DataTypes) != len(other.DataTypes) { return false }
+ for i, _tgt := range p.DataTypes {
+ _src126 := other.DataTypes[i]
+ if _tgt != _src126 { return false }
}
- if len(p.Attributes) != len(other.Attributes) { return false }
- for k, _tgt := range p.Attributes {
- _src119 := other.Attributes[k]
- if _tgt != _src119 { return false }
+ if len(p.Encodings) != len(other.Encodings) { return false }
+ for i, _tgt := range p.Encodings {
+ _src127 := other.Encodings[i]
+ if _tgt != _src127 { return false }
}
- if p.MeasurementAlias != other.MeasurementAlias {
- if p.MeasurementAlias == nil || other.MeasurementAlias == nil {
- return false
+ if len(p.Compressors) != len(other.Compressors) { return false }
+ for i, _tgt := range p.Compressors {
+ _src128 := other.Compressors[i]
+ if _tgt != _src128 { return false }
+ }
+ if len(p.MeasurementAlias) != len(other.MeasurementAlias) { return false }
+ for i, _tgt := range p.MeasurementAlias {
+ _src129 := other.MeasurementAlias[i]
+ if _tgt != _src129 { return false }
+ }
+ if len(p.TagsList) != len(other.TagsList) { return false }
+ for i, _tgt := range p.TagsList {
+ _src130 := other.TagsList[i]
+ if len(_tgt) != len(_src130) { return false }
+ for k, _tgt := range _tgt {
+ _src131 := _src130[k]
+ if _tgt != _src131 { return false }
+ }
+ }
+ if len(p.AttributesList) != len(other.AttributesList) { return false }
+ for i, _tgt := range p.AttributesList {
+ _src132 := other.AttributesList[i]
+ if len(_tgt) != len(_src132) { return false }
+ for k, _tgt := range _tgt {
+ _src133 := _src132[k]
+ if _tgt != _src133 { return false }
}
- if (*p.MeasurementAlias) != (*other.MeasurementAlias) { return false }
}
return true
}
-func (p *TSCreateTimeseriesReq) String() string {
+func (p *TSCreateAlignedTimeseriesReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSCreateTimeseriesReq(%+v)", *p)
+ return fmt.Sprintf("TSCreateAlignedTimeseriesReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - PrefixPath
-// - Measurements
-// - DataTypes
-// - Encodings
-// - Compressors
-// - MeasurementAlias
-// - TagsList
-// - AttributesList
-type TSCreateAlignedTimeseriesReq struct {
+// - Paths
+// - FetchSize
+// - StartTime
+// - EndTime
+// - StatementId
+// - EnableRedirectQuery
+// - JdbcQuery
+// - Timeout
+// - LegalPathNodes
+type TSRawDataQueryReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
- Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"`
- DataTypes []int32 `thrift:"dataTypes,4,required" db:"dataTypes" json:"dataTypes"`
- Encodings []int32 `thrift:"encodings,5,required" db:"encodings" json:"encodings"`
- Compressors []int32 `thrift:"compressors,6,required" db:"compressors" json:"compressors"`
- MeasurementAlias []string `thrift:"measurementAlias,7" db:"measurementAlias" json:"measurementAlias,omitempty"`
- TagsList []map[string]string `thrift:"tagsList,8" db:"tagsList" json:"tagsList,omitempty"`
- AttributesList []map[string]string `thrift:"attributesList,9" db:"attributesList" json:"attributesList,omitempty"`
+ Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"`
+ FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"`
+ StartTime int64 `thrift:"startTime,4,required" db:"startTime" json:"startTime"`
+ EndTime int64 `thrift:"endTime,5,required" db:"endTime" json:"endTime"`
+ StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"`
+ EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"`
+ JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"`
+ Timeout *int64 `thrift:"timeout,9" db:"timeout" json:"timeout,omitempty"`
+ LegalPathNodes *bool `thrift:"legalPathNodes,10" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
}
-func NewTSCreateAlignedTimeseriesReq() *TSCreateAlignedTimeseriesReq {
- return &TSCreateAlignedTimeseriesReq{}
+func NewTSRawDataQueryReq() *TSRawDataQueryReq {
+ return &TSRawDataQueryReq{}
}
-func (p *TSCreateAlignedTimeseriesReq) GetSessionId() int64 {
+func (p *TSRawDataQueryReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSCreateAlignedTimeseriesReq) GetPrefixPath() string {
- return p.PrefixPath
+func (p *TSRawDataQueryReq) GetPaths() []string {
+ return p.Paths
}
-
-func (p *TSCreateAlignedTimeseriesReq) GetMeasurements() []string {
- return p.Measurements
+var TSRawDataQueryReq_FetchSize_DEFAULT int32
+func (p *TSRawDataQueryReq) GetFetchSize() int32 {
+ if !p.IsSetFetchSize() {
+ return TSRawDataQueryReq_FetchSize_DEFAULT
+ }
+return *p.FetchSize
}
-func (p *TSCreateAlignedTimeseriesReq) GetDataTypes() []int32 {
- return p.DataTypes
+func (p *TSRawDataQueryReq) GetStartTime() int64 {
+ return p.StartTime
}
-func (p *TSCreateAlignedTimeseriesReq) GetEncodings() []int32 {
- return p.Encodings
+func (p *TSRawDataQueryReq) GetEndTime() int64 {
+ return p.EndTime
}
-func (p *TSCreateAlignedTimeseriesReq) GetCompressors() []int32 {
- return p.Compressors
+func (p *TSRawDataQueryReq) GetStatementId() int64 {
+ return p.StatementId
}
-var TSCreateAlignedTimeseriesReq_MeasurementAlias_DEFAULT []string
-
-func (p *TSCreateAlignedTimeseriesReq) GetMeasurementAlias() []string {
- return p.MeasurementAlias
+var TSRawDataQueryReq_EnableRedirectQuery_DEFAULT bool
+func (p *TSRawDataQueryReq) GetEnableRedirectQuery() bool {
+ if !p.IsSetEnableRedirectQuery() {
+ return TSRawDataQueryReq_EnableRedirectQuery_DEFAULT
+ }
+return *p.EnableRedirectQuery
}
-var TSCreateAlignedTimeseriesReq_TagsList_DEFAULT []map[string]string
-
-func (p *TSCreateAlignedTimeseriesReq) GetTagsList() []map[string]string {
- return p.TagsList
+var TSRawDataQueryReq_JdbcQuery_DEFAULT bool
+func (p *TSRawDataQueryReq) GetJdbcQuery() bool {
+ if !p.IsSetJdbcQuery() {
+ return TSRawDataQueryReq_JdbcQuery_DEFAULT
+ }
+return *p.JdbcQuery
+}
+var TSRawDataQueryReq_Timeout_DEFAULT int64
+func (p *TSRawDataQueryReq) GetTimeout() int64 {
+ if !p.IsSetTimeout() {
+ return TSRawDataQueryReq_Timeout_DEFAULT
+ }
+return *p.Timeout
+}
+var TSRawDataQueryReq_LegalPathNodes_DEFAULT bool
+func (p *TSRawDataQueryReq) GetLegalPathNodes() bool {
+ if !p.IsSetLegalPathNodes() {
+ return TSRawDataQueryReq_LegalPathNodes_DEFAULT
+ }
+return *p.LegalPathNodes
+}
+func (p *TSRawDataQueryReq) IsSetFetchSize() bool {
+ return p.FetchSize != nil
}
-var TSCreateAlignedTimeseriesReq_AttributesList_DEFAULT []map[string]string
-func (p *TSCreateAlignedTimeseriesReq) GetAttributesList() []map[string]string {
- return p.AttributesList
+func (p *TSRawDataQueryReq) IsSetEnableRedirectQuery() bool {
+ return p.EnableRedirectQuery != nil
}
-func (p *TSCreateAlignedTimeseriesReq) IsSetMeasurementAlias() bool {
- return p.MeasurementAlias != nil
+
+func (p *TSRawDataQueryReq) IsSetJdbcQuery() bool {
+ return p.JdbcQuery != nil
}
-func (p *TSCreateAlignedTimeseriesReq) IsSetTagsList() bool {
- return p.TagsList != nil
+func (p *TSRawDataQueryReq) IsSetTimeout() bool {
+ return p.Timeout != nil
}
-func (p *TSCreateAlignedTimeseriesReq) IsSetAttributesList() bool {
- return p.AttributesList != nil
+func (p *TSRawDataQueryReq) IsSetLegalPathNodes() bool {
+ return p.LegalPathNodes != nil
}
-func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPrefixPath bool = false;
- var issetMeasurements bool = false;
- var issetDataTypes bool = false;
- var issetEncodings bool = false;
- var issetCompressors bool = false;
+ var issetPaths bool = false;
+ var issetStartTime bool = false;
+ var issetEndTime bool = false;
+ var issetStatementId bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -10276,62 +10680,61 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP
}
}
case 2:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPrefixPath = true
+ issetPaths = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetMeasurements = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetDataTypes = true
+ issetStartTime = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 5:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField5(ctx, iprot); err != nil {
return err
}
- issetEncodings = true
+ issetEndTime = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 6:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField6(ctx, iprot); err != nil {
return err
}
- issetCompressors = true
+ issetStatementId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 7:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.BOOL {
if err := p.ReadField7(ctx, iprot); err != nil {
return err
}
@@ -10341,7 +10744,7 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP
}
}
case 8:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.BOOL {
if err := p.ReadField8(ctx, iprot); err != nil {
return err
}
@@ -10351,7 +10754,7 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP
}
}
case 9:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField9(ctx, iprot); err != nil {
return err
}
@@ -10360,6 +10763,16 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP
return err
}
}
+ case 10:
+ if fieldTypeId == thrift.BOOL {
+ if err := p.ReadField10(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
default:
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -10375,25 +10788,22 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPrefixPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
- }
- if !issetMeasurements{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set"));
+ if !issetPaths{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
}
- if !issetDataTypes{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set"));
+ if !issetStartTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set"));
}
- if !issetEncodings{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set"));
+ if !issetEndTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set"));
}
- if !issetCompressors{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set"));
+ if !issetStatementId{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set"));
}
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -10402,30 +10812,21 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot th
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
-} else {
- p.PrefixPath = v
-}
- return nil
-}
-
-func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]string, 0, size)
- p.Measurements = tSlice
+ p.Paths = tSlice
for i := 0; i < size; i ++ {
-var _elem120 string
+var _elem134 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem120 = v
+ _elem134 = v
}
- p.Measurements = append(p.Measurements, _elem120)
+ p.Paths = append(p.Paths, _elem134)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -10433,176 +10834,80 @@ var _elem120 string
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.DataTypes = tSlice
- for i := 0; i < size; i ++ {
-var _elem121 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
} else {
- _elem121 = v
+ p.FetchSize = &v
}
- p.DataTypes = append(p.DataTypes, _elem121)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.Encodings = tSlice
- for i := 0; i < size; i ++ {
-var _elem122 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
} else {
- _elem122 = v
+ p.StartTime = v
}
- p.Encodings = append(p.Encodings, _elem122)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.Compressors = tSlice
- for i := 0; i < size; i ++ {
-var _elem123 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 5: ", err)
} else {
- _elem123 = v
+ p.EndTime = v
}
- p.Compressors = append(p.Compressors, _elem123)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.MeasurementAlias = tSlice
- for i := 0; i < size; i ++ {
-var _elem124 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 6: ", err)
} else {
- _elem124 = v
+ p.StatementId = v
}
- p.MeasurementAlias = append(p.MeasurementAlias, _elem124)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]map[string]string, 0, size)
- p.TagsList = tSlice
- for i := 0; i < size; i ++ {
- _, _, size, err := iprot.ReadMapBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading map begin: ", err)
- }
- tMap := make(map[string]string, size)
- _elem125 := tMap
- for i := 0; i < size; i ++ {
-var _key126 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 7: ", err)
} else {
- _key126 = v
+ p.EnableRedirectQuery = &v
}
-var _val127 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+ return nil
+}
+
+func (p *TSRawDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 8: ", err)
} else {
- _val127 = v
+ p.JdbcQuery = &v
}
- _elem125[_key126] = _val127
- }
- if err := iprot.ReadMapEnd(ctx); err != nil {
- return thrift.PrependError("error reading map end: ", err)
- }
- p.TagsList = append(p.TagsList, _elem125)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]map[string]string, 0, size)
- p.AttributesList = tSlice
- for i := 0; i < size; i ++ {
- _, _, size, err := iprot.ReadMapBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading map begin: ", err)
- }
- tMap := make(map[string]string, size)
- _elem128 := tMap
- for i := 0; i < size; i ++ {
-var _key129 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSRawDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 9: ", err)
} else {
- _key129 = v
+ p.Timeout = &v
}
-var _val130 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+ return nil
+}
+
+func (p *TSRawDataQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 10: ", err)
} else {
- _val130 = v
+ p.LegalPathNodes = &v
}
- _elem128[_key129] = _val130
- }
- if err := iprot.ReadMapEnd(ctx); err != nil {
- return thrift.PrependError("error reading map end: ", err)
- }
- p.AttributesList = append(p.AttributesList, _elem128)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSCreateAlignedTimeseriesReq"); err != nil {
+func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSRawDataQueryReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -10614,6 +10919,7 @@ func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.T
if err := p.writeField7(ctx, oprot); err != nil { return err }
if err := p.writeField8(ctx, oprot); err != nil { return err }
if err := p.writeField9(ctx, oprot); err != nil { return err }
+ if err := p.writeField10(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -10622,7 +10928,7 @@ func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.T
return nil
}
-func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -10632,23 +10938,13 @@ func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot th
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
- return err
-}
-
-func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
+func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
- for _, v := range p.Measurements {
+ for _, v := range p.Paths {
if err := oprot.WriteString(ctx, string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
}
@@ -10656,317 +10952,260 @@ func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot th
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) }
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataTypes: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.DataTypes {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
+func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetFetchSize() {
+ if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) }
}
+ return err
+}
+
+func (p *TSRawDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:startTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.startTime (4) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataTypes: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:startTime: ", p), err) }
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:encodings: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Encodings {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSRawDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:endTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.endTime (5) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:encodings: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:endTime: ", p), err) }
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressors: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Compressors {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSRawDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressors: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) }
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetMeasurementAlias() {
- if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.LIST, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:measurementAlias: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAlias)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.MeasurementAlias {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSRawDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetEnableRedirectQuery() {
+ if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:measurementAlias: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) }
}
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetTagsList() {
- if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:tagsList: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.TagsList {
- if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil {
- return thrift.PrependError("error writing map begin: ", err)
- }
- for k, v := range v {
- if err := oprot.WriteString(ctx, string(k)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteMapEnd(ctx); err != nil {
- return thrift.PrependError("error writing map end: ", err)
- }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSRawDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetJdbcQuery() {
+ if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:tagsList: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) }
}
return err
}
-func (p *TSCreateAlignedTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetAttributesList() {
- if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributesList: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.AttributesList {
- if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil {
- return thrift.PrependError("error writing map begin: ", err)
- }
- for k, v := range v {
- if err := oprot.WriteString(ctx, string(k)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteMapEnd(ctx); err != nil {
- return thrift.PrependError("error writing map end: ", err)
- }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSRawDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetTimeout() {
+ if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:timeout: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.timeout (9) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributesList: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:timeout: ", p), err) }
}
return err
}
-func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesReq) bool {
+func (p *TSRawDataQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetLegalPathNodes() {
+ if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 10); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:legalPathNodes: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (10) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 10:legalPathNodes: ", p), err) }
+ }
+ return err
+}
+
+func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if p.PrefixPath != other.PrefixPath { return false }
- if len(p.Measurements) != len(other.Measurements) { return false }
- for i, _tgt := range p.Measurements {
- _src131 := other.Measurements[i]
- if _tgt != _src131 { return false }
- }
- if len(p.DataTypes) != len(other.DataTypes) { return false }
- for i, _tgt := range p.DataTypes {
- _src132 := other.DataTypes[i]
- if _tgt != _src132 { return false }
+ if len(p.Paths) != len(other.Paths) { return false }
+ for i, _tgt := range p.Paths {
+ _src135 := other.Paths[i]
+ if _tgt != _src135 { return false }
}
- if len(p.Encodings) != len(other.Encodings) { return false }
- for i, _tgt := range p.Encodings {
- _src133 := other.Encodings[i]
- if _tgt != _src133 { return false }
+ if p.FetchSize != other.FetchSize {
+ if p.FetchSize == nil || other.FetchSize == nil {
+ return false
+ }
+ if (*p.FetchSize) != (*other.FetchSize) { return false }
}
- if len(p.Compressors) != len(other.Compressors) { return false }
- for i, _tgt := range p.Compressors {
- _src134 := other.Compressors[i]
- if _tgt != _src134 { return false }
+ if p.StartTime != other.StartTime { return false }
+ if p.EndTime != other.EndTime { return false }
+ if p.StatementId != other.StatementId { return false }
+ if p.EnableRedirectQuery != other.EnableRedirectQuery {
+ if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil {
+ return false
+ }
+ if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false }
}
- if len(p.MeasurementAlias) != len(other.MeasurementAlias) { return false }
- for i, _tgt := range p.MeasurementAlias {
- _src135 := other.MeasurementAlias[i]
- if _tgt != _src135 { return false }
+ if p.JdbcQuery != other.JdbcQuery {
+ if p.JdbcQuery == nil || other.JdbcQuery == nil {
+ return false
+ }
+ if (*p.JdbcQuery) != (*other.JdbcQuery) { return false }
}
- if len(p.TagsList) != len(other.TagsList) { return false }
- for i, _tgt := range p.TagsList {
- _src136 := other.TagsList[i]
- if len(_tgt) != len(_src136) { return false }
- for k, _tgt := range _tgt {
- _src137 := _src136[k]
- if _tgt != _src137 { return false }
+ if p.Timeout != other.Timeout {
+ if p.Timeout == nil || other.Timeout == nil {
+ return false
}
+ if (*p.Timeout) != (*other.Timeout) { return false }
}
- if len(p.AttributesList) != len(other.AttributesList) { return false }
- for i, _tgt := range p.AttributesList {
- _src138 := other.AttributesList[i]
- if len(_tgt) != len(_src138) { return false }
- for k, _tgt := range _tgt {
- _src139 := _src138[k]
- if _tgt != _src139 { return false }
+ if p.LegalPathNodes != other.LegalPathNodes {
+ if p.LegalPathNodes == nil || other.LegalPathNodes == nil {
+ return false
}
+ if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false }
}
return true
}
-func (p *TSCreateAlignedTimeseriesReq) String() string {
+func (p *TSRawDataQueryReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSCreateAlignedTimeseriesReq(%+v)", *p)
+ return fmt.Sprintf("TSRawDataQueryReq(%+v)", *p)
}
// Attributes:
// - SessionId
// - Paths
// - FetchSize
-// - StartTime
-// - EndTime
+// - Time
// - StatementId
// - EnableRedirectQuery
// - JdbcQuery
// - Timeout
// - LegalPathNodes
-type TSRawDataQueryReq struct {
+type TSLastDataQueryReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"`
FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"`
- StartTime int64 `thrift:"startTime,4,required" db:"startTime" json:"startTime"`
- EndTime int64 `thrift:"endTime,5,required" db:"endTime" json:"endTime"`
- StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"`
- EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"`
- JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"`
- Timeout *int64 `thrift:"timeout,9" db:"timeout" json:"timeout,omitempty"`
- LegalPathNodes *bool `thrift:"legalPathNodes,10" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
+ Time int64 `thrift:"time,4,required" db:"time" json:"time"`
+ StatementId int64 `thrift:"statementId,5,required" db:"statementId" json:"statementId"`
+ EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"`
+ JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"`
+ Timeout *int64 `thrift:"timeout,8" db:"timeout" json:"timeout,omitempty"`
+ LegalPathNodes *bool `thrift:"legalPathNodes,9" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
}
-func NewTSRawDataQueryReq() *TSRawDataQueryReq {
- return &TSRawDataQueryReq{}
+func NewTSLastDataQueryReq() *TSLastDataQueryReq {
+ return &TSLastDataQueryReq{}
}
-func (p *TSRawDataQueryReq) GetSessionId() int64 {
+func (p *TSLastDataQueryReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSRawDataQueryReq) GetPaths() []string {
+func (p *TSLastDataQueryReq) GetPaths() []string {
return p.Paths
}
-var TSRawDataQueryReq_FetchSize_DEFAULT int32
-func (p *TSRawDataQueryReq) GetFetchSize() int32 {
+var TSLastDataQueryReq_FetchSize_DEFAULT int32
+func (p *TSLastDataQueryReq) GetFetchSize() int32 {
if !p.IsSetFetchSize() {
- return TSRawDataQueryReq_FetchSize_DEFAULT
+ return TSLastDataQueryReq_FetchSize_DEFAULT
}
return *p.FetchSize
}
-func (p *TSRawDataQueryReq) GetStartTime() int64 {
- return p.StartTime
-}
-
-func (p *TSRawDataQueryReq) GetEndTime() int64 {
- return p.EndTime
+func (p *TSLastDataQueryReq) GetTime() int64 {
+ return p.Time
}
-func (p *TSRawDataQueryReq) GetStatementId() int64 {
+func (p *TSLastDataQueryReq) GetStatementId() int64 {
return p.StatementId
}
-var TSRawDataQueryReq_EnableRedirectQuery_DEFAULT bool
-func (p *TSRawDataQueryReq) GetEnableRedirectQuery() bool {
+var TSLastDataQueryReq_EnableRedirectQuery_DEFAULT bool
+func (p *TSLastDataQueryReq) GetEnableRedirectQuery() bool {
if !p.IsSetEnableRedirectQuery() {
- return TSRawDataQueryReq_EnableRedirectQuery_DEFAULT
+ return TSLastDataQueryReq_EnableRedirectQuery_DEFAULT
}
return *p.EnableRedirectQuery
}
-var TSRawDataQueryReq_JdbcQuery_DEFAULT bool
-func (p *TSRawDataQueryReq) GetJdbcQuery() bool {
+var TSLastDataQueryReq_JdbcQuery_DEFAULT bool
+func (p *TSLastDataQueryReq) GetJdbcQuery() bool {
if !p.IsSetJdbcQuery() {
- return TSRawDataQueryReq_JdbcQuery_DEFAULT
+ return TSLastDataQueryReq_JdbcQuery_DEFAULT
}
return *p.JdbcQuery
}
-var TSRawDataQueryReq_Timeout_DEFAULT int64
-func (p *TSRawDataQueryReq) GetTimeout() int64 {
+var TSLastDataQueryReq_Timeout_DEFAULT int64
+func (p *TSLastDataQueryReq) GetTimeout() int64 {
if !p.IsSetTimeout() {
- return TSRawDataQueryReq_Timeout_DEFAULT
+ return TSLastDataQueryReq_Timeout_DEFAULT
}
return *p.Timeout
}
-var TSRawDataQueryReq_LegalPathNodes_DEFAULT bool
-func (p *TSRawDataQueryReq) GetLegalPathNodes() bool {
+var TSLastDataQueryReq_LegalPathNodes_DEFAULT bool
+func (p *TSLastDataQueryReq) GetLegalPathNodes() bool {
if !p.IsSetLegalPathNodes() {
- return TSRawDataQueryReq_LegalPathNodes_DEFAULT
+ return TSLastDataQueryReq_LegalPathNodes_DEFAULT
}
return *p.LegalPathNodes
}
-func (p *TSRawDataQueryReq) IsSetFetchSize() bool {
+func (p *TSLastDataQueryReq) IsSetFetchSize() bool {
return p.FetchSize != nil
}
-func (p *TSRawDataQueryReq) IsSetEnableRedirectQuery() bool {
+func (p *TSLastDataQueryReq) IsSetEnableRedirectQuery() bool {
return p.EnableRedirectQuery != nil
}
-func (p *TSRawDataQueryReq) IsSetJdbcQuery() bool {
+func (p *TSLastDataQueryReq) IsSetJdbcQuery() bool {
return p.JdbcQuery != nil
}
-func (p *TSRawDataQueryReq) IsSetTimeout() bool {
+func (p *TSLastDataQueryReq) IsSetTimeout() bool {
return p.Timeout != nil
}
-func (p *TSRawDataQueryReq) IsSetLegalPathNodes() bool {
+func (p *TSLastDataQueryReq) IsSetLegalPathNodes() bool {
return p.LegalPathNodes != nil
}
-func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
var issetPaths bool = false;
- var issetStartTime bool = false;
- var issetEndTime bool = false;
+ var issetTime bool = false;
var issetStatementId bool = false;
for {
@@ -11013,7 +11252,7 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetStartTime = true
+ issetTime = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -11024,18 +11263,17 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
if err := p.ReadField5(ctx, iprot); err != nil {
return err
}
- issetEndTime = true
+ issetStatementId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 6:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.BOOL {
if err := p.ReadField6(ctx, iprot); err != nil {
return err
}
- issetStatementId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -11052,7 +11290,7 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
}
}
case 8:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField8(ctx, iprot); err != nil {
return err
}
@@ -11062,18 +11300,8 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
}
}
case 9:
- if fieldTypeId == thrift.I64 {
- if err := p.ReadField9(ctx, iprot); err != nil {
- return err
- }
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 10:
if fieldTypeId == thrift.BOOL {
- if err := p.ReadField10(ctx, iprot); err != nil {
+ if err := p.ReadField9(ctx, iprot); err != nil {
return err
}
} else {
@@ -11099,11 +11327,8 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
if !issetPaths{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
}
- if !issetStartTime{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set"));
- }
- if !issetEndTime{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set"));
+ if !issetTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set"));
}
if !issetStatementId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set"));
@@ -11111,7 +11336,7 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er
return nil
}
-func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -11120,7 +11345,7 @@ func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProto
return nil
}
-func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -11128,13 +11353,13 @@ func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProto
tSlice := make([]string, 0, size)
p.Paths = tSlice
for i := 0; i < size; i ++ {
-var _elem140 string
+var _elem136 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem140 = v
+ _elem136 = v
}
- p.Paths = append(p.Paths, _elem140)
+ p.Paths = append(p.Paths, _elem136)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -11142,7 +11367,7 @@ var _elem140 string
return nil
}
-func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
@@ -11151,71 +11376,62 @@ func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProto
return nil
}
-func (p *TSRawDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 4: ", err)
} else {
- p.StartTime = v
+ p.Time = v
}
return nil
}
-func (p *TSRawDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 5: ", err)
-} else {
- p.EndTime = v
-}
- return nil
-}
-
-func (p *TSRawDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 6: ", err)
} else {
p.StatementId = v
}
return nil
}
-func (p *TSRawDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 7: ", err)
+ return thrift.PrependError("error reading field 6: ", err)
} else {
p.EnableRedirectQuery = &v
}
return nil
}
-func (p *TSRawDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 8: ", err)
+ return thrift.PrependError("error reading field 7: ", err)
} else {
p.JdbcQuery = &v
}
return nil
}
-func (p *TSRawDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 9: ", err)
+ return thrift.PrependError("error reading field 8: ", err)
} else {
p.Timeout = &v
}
return nil
}
-func (p *TSRawDataQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSLastDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 10: ", err)
+ return thrift.PrependError("error reading field 9: ", err)
} else {
p.LegalPathNodes = &v
}
return nil
}
-func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSRawDataQueryReq"); err != nil {
+func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSLastDataQueryReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -11227,7 +11443,6 @@ func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) e
if err := p.writeField7(ctx, oprot); err != nil { return err }
if err := p.writeField8(ctx, oprot); err != nil { return err }
if err := p.writeField9(ctx, oprot); err != nil { return err }
- if err := p.writeField10(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -11236,7 +11451,7 @@ func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) e
return nil
}
-func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -11246,7 +11461,7 @@ func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProto
return err
}
-func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
@@ -11264,7 +11479,7 @@ func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProto
return err
}
-func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetFetchSize() {
if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) }
@@ -11276,85 +11491,75 @@ func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProto
return err
}
-func (p *TSRawDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:startTime: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.startTime (4) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:startTime: ", p), err) }
- return err
-}
-
-func (p *TSRawDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:endTime: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.endTime (5) field write error: ", p), err) }
+func (p *TSLastDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "time", thrift.I64, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:time: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.Time)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.time (4) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:endTime: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:time: ", p), err) }
return err
}
-func (p *TSRawDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) }
+func (p *TSLastDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:statementId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.statementId (5) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:statementId: ", p), err) }
return err
}
-func (p *TSRawDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetEnableRedirectQuery() {
- if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) }
if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) }
}
return err
}
-func (p *TSRawDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetJdbcQuery() {
- if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) }
if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) }
}
return err
}
-func (p *TSRawDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetTimeout() {
- if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:timeout: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:timeout: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.timeout (9) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.timeout (8) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:timeout: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:timeout: ", p), err) }
}
return err
}
-func (p *TSRawDataQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSLastDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetLegalPathNodes() {
- if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 10); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:legalPathNodes: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:legalPathNodes: ", p), err) }
if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (10) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (9) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 10:legalPathNodes: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:legalPathNodes: ", p), err) }
}
return err
}
-func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool {
+func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -11363,8 +11568,8 @@ func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool {
if p.SessionId != other.SessionId { return false }
if len(p.Paths) != len(other.Paths) { return false }
for i, _tgt := range p.Paths {
- _src141 := other.Paths[i]
- if _tgt != _src141 { return false }
+ _src137 := other.Paths[i]
+ if _tgt != _src137 { return false }
}
if p.FetchSize != other.FetchSize {
if p.FetchSize == nil || other.FetchSize == nil {
@@ -11372,8 +11577,7 @@ func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool {
}
if (*p.FetchSize) != (*other.FetchSize) { return false }
}
- if p.StartTime != other.StartTime { return false }
- if p.EndTime != other.EndTime { return false }
+ if p.Time != other.Time { return false }
if p.StatementId != other.StatementId { return false }
if p.EnableRedirectQuery != other.EnableRedirectQuery {
if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil {
@@ -11402,119 +11606,145 @@ func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool {
return true
}
-func (p *TSRawDataQueryReq) String() string {
+func (p *TSLastDataQueryReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSRawDataQueryReq(%+v)", *p)
+ return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p)
}
// Attributes:
// - SessionId
+// - StatementId
// - Paths
+// - Aggregations
+// - StartTime
+// - EndTime
+// - Interval
+// - SlidingStep
// - FetchSize
-// - Time
-// - StatementId
-// - EnableRedirectQuery
-// - JdbcQuery
// - Timeout
// - LegalPathNodes
-type TSLastDataQueryReq struct {
+type TSAggregationQueryReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"`
- FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"`
- Time int64 `thrift:"time,4,required" db:"time" json:"time"`
- StatementId int64 `thrift:"statementId,5,required" db:"statementId" json:"statementId"`
- EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"`
- JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"`
- Timeout *int64 `thrift:"timeout,8" db:"timeout" json:"timeout,omitempty"`
- LegalPathNodes *bool `thrift:"legalPathNodes,9" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
+ StatementId int64 `thrift:"statementId,2,required" db:"statementId" json:"statementId"`
+ Paths []string `thrift:"paths,3,required" db:"paths" json:"paths"`
+ Aggregations []common.TAggregationType `thrift:"aggregations,4,required" db:"aggregations" json:"aggregations"`
+ StartTime *int64 `thrift:"startTime,5" db:"startTime" json:"startTime,omitempty"`
+ EndTime *int64 `thrift:"endTime,6" db:"endTime" json:"endTime,omitempty"`
+ Interval *int64 `thrift:"interval,7" db:"interval" json:"interval,omitempty"`
+ SlidingStep *int64 `thrift:"slidingStep,8" db:"slidingStep" json:"slidingStep,omitempty"`
+ FetchSize *int32 `thrift:"fetchSize,9" db:"fetchSize" json:"fetchSize,omitempty"`
+ Timeout *int64 `thrift:"timeout,10" db:"timeout" json:"timeout,omitempty"`
+ LegalPathNodes *bool `thrift:"legalPathNodes,11" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
}
-func NewTSLastDataQueryReq() *TSLastDataQueryReq {
- return &TSLastDataQueryReq{}
+func NewTSAggregationQueryReq() *TSAggregationQueryReq {
+ return &TSAggregationQueryReq{}
}
-func (p *TSLastDataQueryReq) GetSessionId() int64 {
+func (p *TSAggregationQueryReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSLastDataQueryReq) GetPaths() []string {
- return p.Paths
-}
-var TSLastDataQueryReq_FetchSize_DEFAULT int32
-func (p *TSLastDataQueryReq) GetFetchSize() int32 {
- if !p.IsSetFetchSize() {
- return TSLastDataQueryReq_FetchSize_DEFAULT
- }
-return *p.FetchSize
+func (p *TSAggregationQueryReq) GetStatementId() int64 {
+ return p.StatementId
}
-func (p *TSLastDataQueryReq) GetTime() int64 {
- return p.Time
+func (p *TSAggregationQueryReq) GetPaths() []string {
+ return p.Paths
}
-func (p *TSLastDataQueryReq) GetStatementId() int64 {
- return p.StatementId
+func (p *TSAggregationQueryReq) GetAggregations() []common.TAggregationType {
+ return p.Aggregations
}
-var TSLastDataQueryReq_EnableRedirectQuery_DEFAULT bool
-func (p *TSLastDataQueryReq) GetEnableRedirectQuery() bool {
- if !p.IsSetEnableRedirectQuery() {
- return TSLastDataQueryReq_EnableRedirectQuery_DEFAULT
+var TSAggregationQueryReq_StartTime_DEFAULT int64
+func (p *TSAggregationQueryReq) GetStartTime() int64 {
+ if !p.IsSetStartTime() {
+ return TSAggregationQueryReq_StartTime_DEFAULT
}
-return *p.EnableRedirectQuery
+return *p.StartTime
}
-var TSLastDataQueryReq_JdbcQuery_DEFAULT bool
-func (p *TSLastDataQueryReq) GetJdbcQuery() bool {
- if !p.IsSetJdbcQuery() {
- return TSLastDataQueryReq_JdbcQuery_DEFAULT
+var TSAggregationQueryReq_EndTime_DEFAULT int64
+func (p *TSAggregationQueryReq) GetEndTime() int64 {
+ if !p.IsSetEndTime() {
+ return TSAggregationQueryReq_EndTime_DEFAULT
}
-return *p.JdbcQuery
+return *p.EndTime
}
-var TSLastDataQueryReq_Timeout_DEFAULT int64
-func (p *TSLastDataQueryReq) GetTimeout() int64 {
- if !p.IsSetTimeout() {
- return TSLastDataQueryReq_Timeout_DEFAULT
+var TSAggregationQueryReq_Interval_DEFAULT int64
+func (p *TSAggregationQueryReq) GetInterval() int64 {
+ if !p.IsSetInterval() {
+ return TSAggregationQueryReq_Interval_DEFAULT
+ }
+return *p.Interval
+}
+var TSAggregationQueryReq_SlidingStep_DEFAULT int64
+func (p *TSAggregationQueryReq) GetSlidingStep() int64 {
+ if !p.IsSetSlidingStep() {
+ return TSAggregationQueryReq_SlidingStep_DEFAULT
+ }
+return *p.SlidingStep
+}
+var TSAggregationQueryReq_FetchSize_DEFAULT int32
+func (p *TSAggregationQueryReq) GetFetchSize() int32 {
+ if !p.IsSetFetchSize() {
+ return TSAggregationQueryReq_FetchSize_DEFAULT
+ }
+return *p.FetchSize
+}
+var TSAggregationQueryReq_Timeout_DEFAULT int64
+func (p *TSAggregationQueryReq) GetTimeout() int64 {
+ if !p.IsSetTimeout() {
+ return TSAggregationQueryReq_Timeout_DEFAULT
}
return *p.Timeout
}
-var TSLastDataQueryReq_LegalPathNodes_DEFAULT bool
-func (p *TSLastDataQueryReq) GetLegalPathNodes() bool {
+var TSAggregationQueryReq_LegalPathNodes_DEFAULT bool
+func (p *TSAggregationQueryReq) GetLegalPathNodes() bool {
if !p.IsSetLegalPathNodes() {
- return TSLastDataQueryReq_LegalPathNodes_DEFAULT
+ return TSAggregationQueryReq_LegalPathNodes_DEFAULT
}
return *p.LegalPathNodes
}
-func (p *TSLastDataQueryReq) IsSetFetchSize() bool {
- return p.FetchSize != nil
+func (p *TSAggregationQueryReq) IsSetStartTime() bool {
+ return p.StartTime != nil
}
-func (p *TSLastDataQueryReq) IsSetEnableRedirectQuery() bool {
- return p.EnableRedirectQuery != nil
+func (p *TSAggregationQueryReq) IsSetEndTime() bool {
+ return p.EndTime != nil
}
-func (p *TSLastDataQueryReq) IsSetJdbcQuery() bool {
- return p.JdbcQuery != nil
+func (p *TSAggregationQueryReq) IsSetInterval() bool {
+ return p.Interval != nil
}
-func (p *TSLastDataQueryReq) IsSetTimeout() bool {
+func (p *TSAggregationQueryReq) IsSetSlidingStep() bool {
+ return p.SlidingStep != nil
+}
+
+func (p *TSAggregationQueryReq) IsSetFetchSize() bool {
+ return p.FetchSize != nil
+}
+
+func (p *TSAggregationQueryReq) IsSetTimeout() bool {
return p.Timeout != nil
}
-func (p *TSLastDataQueryReq) IsSetLegalPathNodes() bool {
+func (p *TSAggregationQueryReq) IsSetLegalPathNodes() bool {
return p.LegalPathNodes != nil
}
-func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPaths bool = false;
- var issetTime bool = false;
var issetStatementId bool = false;
+ var issetPaths bool = false;
+ var issetAggregations bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -11535,32 +11765,33 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
}
}
case 2:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPaths = true
+ issetStatementId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
+ issetPaths = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetTime = true
+ issetAggregations = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -11571,14 +11802,13 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
if err := p.ReadField5(ctx, iprot); err != nil {
return err
}
- issetStatementId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 6:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField6(ctx, iprot); err != nil {
return err
}
@@ -11588,7 +11818,7 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
}
}
case 7:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField7(ctx, iprot); err != nil {
return err
}
@@ -11608,7 +11838,7 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
}
}
case 9:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField9(ctx, iprot); err != nil {
return err
}
@@ -11617,6 +11847,26 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
return err
}
}
+ case 10:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField10(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 11:
+ if fieldTypeId == thrift.BOOL {
+ if err := p.ReadField11(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
default:
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -11632,19 +11882,19 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
+ if !issetStatementId{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set"));
+ }
if !issetPaths{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
}
- if !issetTime{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set"));
- }
- if !issetStatementId{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set"));
+ if !issetAggregations{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Aggregations is not set"));
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -11653,7 +11903,16 @@ func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProt
return nil
}
-func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.StatementId = v
+}
+ return nil
+}
+
+func (p *TSAggregationQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin(ctx)
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
@@ -11661,13 +11920,13 @@ func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProt
tSlice := make([]string, 0, size)
p.Paths = tSlice
for i := 0; i < size; i ++ {
-var _elem142 string
+var _elem138 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem142 = v
+ _elem138 = v
}
- p.Paths = append(p.Paths, _elem142)
+ p.Paths = append(p.Paths, _elem138)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -11675,71 +11934,94 @@ var _elem142 string
return nil
}
-func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
+func (p *TSAggregationQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]common.TAggregationType, 0, size)
+ p.Aggregations = tSlice
+ for i := 0; i < size; i ++ {
+var _elem139 common.TAggregationType
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.FetchSize = &v
+ temp := common.TAggregationType(v)
+ _elem139 = temp
}
+ p.Aggregations = append(p.Aggregations, _elem139)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSLastDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
+ return thrift.PrependError("error reading field 5: ", err)
} else {
- p.Time = v
+ p.StartTime = &v
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 5: ", err)
+ return thrift.PrependError("error reading field 6: ", err)
} else {
- p.StatementId = v
+ p.EndTime = &v
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 6: ", err)
+func (p *TSAggregationQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 7: ", err)
} else {
- p.EnableRedirectQuery = &v
+ p.Interval = &v
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 7: ", err)
+func (p *TSAggregationQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 8: ", err)
} else {
- p.JdbcQuery = &v
+ p.SlidingStep = &v
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 9: ", err)
+} else {
+ p.FetchSize = &v
+}
+ return nil
+}
+
+func (p *TSAggregationQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 8: ", err)
+ return thrift.PrependError("error reading field 10: ", err)
} else {
p.Timeout = &v
}
return nil
}
-func (p *TSLastDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAggregationQueryReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 9: ", err)
+ return thrift.PrependError("error reading field 11: ", err)
} else {
p.LegalPathNodes = &v
}
return nil
}
-func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSLastDataQueryReq"); err != nil {
+func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSAggregationQueryReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -11751,6 +12033,8 @@ func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol)
if err := p.writeField7(ctx, oprot); err != nil { return err }
if err := p.writeField8(ctx, oprot); err != nil { return err }
if err := p.writeField9(ctx, oprot); err != nil { return err }
+ if err := p.writeField10(ctx, oprot); err != nil { return err }
+ if err := p.writeField11(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -11759,7 +12043,7 @@ func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol)
return nil
}
-func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSAggregationQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -11769,9 +12053,19 @@ func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) }
+func (p *TSAggregationQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementId: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.statementId (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statementId: ", p), err) }
+ return err
+}
+
+func (p *TSAggregationQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:paths: ", p), err) }
if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
@@ -11783,121 +12077,159 @@ func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProt
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:paths: ", p), err) }
return err
}
-func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetFetchSize() {
- if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) }
+func (p *TSAggregationQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "aggregations", thrift.LIST, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:aggregations: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Aggregations)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
}
+ for _, v := range p.Aggregations {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:aggregations: ", p), err) }
return err
}
-func (p *TSLastDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "time", thrift.I64, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:time: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.Time)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.time (4) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:time: ", p), err) }
+func (p *TSAggregationQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetStartTime() {
+ if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:startTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(*p.StartTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.startTime (5) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:startTime: ", p), err) }
+ }
return err
}
-func (p *TSLastDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:statementId: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.statementId (5) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:statementId: ", p), err) }
+func (p *TSAggregationQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetEndTime() {
+ if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:endTime: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(*p.EndTime)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.endTime (6) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:endTime: ", p), err) }
+ }
return err
}
-func (p *TSLastDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetEnableRedirectQuery() {
- if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) }
+func (p *TSAggregationQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetInterval() {
+ if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:interval: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(*p.Interval)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.interval (7) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:interval: ", p), err) }
}
return err
}
-func (p *TSLastDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetJdbcQuery() {
- if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) }
+func (p *TSAggregationQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetSlidingStep() {
+ if err := oprot.WriteFieldBegin(ctx, "slidingStep", thrift.I64, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:slidingStep: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(*p.SlidingStep)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.slidingStep (8) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:slidingStep: ", p), err) }
}
return err
}
-func (p *TSLastDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSAggregationQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetFetchSize() {
+ if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:fetchSize: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.fetchSize (9) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:fetchSize: ", p), err) }
+ }
+ return err
+}
+
+func (p *TSAggregationQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetTimeout() {
- if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:timeout: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 10); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timeout: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.timeout (8) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.timeout (10) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:timeout: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timeout: ", p), err) }
}
return err
}
-func (p *TSLastDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSAggregationQueryReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetLegalPathNodes() {
- if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:legalPathNodes: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 11); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:legalPathNodes: ", p), err) }
if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (9) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (11) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:legalPathNodes: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 11:legalPathNodes: ", p), err) }
}
return err
}
-func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool {
+func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
+ if p.StatementId != other.StatementId { return false }
if len(p.Paths) != len(other.Paths) { return false }
for i, _tgt := range p.Paths {
- _src143 := other.Paths[i]
- if _tgt != _src143 { return false }
+ _src140 := other.Paths[i]
+ if _tgt != _src140 { return false }
}
- if p.FetchSize != other.FetchSize {
- if p.FetchSize == nil || other.FetchSize == nil {
+ if len(p.Aggregations) != len(other.Aggregations) { return false }
+ for i, _tgt := range p.Aggregations {
+ _src141 := other.Aggregations[i]
+ if _tgt != _src141 { return false }
+ }
+ if p.StartTime != other.StartTime {
+ if p.StartTime == nil || other.StartTime == nil {
return false
}
- if (*p.FetchSize) != (*other.FetchSize) { return false }
+ if (*p.StartTime) != (*other.StartTime) { return false }
}
- if p.Time != other.Time { return false }
- if p.StatementId != other.StatementId { return false }
- if p.EnableRedirectQuery != other.EnableRedirectQuery {
- if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil {
+ if p.EndTime != other.EndTime {
+ if p.EndTime == nil || other.EndTime == nil {
return false
}
- if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false }
+ if (*p.EndTime) != (*other.EndTime) { return false }
}
- if p.JdbcQuery != other.JdbcQuery {
- if p.JdbcQuery == nil || other.JdbcQuery == nil {
+ if p.Interval != other.Interval {
+ if p.Interval == nil || other.Interval == nil {
return false
}
- if (*p.JdbcQuery) != (*other.JdbcQuery) { return false }
+ if (*p.Interval) != (*other.Interval) { return false }
+ }
+ if p.SlidingStep != other.SlidingStep {
+ if p.SlidingStep == nil || other.SlidingStep == nil {
+ return false
+ }
+ if (*p.SlidingStep) != (*other.SlidingStep) { return false }
+ }
+ if p.FetchSize != other.FetchSize {
+ if p.FetchSize == nil || other.FetchSize == nil {
+ return false
+ }
+ if (*p.FetchSize) != (*other.FetchSize) { return false }
}
if p.Timeout != other.Timeout {
if p.Timeout == nil || other.Timeout == nil {
@@ -11914,145 +12246,146 @@ func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool {
return true
}
-func (p *TSLastDataQueryReq) String() string {
+func (p *TSAggregationQueryReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p)
+ return fmt.Sprintf("TSAggregationQueryReq(%+v)", *p)
}
// Attributes:
// - SessionId
// - StatementId
-// - Paths
-// - Aggregations
+// - Device
+// - Measurement
+// - DataType
+// - AggregationType
+// - Database
// - StartTime
// - EndTime
// - Interval
-// - SlidingStep
// - FetchSize
// - Timeout
-// - LegalPathNodes
-type TSAggregationQueryReq struct {
+type TSGroupByQueryIntervalReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
StatementId int64 `thrift:"statementId,2,required" db:"statementId" json:"statementId"`
- Paths []string `thrift:"paths,3,required" db:"paths" json:"paths"`
- Aggregations []common.TAggregationType `thrift:"aggregations,4,required" db:"aggregations" json:"aggregations"`
- StartTime *int64 `thrift:"startTime,5" db:"startTime" json:"startTime,omitempty"`
- EndTime *int64 `thrift:"endTime,6" db:"endTime" json:"endTime,omitempty"`
- Interval *int64 `thrift:"interval,7" db:"interval" json:"interval,omitempty"`
- SlidingStep *int64 `thrift:"slidingStep,8" db:"slidingStep" json:"slidingStep,omitempty"`
- FetchSize *int32 `thrift:"fetchSize,9" db:"fetchSize" json:"fetchSize,omitempty"`
- Timeout *int64 `thrift:"timeout,10" db:"timeout" json:"timeout,omitempty"`
- LegalPathNodes *bool `thrift:"legalPathNodes,11" db:"legalPathNodes" json:"legalPathNodes,omitempty"`
+ Device string `thrift:"device,3,required" db:"device" json:"device"`
+ Measurement string `thrift:"measurement,4,required" db:"measurement" json:"measurement"`
+ DataType int32 `thrift:"dataType,5,required" db:"dataType" json:"dataType"`
+ AggregationType common.TAggregationType `thrift:"aggregationType,6,required" db:"aggregationType" json:"aggregationType"`
+ Database *string `thrift:"database,7" db:"database" json:"database,omitempty"`
+ StartTime *int64 `thrift:"startTime,8" db:"startTime" json:"startTime,omitempty"`
+ EndTime *int64 `thrift:"endTime,9" db:"endTime" json:"endTime,omitempty"`
+ Interval *int64 `thrift:"interval,10" db:"interval" json:"interval,omitempty"`
+ FetchSize *int32 `thrift:"fetchSize,11" db:"fetchSize" json:"fetchSize,omitempty"`
+ Timeout *int64 `thrift:"timeout,12" db:"timeout" json:"timeout,omitempty"`
}
-func NewTSAggregationQueryReq() *TSAggregationQueryReq {
- return &TSAggregationQueryReq{}
+func NewTSGroupByQueryIntervalReq() *TSGroupByQueryIntervalReq {
+ return &TSGroupByQueryIntervalReq{}
}
-func (p *TSAggregationQueryReq) GetSessionId() int64 {
+func (p *TSGroupByQueryIntervalReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSAggregationQueryReq) GetStatementId() int64 {
+func (p *TSGroupByQueryIntervalReq) GetStatementId() int64 {
return p.StatementId
}
-func (p *TSAggregationQueryReq) GetPaths() []string {
- return p.Paths
+func (p *TSGroupByQueryIntervalReq) GetDevice() string {
+ return p.Device
}
-func (p *TSAggregationQueryReq) GetAggregations() []common.TAggregationType {
- return p.Aggregations
+func (p *TSGroupByQueryIntervalReq) GetMeasurement() string {
+ return p.Measurement
}
-var TSAggregationQueryReq_StartTime_DEFAULT int64
-func (p *TSAggregationQueryReq) GetStartTime() int64 {
+
+func (p *TSGroupByQueryIntervalReq) GetDataType() int32 {
+ return p.DataType
+}
+
+func (p *TSGroupByQueryIntervalReq) GetAggregationType() common.TAggregationType {
+ return p.AggregationType
+}
+var TSGroupByQueryIntervalReq_Database_DEFAULT string
+func (p *TSGroupByQueryIntervalReq) GetDatabase() string {
+ if !p.IsSetDatabase() {
+ return TSGroupByQueryIntervalReq_Database_DEFAULT
+ }
+return *p.Database
+}
+var TSGroupByQueryIntervalReq_StartTime_DEFAULT int64
+func (p *TSGroupByQueryIntervalReq) GetStartTime() int64 {
if !p.IsSetStartTime() {
- return TSAggregationQueryReq_StartTime_DEFAULT
+ return TSGroupByQueryIntervalReq_StartTime_DEFAULT
}
return *p.StartTime
}
-var TSAggregationQueryReq_EndTime_DEFAULT int64
-func (p *TSAggregationQueryReq) GetEndTime() int64 {
+var TSGroupByQueryIntervalReq_EndTime_DEFAULT int64
+func (p *TSGroupByQueryIntervalReq) GetEndTime() int64 {
if !p.IsSetEndTime() {
- return TSAggregationQueryReq_EndTime_DEFAULT
+ return TSGroupByQueryIntervalReq_EndTime_DEFAULT
}
return *p.EndTime
}
-var TSAggregationQueryReq_Interval_DEFAULT int64
-func (p *TSAggregationQueryReq) GetInterval() int64 {
+var TSGroupByQueryIntervalReq_Interval_DEFAULT int64
+func (p *TSGroupByQueryIntervalReq) GetInterval() int64 {
if !p.IsSetInterval() {
- return TSAggregationQueryReq_Interval_DEFAULT
+ return TSGroupByQueryIntervalReq_Interval_DEFAULT
}
return *p.Interval
}
-var TSAggregationQueryReq_SlidingStep_DEFAULT int64
-func (p *TSAggregationQueryReq) GetSlidingStep() int64 {
- if !p.IsSetSlidingStep() {
- return TSAggregationQueryReq_SlidingStep_DEFAULT
- }
-return *p.SlidingStep
-}
-var TSAggregationQueryReq_FetchSize_DEFAULT int32
-func (p *TSAggregationQueryReq) GetFetchSize() int32 {
+var TSGroupByQueryIntervalReq_FetchSize_DEFAULT int32
+func (p *TSGroupByQueryIntervalReq) GetFetchSize() int32 {
if !p.IsSetFetchSize() {
- return TSAggregationQueryReq_FetchSize_DEFAULT
+ return TSGroupByQueryIntervalReq_FetchSize_DEFAULT
}
return *p.FetchSize
}
-var TSAggregationQueryReq_Timeout_DEFAULT int64
-func (p *TSAggregationQueryReq) GetTimeout() int64 {
+var TSGroupByQueryIntervalReq_Timeout_DEFAULT int64
+func (p *TSGroupByQueryIntervalReq) GetTimeout() int64 {
if !p.IsSetTimeout() {
- return TSAggregationQueryReq_Timeout_DEFAULT
+ return TSGroupByQueryIntervalReq_Timeout_DEFAULT
}
return *p.Timeout
}
-var TSAggregationQueryReq_LegalPathNodes_DEFAULT bool
-func (p *TSAggregationQueryReq) GetLegalPathNodes() bool {
- if !p.IsSetLegalPathNodes() {
- return TSAggregationQueryReq_LegalPathNodes_DEFAULT
- }
-return *p.LegalPathNodes
+func (p *TSGroupByQueryIntervalReq) IsSetDatabase() bool {
+ return p.Database != nil
}
-func (p *TSAggregationQueryReq) IsSetStartTime() bool {
+
+func (p *TSGroupByQueryIntervalReq) IsSetStartTime() bool {
return p.StartTime != nil
}
-func (p *TSAggregationQueryReq) IsSetEndTime() bool {
+func (p *TSGroupByQueryIntervalReq) IsSetEndTime() bool {
return p.EndTime != nil
}
-func (p *TSAggregationQueryReq) IsSetInterval() bool {
+func (p *TSGroupByQueryIntervalReq) IsSetInterval() bool {
return p.Interval != nil
}
-func (p *TSAggregationQueryReq) IsSetSlidingStep() bool {
- return p.SlidingStep != nil
-}
-
-func (p *TSAggregationQueryReq) IsSetFetchSize() bool {
+func (p *TSGroupByQueryIntervalReq) IsSetFetchSize() bool {
return p.FetchSize != nil
}
-func (p *TSAggregationQueryReq) IsSetTimeout() bool {
+func (p *TSGroupByQueryIntervalReq) IsSetTimeout() bool {
return p.Timeout != nil
}
-func (p *TSAggregationQueryReq) IsSetLegalPathNodes() bool {
- return p.LegalPathNodes != nil
-}
-
-func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSGroupByQueryIntervalReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
var issetStatementId bool = false;
- var issetPaths bool = false;
- var issetAggregations bool = false;
+ var issetDevice bool = false;
+ var issetMeasurement bool = false;
+ var issetDataType bool = false;
+ var issetAggregationType bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -12084,49 +12417,51 @@ func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol
}
}
case 3:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetPaths = true
+ issetDevice = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetAggregations = true
+ issetMeasurement = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 5:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField5(ctx, iprot); err != nil {
return err
}
+ issetDataType = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 6:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField6(ctx, iprot); err != nil {
return err
}
+ issetAggregationType = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 7:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField7(ctx, iprot); err != nil {
return err
}
@@ -12146,7 +12481,7 @@ func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol
}
}
case 9:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField9(ctx, iprot); err != nil {
return err
}
@@ -12166,7 +12501,7 @@ func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol
}
}
case 11:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField11(ctx, iprot); err != nil {
return err
}
@@ -12175,6 +12510,16 @@ func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol
return err
}
}
+ case 12:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField12(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
default:
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -12193,16 +12538,22 @@ func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol
if !issetStatementId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set"));
}
- if !issetPaths{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set"));
+ if !issetDevice{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Device is not set"));
}
- if !issetAggregations{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Aggregations is not set"));
+ if !issetMeasurement{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurement is not set"));
+ }
+ if !issetDataType{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set"));
+ }
+ if !issetAggregationType{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field AggregationType is not set"));
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSGroupByQueryIntervalReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -12211,7 +12562,7 @@ func (p *TSAggregationQueryReq) ReadField1(ctx context.Context, iprot thrift.TP
return nil
}
-func (p *TSAggregationQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSGroupByQueryIntervalReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
@@ -12220,116 +12571,99 @@ func (p *TSAggregationQueryReq) ReadField2(ctx context.Context, iprot thrift.TP
return nil
}
-func (p *TSAggregationQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.Paths = tSlice
- for i := 0; i < size; i ++ {
-var _elem144 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSGroupByQueryIntervalReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
} else {
- _elem144 = v
+ p.Device = v
}
- p.Paths = append(p.Paths, _elem144)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSAggregationQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]common.TAggregationType, 0, size)
- p.Aggregations = tSlice
- for i := 0; i < size; i ++ {
-var _elem145 common.TAggregationType
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSGroupByQueryIntervalReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
} else {
- temp := common.TAggregationType(v)
- _elem145 = temp
+ p.Measurement = v
}
- p.Aggregations = append(p.Aggregations, _elem145)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSAggregationQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 5: ", err)
} else {
- p.StartTime = &v
+ p.DataType = v
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 6: ", err)
} else {
- p.EndTime = &v
+ temp := common.TAggregationType(v)
+ p.AggregationType = temp
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 7: ", err)
} else {
- p.Interval = &v
+ p.Database = &v
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSGroupByQueryIntervalReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 8: ", err)
} else {
- p.SlidingStep = &v
+ p.StartTime = &v
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 9: ", err)
} else {
- p.FetchSize = &v
+ p.EndTime = &v
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSGroupByQueryIntervalReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 10: ", err)
} else {
- p.Timeout = &v
+ p.Interval = &v
}
return nil
}
-func (p *TSAggregationQueryReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 11: ", err)
} else {
- p.LegalPathNodes = &v
+ p.FetchSize = &v
}
return nil
}
-func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSAggregationQueryReq"); err != nil {
+func (p *TSGroupByQueryIntervalReq) ReadField12(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 12: ", err)
+} else {
+ p.Timeout = &v
+}
+ return nil
+}
+
+func (p *TSGroupByQueryIntervalReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSGroupByQueryIntervalReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -12343,6 +12677,7 @@ func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtoco
if err := p.writeField9(ctx, oprot); err != nil { return err }
if err := p.writeField10(ctx, oprot); err != nil { return err }
if err := p.writeField11(ctx, oprot); err != nil { return err }
+ if err := p.writeField12(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -12351,7 +12686,7 @@ func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtoco
return nil
}
-func (p *TSAggregationQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -12361,7 +12696,7 @@ func (p *TSAggregationQueryReq) writeField1(ctx context.Context, oprot thrift.TP
return err
}
-func (p *TSAggregationQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil {
@@ -12371,127 +12706,119 @@ func (p *TSAggregationQueryReq) writeField2(ctx context.Context, oprot thrift.TP
return err
}
-func (p *TSAggregationQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:paths: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Paths {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSGroupByQueryIntervalReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "device", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:device: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Device)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.device (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:paths: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:device: ", p), err) }
return err
}
-func (p *TSAggregationQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "aggregations", thrift.LIST, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:aggregations: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Aggregations)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Aggregations {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSGroupByQueryIntervalReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Measurement)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:aggregations: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) }
return err
}
-func (p *TSAggregationQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataType: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.dataType (5) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataType: ", p), err) }
+ return err
+}
+
+func (p *TSGroupByQueryIntervalReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "aggregationType", thrift.I32, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:aggregationType: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.AggregationType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.aggregationType (6) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:aggregationType: ", p), err) }
+ return err
+}
+
+func (p *TSGroupByQueryIntervalReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetDatabase() {
+ if err := oprot.WriteFieldBegin(ctx, "database", thrift.STRING, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:database: ", p), err) }
+ if err := oprot.WriteString(ctx, string(*p.Database)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.database (7) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:database: ", p), err) }
+ }
+ return err
+}
+
+func (p *TSGroupByQueryIntervalReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetStartTime() {
- if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:startTime: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:startTime: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.StartTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.startTime (5) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.startTime (8) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:startTime: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:startTime: ", p), err) }
}
return err
}
-func (p *TSAggregationQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetEndTime() {
- if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:endTime: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:endTime: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.EndTime)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.endTime (6) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.endTime (9) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:endTime: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:endTime: ", p), err) }
}
return err
}
-func (p *TSAggregationQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetInterval() {
- if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:interval: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 10); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:interval: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.Interval)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.interval (7) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:interval: ", p), err) }
- }
- return err
-}
-
-func (p *TSAggregationQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetSlidingStep() {
- if err := oprot.WriteFieldBegin(ctx, "slidingStep", thrift.I64, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:slidingStep: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(*p.SlidingStep)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.slidingStep (8) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.interval (10) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:slidingStep: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 10:interval: ", p), err) }
}
return err
}
-func (p *TSAggregationQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetFetchSize() {
- if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:fetchSize: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 11); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:fetchSize: ", p), err) }
if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.fetchSize (9) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.fetchSize (11) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:fetchSize: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 11:fetchSize: ", p), err) }
}
return err
}
-func (p *TSAggregationQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSGroupByQueryIntervalReq) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) {
if p.IsSetTimeout() {
- if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 10); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timeout: ", p), err) }
+ if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 12); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:timeout: ", p), err) }
if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.timeout (10) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timeout: ", p), err) }
- }
- return err
-}
-
-func (p *TSAggregationQueryReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetLegalPathNodes() {
- if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 11); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:legalPathNodes: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (11) field write error: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T.timeout (12) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 11:legalPathNodes: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 12:timeout: ", p), err) }
}
return err
}
-func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool {
+func (p *TSGroupByQueryIntervalReq) Equals(other *TSGroupByQueryIntervalReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -12499,15 +12826,15 @@ func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool {
}
if p.SessionId != other.SessionId { return false }
if p.StatementId != other.StatementId { return false }
- if len(p.Paths) != len(other.Paths) { return false }
- for i, _tgt := range p.Paths {
- _src146 := other.Paths[i]
- if _tgt != _src146 { return false }
- }
- if len(p.Aggregations) != len(other.Aggregations) { return false }
- for i, _tgt := range p.Aggregations {
- _src147 := other.Aggregations[i]
- if _tgt != _src147 { return false }
+ if p.Device != other.Device { return false }
+ if p.Measurement != other.Measurement { return false }
+ if p.DataType != other.DataType { return false }
+ if p.AggregationType != other.AggregationType { return false }
+ if p.Database != other.Database {
+ if p.Database == nil || other.Database == nil {
+ return false
+ }
+ if (*p.Database) != (*other.Database) { return false }
}
if p.StartTime != other.StartTime {
if p.StartTime == nil || other.StartTime == nil {
@@ -12527,12 +12854,6 @@ func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool {
}
if (*p.Interval) != (*other.Interval) { return false }
}
- if p.SlidingStep != other.SlidingStep {
- if p.SlidingStep == nil || other.SlidingStep == nil {
- return false
- }
- if (*p.SlidingStep) != (*other.SlidingStep) { return false }
- }
if p.FetchSize != other.FetchSize {
if p.FetchSize == nil || other.FetchSize == nil {
return false
@@ -12545,20 +12866,14 @@ func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool {
}
if (*p.Timeout) != (*other.Timeout) { return false }
}
- if p.LegalPathNodes != other.LegalPathNodes {
- if p.LegalPathNodes == nil || other.LegalPathNodes == nil {
- return false
- }
- if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false }
- }
return true
}
-func (p *TSAggregationQueryReq) String() string {
+func (p *TSGroupByQueryIntervalReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSAggregationQueryReq(%+v)", *p)
+ return fmt.Sprintf("TSGroupByQueryIntervalReq(%+v)", *p)
}
// Attributes:
@@ -12803,13 +13118,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField2(ctx context.Context, iprot thri
tSlice := make([]string, 0, size)
p.Paths = tSlice
for i := 0; i < size; i ++ {
-var _elem148 string
+var _elem142 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem148 = v
+ _elem142 = v
}
- p.Paths = append(p.Paths, _elem148)
+ p.Paths = append(p.Paths, _elem142)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12825,13 +13140,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField3(ctx context.Context, iprot thri
tSlice := make([]int32, 0, size)
p.DataTypes = tSlice
for i := 0; i < size; i ++ {
-var _elem149 int32
+var _elem143 int32
if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem149 = v
+ _elem143 = v
}
- p.DataTypes = append(p.DataTypes, _elem149)
+ p.DataTypes = append(p.DataTypes, _elem143)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12847,13 +13162,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField4(ctx context.Context, iprot thri
tSlice := make([]int32, 0, size)
p.Encodings = tSlice
for i := 0; i < size; i ++ {
-var _elem150 int32
+var _elem144 int32
if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem150 = v
+ _elem144 = v
}
- p.Encodings = append(p.Encodings, _elem150)
+ p.Encodings = append(p.Encodings, _elem144)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12869,13 +13184,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField5(ctx context.Context, iprot thri
tSlice := make([]int32, 0, size)
p.Compressors = tSlice
for i := 0; i < size; i ++ {
-var _elem151 int32
+var _elem145 int32
if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem151 = v
+ _elem145 = v
}
- p.Compressors = append(p.Compressors, _elem151)
+ p.Compressors = append(p.Compressors, _elem145)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12896,26 +13211,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField6(ctx context.Context, iprot thri
return thrift.PrependError("error reading map begin: ", err)
}
tMap := make(map[string]string, size)
- _elem152 := tMap
+ _elem146 := tMap
for i := 0; i < size; i ++ {
-var _key153 string
+var _key147 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _key153 = v
+ _key147 = v
}
-var _val154 string
+var _val148 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _val154 = v
+ _val148 = v
}
- _elem152[_key153] = _val154
+ _elem146[_key147] = _val148
}
if err := iprot.ReadMapEnd(ctx); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
- p.PropsList = append(p.PropsList, _elem152)
+ p.PropsList = append(p.PropsList, _elem146)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12936,26 +13251,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField7(ctx context.Context, iprot thri
return thrift.PrependError("error reading map begin: ", err)
}
tMap := make(map[string]string, size)
- _elem155 := tMap
+ _elem149 := tMap
for i := 0; i < size; i ++ {
-var _key156 string
+var _key150 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _key156 = v
+ _key150 = v
}
-var _val157 string
+var _val151 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _val157 = v
+ _val151 = v
}
- _elem155[_key156] = _val157
+ _elem149[_key150] = _val151
}
if err := iprot.ReadMapEnd(ctx); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
- p.TagsList = append(p.TagsList, _elem155)
+ p.TagsList = append(p.TagsList, _elem149)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -12976,26 +13291,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField8(ctx context.Context, iprot thri
return thrift.PrependError("error reading map begin: ", err)
}
tMap := make(map[string]string, size)
- _elem158 := tMap
+ _elem152 := tMap
for i := 0; i < size; i ++ {
-var _key159 string
+var _key153 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _key159 = v
+ _key153 = v
}
-var _val160 string
+var _val154 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _val160 = v
+ _val154 = v
}
- _elem158[_key159] = _val160
+ _elem152[_key153] = _val154
}
if err := iprot.ReadMapEnd(ctx); err != nil {
return thrift.PrependError("error reading map end: ", err)
}
- p.AttributesList = append(p.AttributesList, _elem158)
+ p.AttributesList = append(p.AttributesList, _elem152)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -13011,13 +13326,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField9(ctx context.Context, iprot thri
tSlice := make([]string, 0, size)
p.MeasurementAliasList = tSlice
for i := 0; i < size; i ++ {
-var _elem161 string
+var _elem155 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem161 = v
+ _elem155 = v
}
- p.MeasurementAliasList = append(p.MeasurementAliasList, _elem161)
+ p.MeasurementAliasList = append(p.MeasurementAliasList, _elem155)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -13247,55 +13562,55 @@ func (p *TSCreateMultiTimeseriesReq) Equals(other *TSCreateMultiTimeseriesReq) b
if p.SessionId != other.SessionId { return false }
if len(p.Paths) != len(other.Paths) { return false }
for i, _tgt := range p.Paths {
- _src162 := other.Paths[i]
- if _tgt != _src162 { return false }
+ _src156 := other.Paths[i]
+ if _tgt != _src156 { return false }
}
if len(p.DataTypes) != len(other.DataTypes) { return false }
for i, _tgt := range p.DataTypes {
- _src163 := other.DataTypes[i]
- if _tgt != _src163 { return false }
+ _src157 := other.DataTypes[i]
+ if _tgt != _src157 { return false }
}
if len(p.Encodings) != len(other.Encodings) { return false }
for i, _tgt := range p.Encodings {
- _src164 := other.Encodings[i]
- if _tgt != _src164 { return false }
+ _src158 := other.Encodings[i]
+ if _tgt != _src158 { return false }
}
if len(p.Compressors) != len(other.Compressors) { return false }
for i, _tgt := range p.Compressors {
- _src165 := other.Compressors[i]
- if _tgt != _src165 { return false }
+ _src159 := other.Compressors[i]
+ if _tgt != _src159 { return false }
}
if len(p.PropsList) != len(other.PropsList) { return false }
for i, _tgt := range p.PropsList {
- _src166 := other.PropsList[i]
- if len(_tgt) != len(_src166) { return false }
+ _src160 := other.PropsList[i]
+ if len(_tgt) != len(_src160) { return false }
for k, _tgt := range _tgt {
- _src167 := _src166[k]
- if _tgt != _src167 { return false }
+ _src161 := _src160[k]
+ if _tgt != _src161 { return false }
}
}
if len(p.TagsList) != len(other.TagsList) { return false }
for i, _tgt := range p.TagsList {
- _src168 := other.TagsList[i]
- if len(_tgt) != len(_src168) { return false }
+ _src162 := other.TagsList[i]
+ if len(_tgt) != len(_src162) { return false }
for k, _tgt := range _tgt {
- _src169 := _src168[k]
- if _tgt != _src169 { return false }
+ _src163 := _src162[k]
+ if _tgt != _src163 { return false }
}
}
if len(p.AttributesList) != len(other.AttributesList) { return false }
for i, _tgt := range p.AttributesList {
- _src170 := other.AttributesList[i]
- if len(_tgt) != len(_src170) { return false }
+ _src164 := other.AttributesList[i]
+ if len(_tgt) != len(_src164) { return false }
for k, _tgt := range _tgt {
- _src171 := _src170[k]
- if _tgt != _src171 { return false }
+ _src165 := _src164[k]
+ if _tgt != _src165 { return false }
}
}
if len(p.MeasurementAliasList) != len(other.MeasurementAliasList) { return false }
for i, _tgt := range p.MeasurementAliasList {
- _src172 := other.MeasurementAliasList[i]
- if _tgt != _src172 { return false }
+ _src166 := other.MeasurementAliasList[i]
+ if _tgt != _src166 { return false }
}
return true
}
@@ -13623,13 +13938,13 @@ func (p *ServerProperties) ReadField2(ctx context.Context, iprot thrift.TProtoc
tSlice := make([]string, 0, size)
p.SupportedTimeAggregationOperations = tSlice
for i := 0; i < size; i ++ {
-var _elem173 string
+var _elem167 string
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 0: ", err)
} else {
- _elem173 = v
+ _elem167 = v
}
- p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem173)
+ p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem167)
}
if err := iprot.ReadListEnd(ctx); err != nil {
return thrift.PrependError("error reading list end: ", err)
@@ -13895,112 +14210,520 @@ func (p *ServerProperties) writeField12(ctx context.Context, oprot thrift.TProto
return err
}
-func (p *ServerProperties) Equals(other *ServerProperties) bool {
+func (p *ServerProperties) Equals(other *ServerProperties) bool {
+ if p == other {
+ return true
+ } else if p == nil || other == nil {
+ return false
+ }
+ if p.Version != other.Version { return false }
+ if len(p.SupportedTimeAggregationOperations) != len(other.SupportedTimeAggregationOperations) { return false }
+ for i, _tgt := range p.SupportedTimeAggregationOperations {
+ _src168 := other.SupportedTimeAggregationOperations[i]
+ if _tgt != _src168 { return false }
+ }
+ if p.TimestampPrecision != other.TimestampPrecision { return false }
+ if p.MaxConcurrentClientNum != other.MaxConcurrentClientNum { return false }
+ if p.WatermarkSecretKey != other.WatermarkSecretKey {
+ if p.WatermarkSecretKey == nil || other.WatermarkSecretKey == nil {
+ return false
+ }
+ if (*p.WatermarkSecretKey) != (*other.WatermarkSecretKey) { return false }
+ }
+ if p.WatermarkBitString != other.WatermarkBitString {
+ if p.WatermarkBitString == nil || other.WatermarkBitString == nil {
+ return false
+ }
+ if (*p.WatermarkBitString) != (*other.WatermarkBitString) { return false }
+ }
+ if p.WatermarkParamMarkRate != other.WatermarkParamMarkRate {
+ if p.WatermarkParamMarkRate == nil || other.WatermarkParamMarkRate == nil {
+ return false
+ }
+ if (*p.WatermarkParamMarkRate) != (*other.WatermarkParamMarkRate) { return false }
+ }
+ if p.WatermarkParamMaxRightBit != other.WatermarkParamMaxRightBit {
+ if p.WatermarkParamMaxRightBit == nil || other.WatermarkParamMaxRightBit == nil {
+ return false
+ }
+ if (*p.WatermarkParamMaxRightBit) != (*other.WatermarkParamMaxRightBit) { return false }
+ }
+ if p.ThriftMaxFrameSize != other.ThriftMaxFrameSize {
+ if p.ThriftMaxFrameSize == nil || other.ThriftMaxFrameSize == nil {
+ return false
+ }
+ if (*p.ThriftMaxFrameSize) != (*other.ThriftMaxFrameSize) { return false }
+ }
+ if p.IsReadOnly != other.IsReadOnly {
+ if p.IsReadOnly == nil || other.IsReadOnly == nil {
+ return false
+ }
+ if (*p.IsReadOnly) != (*other.IsReadOnly) { return false }
+ }
+ if p.BuildInfo != other.BuildInfo {
+ if p.BuildInfo == nil || other.BuildInfo == nil {
+ return false
+ }
+ if (*p.BuildInfo) != (*other.BuildInfo) { return false }
+ }
+ if p.Logo != other.Logo {
+ if p.Logo == nil || other.Logo == nil {
+ return false
+ }
+ if (*p.Logo) != (*other.Logo) { return false }
+ }
+ return true
+}
+
+func (p *ServerProperties) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ServerProperties(%+v)", *p)
+}
+
+// Attributes:
+// - SessionId
+// - TemplateName
+// - PrefixPath
+type TSSetSchemaTemplateReq struct {
+ SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
+ TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"`
+ PrefixPath string `thrift:"prefixPath,3,required" db:"prefixPath" json:"prefixPath"`
+}
+
+func NewTSSetSchemaTemplateReq() *TSSetSchemaTemplateReq {
+ return &TSSetSchemaTemplateReq{}
+}
+
+
+func (p *TSSetSchemaTemplateReq) GetSessionId() int64 {
+ return p.SessionId
+}
+
+func (p *TSSetSchemaTemplateReq) GetTemplateName() string {
+ return p.TemplateName
+}
+
+func (p *TSSetSchemaTemplateReq) GetPrefixPath() string {
+ return p.PrefixPath
+}
+func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+ var issetSessionId bool = false;
+ var issetTemplateName bool = false;
+ var issetPrefixPath bool = false;
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField1(ctx, iprot); err != nil {
+ return err
+ }
+ issetSessionId = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField2(ctx, iprot); err != nil {
+ return err
+ }
+ issetTemplateName = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField3(ctx, iprot); err != nil {
+ return err
+ }
+ issetPrefixPath = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(ctx); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ if !issetSessionId{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
+ }
+ if !issetTemplateName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
+ }
+ if !issetPrefixPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
+ }
+ return nil
+}
+
+func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.SessionId = v
+}
+ return nil
+}
+
+func (p *TSSetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.TemplateName = v
+}
+ return nil
+}
+
+func (p *TSSetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.PrefixPath = v
+}
+ return nil
+}
+
+func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSSetSchemaTemplateReq"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(ctx, oprot); err != nil { return err }
+ if err := p.writeField2(ctx, oprot); err != nil { return err }
+ if err := p.writeField3(ctx, oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(ctx); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(ctx); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) }
+ return err
+}
+
+func (p *TSSetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) }
+ return err
+}
+
+func (p *TSSetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) }
+ return err
+}
+
+func (p *TSSetSchemaTemplateReq) Equals(other *TSSetSchemaTemplateReq) bool {
+ if p == other {
+ return true
+ } else if p == nil || other == nil {
+ return false
+ }
+ if p.SessionId != other.SessionId { return false }
+ if p.TemplateName != other.TemplateName { return false }
+ if p.PrefixPath != other.PrefixPath { return false }
+ return true
+}
+
+func (p *TSSetSchemaTemplateReq) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("TSSetSchemaTemplateReq(%+v)", *p)
+}
+
+// Attributes:
+// - SessionId
+// - Name
+// - SerializedTemplate
+type TSCreateSchemaTemplateReq struct {
+ SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
+ Name string `thrift:"name,2,required" db:"name" json:"name"`
+ SerializedTemplate []byte `thrift:"serializedTemplate,3,required" db:"serializedTemplate" json:"serializedTemplate"`
+}
+
+func NewTSCreateSchemaTemplateReq() *TSCreateSchemaTemplateReq {
+ return &TSCreateSchemaTemplateReq{}
+}
+
+
+func (p *TSCreateSchemaTemplateReq) GetSessionId() int64 {
+ return p.SessionId
+}
+
+func (p *TSCreateSchemaTemplateReq) GetName() string {
+ return p.Name
+}
+
+func (p *TSCreateSchemaTemplateReq) GetSerializedTemplate() []byte {
+ return p.SerializedTemplate
+}
+func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+ var issetSessionId bool = false;
+ var issetName bool = false;
+ var issetSerializedTemplate bool = false;
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField1(ctx, iprot); err != nil {
+ return err
+ }
+ issetSessionId = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField2(ctx, iprot); err != nil {
+ return err
+ }
+ issetName = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField3(ctx, iprot); err != nil {
+ return err
+ }
+ issetSerializedTemplate = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(ctx); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ if !issetSessionId{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
+ }
+ if !issetName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
+ }
+ if !issetSerializedTemplate{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SerializedTemplate is not set"));
+ }
+ return nil
+}
+
+func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.SessionId = v
+}
+ return nil
+}
+
+func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Name = v
+}
+ return nil
+}
+
+func (p *TSCreateSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBinary(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.SerializedTemplate = v
+}
+ return nil
+}
+
+func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSCreateSchemaTemplateReq"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(ctx, oprot); err != nil { return err }
+ if err := p.writeField2(ctx, oprot); err != nil { return err }
+ if err := p.writeField3(ctx, oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(ctx); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(ctx); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) }
+ return err
+}
+
+func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) }
+ return err
+}
+
+func (p *TSCreateSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "serializedTemplate", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serializedTemplate: ", p), err) }
+ if err := oprot.WriteBinary(ctx, p.SerializedTemplate); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.serializedTemplate (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serializedTemplate: ", p), err) }
+ return err
+}
+
+func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
- if p.Version != other.Version { return false }
- if len(p.SupportedTimeAggregationOperations) != len(other.SupportedTimeAggregationOperations) { return false }
- for i, _tgt := range p.SupportedTimeAggregationOperations {
- _src174 := other.SupportedTimeAggregationOperations[i]
- if _tgt != _src174 { return false }
- }
- if p.TimestampPrecision != other.TimestampPrecision { return false }
- if p.MaxConcurrentClientNum != other.MaxConcurrentClientNum { return false }
- if p.WatermarkSecretKey != other.WatermarkSecretKey {
- if p.WatermarkSecretKey == nil || other.WatermarkSecretKey == nil {
- return false
- }
- if (*p.WatermarkSecretKey) != (*other.WatermarkSecretKey) { return false }
- }
- if p.WatermarkBitString != other.WatermarkBitString {
- if p.WatermarkBitString == nil || other.WatermarkBitString == nil {
- return false
- }
- if (*p.WatermarkBitString) != (*other.WatermarkBitString) { return false }
- }
- if p.WatermarkParamMarkRate != other.WatermarkParamMarkRate {
- if p.WatermarkParamMarkRate == nil || other.WatermarkParamMarkRate == nil {
- return false
- }
- if (*p.WatermarkParamMarkRate) != (*other.WatermarkParamMarkRate) { return false }
- }
- if p.WatermarkParamMaxRightBit != other.WatermarkParamMaxRightBit {
- if p.WatermarkParamMaxRightBit == nil || other.WatermarkParamMaxRightBit == nil {
- return false
- }
- if (*p.WatermarkParamMaxRightBit) != (*other.WatermarkParamMaxRightBit) { return false }
- }
- if p.ThriftMaxFrameSize != other.ThriftMaxFrameSize {
- if p.ThriftMaxFrameSize == nil || other.ThriftMaxFrameSize == nil {
- return false
- }
- if (*p.ThriftMaxFrameSize) != (*other.ThriftMaxFrameSize) { return false }
- }
- if p.IsReadOnly != other.IsReadOnly {
- if p.IsReadOnly == nil || other.IsReadOnly == nil {
- return false
- }
- if (*p.IsReadOnly) != (*other.IsReadOnly) { return false }
- }
- if p.BuildInfo != other.BuildInfo {
- if p.BuildInfo == nil || other.BuildInfo == nil {
- return false
- }
- if (*p.BuildInfo) != (*other.BuildInfo) { return false }
- }
- if p.Logo != other.Logo {
- if p.Logo == nil || other.Logo == nil {
- return false
- }
- if (*p.Logo) != (*other.Logo) { return false }
- }
+ if p.SessionId != other.SessionId { return false }
+ if p.Name != other.Name { return false }
+ if bytes.Compare(p.SerializedTemplate, other.SerializedTemplate) != 0 { return false }
return true
}
-func (p *ServerProperties) String() string {
+func (p *TSCreateSchemaTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("ServerProperties(%+v)", *p)
+ return fmt.Sprintf("TSCreateSchemaTemplateReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - TemplateName
-// - PrefixPath
-type TSSetSchemaTemplateReq struct {
+// - Name
+// - IsAligned
+// - Measurements
+// - DataTypes
+// - Encodings
+// - Compressors
+type TSAppendSchemaTemplateReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"`
- PrefixPath string `thrift:"prefixPath,3,required" db:"prefixPath" json:"prefixPath"`
+ Name string `thrift:"name,2,required" db:"name" json:"name"`
+ IsAligned bool `thrift:"isAligned,3,required" db:"isAligned" json:"isAligned"`
+ Measurements []string `thrift:"measurements,4,required" db:"measurements" json:"measurements"`
+ DataTypes []int32 `thrift:"dataTypes,5,required" db:"dataTypes" json:"dataTypes"`
+ Encodings []int32 `thrift:"encodings,6,required" db:"encodings" json:"encodings"`
+ Compressors []int32 `thrift:"compressors,7,required" db:"compressors" json:"compressors"`
}
-func NewTSSetSchemaTemplateReq() *TSSetSchemaTemplateReq {
- return &TSSetSchemaTemplateReq{}
+func NewTSAppendSchemaTemplateReq() *TSAppendSchemaTemplateReq {
+ return &TSAppendSchemaTemplateReq{}
}
-func (p *TSSetSchemaTemplateReq) GetSessionId() int64 {
+func (p *TSAppendSchemaTemplateReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSSetSchemaTemplateReq) GetTemplateName() string {
- return p.TemplateName
+func (p *TSAppendSchemaTemplateReq) GetName() string {
+ return p.Name
}
-func (p *TSSetSchemaTemplateReq) GetPrefixPath() string {
- return p.PrefixPath
+func (p *TSAppendSchemaTemplateReq) GetIsAligned() bool {
+ return p.IsAligned
}
-func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+
+func (p *TSAppendSchemaTemplateReq) GetMeasurements() []string {
+ return p.Measurements
+}
+
+func (p *TSAppendSchemaTemplateReq) GetDataTypes() []int32 {
+ return p.DataTypes
+}
+
+func (p *TSAppendSchemaTemplateReq) GetEncodings() []int32 {
+ return p.Encodings
+}
+
+func (p *TSAppendSchemaTemplateReq) GetCompressors() []int32 {
+ return p.Compressors
+}
+func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetTemplateName bool = false;
- var issetPrefixPath bool = false;
+ var issetName bool = false;
+ var issetIsAligned bool = false;
+ var issetMeasurements bool = false;
+ var issetDataTypes bool = false;
+ var issetEncodings bool = false;
+ var issetCompressors bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -14025,18 +14748,62 @@ func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoco
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetTemplateName = true
+ issetName = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.BOOL {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetPrefixPath = true
+ issetIsAligned = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField4(ctx, iprot); err != nil {
+ return err
+ }
+ issetMeasurements = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 5:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField5(ctx, iprot); err != nil {
+ return err
+ }
+ issetDataTypes = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 6:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField6(ctx, iprot); err != nil {
+ return err
+ }
+ issetEncodings = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 7:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField7(ctx, iprot); err != nil {
+ return err
+ }
+ issetCompressors = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -14057,49 +14824,153 @@ func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoco
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetTemplateName{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
+ if !issetName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
}
- if !issetPrefixPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
+ if !issetIsAligned{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAligned is not set"));
+ }
+ if !issetMeasurements{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set"));
+ }
+ if !issetDataTypes{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set"));
+ }
+ if !issetEncodings{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set"));
+ }
+ if !issetCompressors{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set"));
}
return nil
}
-func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
- p.SessionId = v
+ p.SessionId = v
+}
+ return nil
+}
+
+func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Name = v
+}
+ return nil
+}
+
+func (p *TSAppendSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.IsAligned = v
+}
+ return nil
+}
+
+func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.Measurements = tSlice
+ for i := 0; i < size; i ++ {
+var _elem169 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _elem169 = v
+}
+ p.Measurements = append(p.Measurements, _elem169)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]int32, 0, size)
+ p.DataTypes = tSlice
+ for i := 0; i < size; i ++ {
+var _elem170 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _elem170 = v
}
+ p.DataTypes = append(p.DataTypes, _elem170)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSSetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
+func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]int32, 0, size)
+ p.Encodings = tSlice
+ for i := 0; i < size; i ++ {
+var _elem171 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.TemplateName = v
+ _elem171 = v
}
+ p.Encodings = append(p.Encodings, _elem171)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSSetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
+func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]int32, 0, size)
+ p.Compressors = tSlice
+ for i := 0; i < size; i ++ {
+var _elem172 int32
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.PrefixPath = v
+ _elem172 = v
}
+ p.Compressors = append(p.Compressors, _elem172)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSSetSchemaTemplateReq"); err != nil {
+func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSAppendSchemaTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
+ if err := p.writeField4(ctx, oprot); err != nil { return err }
+ if err := p.writeField5(ctx, oprot); err != nil { return err }
+ if err := p.writeField6(ctx, oprot); err != nil { return err }
+ if err := p.writeField7(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -14108,7 +14979,7 @@ func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtoc
return nil
}
-func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -14118,79 +14989,171 @@ func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.T
return err
}
-func (p *TSSetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) }
+func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) }
return err
}
-func (p *TSSetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) }
+func (p *TSAppendSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAligned: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(p.IsAligned)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.isAligned (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAligned: ", p), err) }
return err
}
-func (p *TSSetSchemaTemplateReq) Equals(other *TSSetSchemaTemplateReq) bool {
+func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurements: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Measurements {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurements: ", p), err) }
+ return err
+}
+
+func (p *TSAppendSchemaTemplateReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataTypes: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.DataTypes {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataTypes: ", p), err) }
+ return err
+}
+
+func (p *TSAppendSchemaTemplateReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:encodings: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Encodings {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:encodings: ", p), err) }
+ return err
+}
+
+func (p *TSAppendSchemaTemplateReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 7); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:compressors: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Compressors {
+ if err := oprot.WriteI32(ctx, int32(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 7:compressors: ", p), err) }
+ return err
+}
+
+func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if p.TemplateName != other.TemplateName { return false }
- if p.PrefixPath != other.PrefixPath { return false }
+ if p.Name != other.Name { return false }
+ if p.IsAligned != other.IsAligned { return false }
+ if len(p.Measurements) != len(other.Measurements) { return false }
+ for i, _tgt := range p.Measurements {
+ _src173 := other.Measurements[i]
+ if _tgt != _src173 { return false }
+ }
+ if len(p.DataTypes) != len(other.DataTypes) { return false }
+ for i, _tgt := range p.DataTypes {
+ _src174 := other.DataTypes[i]
+ if _tgt != _src174 { return false }
+ }
+ if len(p.Encodings) != len(other.Encodings) { return false }
+ for i, _tgt := range p.Encodings {
+ _src175 := other.Encodings[i]
+ if _tgt != _src175 { return false }
+ }
+ if len(p.Compressors) != len(other.Compressors) { return false }
+ for i, _tgt := range p.Compressors {
+ _src176 := other.Compressors[i]
+ if _tgt != _src176 { return false }
+ }
return true
}
-func (p *TSSetSchemaTemplateReq) String() string {
+func (p *TSAppendSchemaTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSSetSchemaTemplateReq(%+v)", *p)
+ return fmt.Sprintf("TSAppendSchemaTemplateReq(%+v)", *p)
}
// Attributes:
// - SessionId
// - Name
-// - SerializedTemplate
-type TSCreateSchemaTemplateReq struct {
+// - Path
+type TSPruneSchemaTemplateReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
Name string `thrift:"name,2,required" db:"name" json:"name"`
- SerializedTemplate []byte `thrift:"serializedTemplate,3,required" db:"serializedTemplate" json:"serializedTemplate"`
+ Path string `thrift:"path,3,required" db:"path" json:"path"`
}
-func NewTSCreateSchemaTemplateReq() *TSCreateSchemaTemplateReq {
- return &TSCreateSchemaTemplateReq{}
+func NewTSPruneSchemaTemplateReq() *TSPruneSchemaTemplateReq {
+ return &TSPruneSchemaTemplateReq{}
}
-func (p *TSCreateSchemaTemplateReq) GetSessionId() int64 {
+func (p *TSPruneSchemaTemplateReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSCreateSchemaTemplateReq) GetName() string {
+func (p *TSPruneSchemaTemplateReq) GetName() string {
return p.Name
}
-func (p *TSCreateSchemaTemplateReq) GetSerializedTemplate() []byte {
- return p.SerializedTemplate
+func (p *TSPruneSchemaTemplateReq) GetPath() string {
+ return p.Path
}
-func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
var issetName bool = false;
- var issetSerializedTemplate bool = false;
+ var issetPath bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -14226,7 +15189,7 @@ func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetSerializedTemplate = true
+ issetPath = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -14250,13 +15213,13 @@ func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt
if !issetName{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
}
- if !issetSerializedTemplate{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SerializedTemplate is not set"));
+ if !issetPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set"));
}
return nil
}
-func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -14265,7 +15228,7 @@ func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrif
return nil
}
-func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSPruneSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
@@ -14274,17 +15237,17 @@ func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrif
return nil
}
-func (p *TSCreateSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBinary(ctx); err != nil {
+func (p *TSPruneSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
- p.SerializedTemplate = v
+ p.Path = v
}
return nil
}
-func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSCreateSchemaTemplateReq"); err != nil {
+func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSPruneSchemaTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
@@ -14298,7 +15261,7 @@ func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TPro
return nil
}
-func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -14308,7 +15271,7 @@ func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrif
return err
}
-func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSPruneSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
@@ -14318,17 +15281,17 @@ func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrif
return err
}
-func (p *TSCreateSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "serializedTemplate", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serializedTemplate: ", p), err) }
- if err := oprot.WriteBinary(ctx, p.SerializedTemplate); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.serializedTemplate (3) field write error: ", p), err) }
+func (p *TSPruneSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:path: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.Path)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.path (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serializedTemplate: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:path: ", p), err) }
return err
}
-func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) bool {
+func (p *TSPruneSchemaTemplateReq) Equals(other *TSPruneSchemaTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -14336,79 +15299,64 @@ func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) boo
}
if p.SessionId != other.SessionId { return false }
if p.Name != other.Name { return false }
- if bytes.Compare(p.SerializedTemplate, other.SerializedTemplate) != 0 { return false }
+ if p.Path != other.Path { return false }
return true
}
-func (p *TSCreateSchemaTemplateReq) String() string {
+func (p *TSPruneSchemaTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSCreateSchemaTemplateReq(%+v)", *p)
+ return fmt.Sprintf("TSPruneSchemaTemplateReq(%+v)", *p)
}
// Attributes:
// - SessionId
// - Name
-// - IsAligned
-// - Measurements
-// - DataTypes
-// - Encodings
-// - Compressors
-type TSAppendSchemaTemplateReq struct {
+// - QueryType
+// - Measurement
+type TSQueryTemplateReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
Name string `thrift:"name,2,required" db:"name" json:"name"`
- IsAligned bool `thrift:"isAligned,3,required" db:"isAligned" json:"isAligned"`
- Measurements []string `thrift:"measurements,4,required" db:"measurements" json:"measurements"`
- DataTypes []int32 `thrift:"dataTypes,5,required" db:"dataTypes" json:"dataTypes"`
- Encodings []int32 `thrift:"encodings,6,required" db:"encodings" json:"encodings"`
- Compressors []int32 `thrift:"compressors,7,required" db:"compressors" json:"compressors"`
+ QueryType int32 `thrift:"queryType,3,required" db:"queryType" json:"queryType"`
+ Measurement *string `thrift:"measurement,4" db:"measurement" json:"measurement,omitempty"`
}
-func NewTSAppendSchemaTemplateReq() *TSAppendSchemaTemplateReq {
- return &TSAppendSchemaTemplateReq{}
+func NewTSQueryTemplateReq() *TSQueryTemplateReq {
+ return &TSQueryTemplateReq{}
}
-func (p *TSAppendSchemaTemplateReq) GetSessionId() int64 {
+func (p *TSQueryTemplateReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSAppendSchemaTemplateReq) GetName() string {
+func (p *TSQueryTemplateReq) GetName() string {
return p.Name
}
-func (p *TSAppendSchemaTemplateReq) GetIsAligned() bool {
- return p.IsAligned
-}
-
-func (p *TSAppendSchemaTemplateReq) GetMeasurements() []string {
- return p.Measurements
+func (p *TSQueryTemplateReq) GetQueryType() int32 {
+ return p.QueryType
}
-
-func (p *TSAppendSchemaTemplateReq) GetDataTypes() []int32 {
- return p.DataTypes
+var TSQueryTemplateReq_Measurement_DEFAULT string
+func (p *TSQueryTemplateReq) GetMeasurement() string {
+ if !p.IsSetMeasurement() {
+ return TSQueryTemplateReq_Measurement_DEFAULT
+ }
+return *p.Measurement
}
-
-func (p *TSAppendSchemaTemplateReq) GetEncodings() []int32 {
- return p.Encodings
+func (p *TSQueryTemplateReq) IsSetMeasurement() bool {
+ return p.Measurement != nil
}
-func (p *TSAppendSchemaTemplateReq) GetCompressors() []int32 {
- return p.Compressors
-}
-func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
var issetName bool = false;
- var issetIsAligned bool = false;
- var issetMeasurements bool = false;
- var issetDataTypes bool = false;
- var issetEncodings bool = false;
- var issetCompressors bool = false;
+ var issetQueryType bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -14440,55 +15388,21 @@ func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt
}
}
case 3:
- if fieldTypeId == thrift.BOOL {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetIsAligned = true
+ issetQueryType = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 4:
- if fieldTypeId == thrift.LIST {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField4(ctx, iprot); err != nil {
return err
}
- issetMeasurements = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 5:
- if fieldTypeId == thrift.LIST {
- if err := p.ReadField5(ctx, iprot); err != nil {
- return err
- }
- issetDataTypes = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 6:
- if fieldTypeId == thrift.LIST {
- if err := p.ReadField6(ctx, iprot); err != nil {
- return err
- }
- issetEncodings = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 7:
- if fieldTypeId == thrift.LIST {
- if err := p.ReadField7(ctx, iprot); err != nil {
- return err
- }
- issetCompressors = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -14512,25 +15426,13 @@ func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt
if !issetName{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
}
- if !issetIsAligned{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAligned is not set"));
- }
- if !issetMeasurements{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set"));
- }
- if !issetDataTypes{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set"));
- }
- if !issetEncodings{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set"));
- }
- if !issetCompressors{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set"));
+ if !issetQueryType{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set"));
}
return nil
}
-func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -14539,7 +15441,7 @@ func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrif
return nil
}
-func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
@@ -14548,114 +15450,32 @@ func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrif
return nil
}
-func (p *TSAppendSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
+func (p *TSQueryTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
return thrift.PrependError("error reading field 3: ", err)
} else {
- p.IsAligned = v
-}
- return nil
-}
-
-func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.Measurements = tSlice
- for i := 0; i < size; i ++ {
-var _elem175 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem175 = v
-}
- p.Measurements = append(p.Measurements, _elem175)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.DataTypes = tSlice
- for i := 0; i < size; i ++ {
-var _elem176 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem176 = v
-}
- p.DataTypes = append(p.DataTypes, _elem176)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.Encodings = tSlice
- for i := 0; i < size; i ++ {
-var _elem177 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
-} else {
- _elem177 = v
+ p.QueryType = v
}
- p.Encodings = append(p.Encodings, _elem177)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]int32, 0, size)
- p.Compressors = tSlice
- for i := 0; i < size; i ++ {
-var _elem178 int32
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSQueryTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
} else {
- _elem178 = v
+ p.Measurement = &v
}
- p.Compressors = append(p.Compressors, _elem178)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSAppendSchemaTemplateReq"); err != nil {
+func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
if err := p.writeField4(ctx, oprot); err != nil { return err }
- if err := p.writeField5(ctx, oprot); err != nil { return err }
- if err := p.writeField6(ctx, oprot); err != nil { return err }
- if err := p.writeField7(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -14664,7 +15484,7 @@ func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TPro
return nil
}
-func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -14674,7 +15494,7 @@ func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrif
return err
}
-func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
@@ -14684,89 +15504,29 @@ func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrif
return err
}
-func (p *TSAppendSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAligned: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(p.IsAligned)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.isAligned (3) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAligned: ", p), err) }
- return err
-}
-
-func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurements: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Measurements {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurements: ", p), err) }
- return err
-}
-
-func (p *TSAppendSchemaTemplateReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataTypes: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.DataTypes {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataTypes: ", p), err) }
- return err
-}
-
-func (p *TSAppendSchemaTemplateReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:encodings: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Encodings {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
+func (p *TSQueryTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queryType: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.queryType (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:encodings: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queryType: ", p), err) }
return err
}
-func (p *TSAppendSchemaTemplateReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 7); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:compressors: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Compressors {
- if err := oprot.WriteI32(ctx, int32(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
+func (p *TSQueryTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetMeasurement() {
+ if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) }
+ if err := oprot.WriteString(ctx, string(*p.Measurement)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) }
}
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 7:compressors: ", p), err) }
return err
}
-func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) bool {
+func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
@@ -14774,71 +15534,94 @@ func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) boo
}
if p.SessionId != other.SessionId { return false }
if p.Name != other.Name { return false }
- if p.IsAligned != other.IsAligned { return false }
- if len(p.Measurements) != len(other.Measurements) { return false }
- for i, _tgt := range p.Measurements {
- _src179 := other.Measurements[i]
- if _tgt != _src179 { return false }
- }
- if len(p.DataTypes) != len(other.DataTypes) { return false }
- for i, _tgt := range p.DataTypes {
- _src180 := other.DataTypes[i]
- if _tgt != _src180 { return false }
- }
- if len(p.Encodings) != len(other.Encodings) { return false }
- for i, _tgt := range p.Encodings {
- _src181 := other.Encodings[i]
- if _tgt != _src181 { return false }
- }
- if len(p.Compressors) != len(other.Compressors) { return false }
- for i, _tgt := range p.Compressors {
- _src182 := other.Compressors[i]
- if _tgt != _src182 { return false }
+ if p.QueryType != other.QueryType { return false }
+ if p.Measurement != other.Measurement {
+ if p.Measurement == nil || other.Measurement == nil {
+ return false
+ }
+ if (*p.Measurement) != (*other.Measurement) { return false }
}
return true
}
-func (p *TSAppendSchemaTemplateReq) String() string {
+func (p *TSQueryTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSAppendSchemaTemplateReq(%+v)", *p)
+ return fmt.Sprintf("TSQueryTemplateReq(%+v)", *p)
}
// Attributes:
-// - SessionId
-// - Name
-// - Path
-type TSPruneSchemaTemplateReq struct {
- SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- Name string `thrift:"name,2,required" db:"name" json:"name"`
- Path string `thrift:"path,3,required" db:"path" json:"path"`
+// - Status
+// - QueryType
+// - Result_
+// - Count
+// - Measurements
+type TSQueryTemplateResp struct {
+ Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"`
+ QueryType int32 `thrift:"queryType,2,required" db:"queryType" json:"queryType"`
+ Result_ *bool `thrift:"result,3" db:"result" json:"result,omitempty"`
+ Count *int32 `thrift:"count,4" db:"count" json:"count,omitempty"`
+ Measurements []string `thrift:"measurements,5" db:"measurements" json:"measurements,omitempty"`
}
-func NewTSPruneSchemaTemplateReq() *TSPruneSchemaTemplateReq {
- return &TSPruneSchemaTemplateReq{}
+func NewTSQueryTemplateResp() *TSQueryTemplateResp {
+ return &TSQueryTemplateResp{}
}
+var TSQueryTemplateResp_Status_DEFAULT *common.TSStatus
+func (p *TSQueryTemplateResp) GetStatus() *common.TSStatus {
+ if !p.IsSetStatus() {
+ return TSQueryTemplateResp_Status_DEFAULT
+ }
+return p.Status
+}
-func (p *TSPruneSchemaTemplateReq) GetSessionId() int64 {
- return p.SessionId
+func (p *TSQueryTemplateResp) GetQueryType() int32 {
+ return p.QueryType
+}
+var TSQueryTemplateResp_Result__DEFAULT bool
+func (p *TSQueryTemplateResp) GetResult_() bool {
+ if !p.IsSetResult_() {
+ return TSQueryTemplateResp_Result__DEFAULT
+ }
+return *p.Result_
+}
+var TSQueryTemplateResp_Count_DEFAULT int32
+func (p *TSQueryTemplateResp) GetCount() int32 {
+ if !p.IsSetCount() {
+ return TSQueryTemplateResp_Count_DEFAULT
+ }
+return *p.Count
}
+var TSQueryTemplateResp_Measurements_DEFAULT []string
-func (p *TSPruneSchemaTemplateReq) GetName() string {
- return p.Name
+func (p *TSQueryTemplateResp) GetMeasurements() []string {
+ return p.Measurements
+}
+func (p *TSQueryTemplateResp) IsSetStatus() bool {
+ return p.Status != nil
}
-func (p *TSPruneSchemaTemplateReq) GetPath() string {
- return p.Path
+func (p *TSQueryTemplateResp) IsSetResult_() bool {
+ return p.Result_ != nil
}
-func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+
+func (p *TSQueryTemplateResp) IsSetCount() bool {
+ return p.Count != nil
+}
+
+func (p *TSQueryTemplateResp) IsSetMeasurements() bool {
+ return p.Measurements != nil
+}
+
+func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
- var issetSessionId bool = false;
- var issetName bool = false;
- var issetPath bool = false;
+ var issetStatus bool = false;
+ var issetQueryType bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -14848,33 +15631,52 @@ func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto
if fieldTypeId == thrift.STOP { break; }
switch fieldId {
case 1:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.STRUCT {
if err := p.ReadField1(ctx, iprot); err != nil {
return err
}
- issetSessionId = true
+ issetStatus = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 2:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.I32 {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetName = true
+ issetQueryType = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.BOOL {
if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
- issetPath = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.I32 {
+ if err := p.ReadField4(ctx, iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 5:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField5(ctx, iprot); err != nil {
+ return err
+ }
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -14892,52 +15694,81 @@ func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto
if err := iprot.ReadStructEnd(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
- if !issetSessionId{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
+ if !issetStatus{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set"));
}
- if !issetName{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
+ if !issetQueryType{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set"));
}
- if !issetPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set"));
+ return nil
+}
+
+func (p *TSQueryTemplateResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+ p.Status = &common.TSStatus{}
+ if err := p.Status.Read(ctx, iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err)
}
return nil
}
-func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
+func (p *TSQueryTemplateResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
} else {
- p.SessionId = v
+ p.QueryType = v
}
return nil
}
-func (p *TSPruneSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
+func (p *TSQueryTemplateResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
} else {
- p.Name = v
+ p.Result_ = &v
}
return nil
}
-func (p *TSPruneSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
+func (p *TSQueryTemplateResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
} else {
- p.Path = v
+ p.Count = &v
}
return nil
}
-func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSPruneSchemaTemplateReq"); err != nil {
+func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.Measurements = tSlice
+ for i := 0; i < size; i ++ {
+var _elem177 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ _elem177 = v
+}
+ p.Measurements = append(p.Measurements, _elem177)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateResp"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
+ if err := p.writeField4(ctx, oprot); err != nil { return err }
+ if err := p.writeField5(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -14946,102 +15777,140 @@ func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProt
return nil
}
-func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
- if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) }
+func (p *TSQueryTemplateResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) }
+ if err := p.Status.Write(ctx, oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) }
+ return err
+}
+
+func (p *TSQueryTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryType: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.queryType (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryType: ", p), err) }
+ return err
+}
+
+func (p *TSQueryTemplateResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetResult_() {
+ if err := oprot.WriteFieldBegin(ctx, "result", thrift.BOOL, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) }
+ if err := oprot.WriteBool(ctx, bool(*p.Result_)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.result (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) }
+ }
return err
}
-func (p *TSPruneSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) }
+func (p *TSQueryTemplateResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetCount() {
+ if err := oprot.WriteFieldBegin(ctx, "count", thrift.I32, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:count: ", p), err) }
+ if err := oprot.WriteI32(ctx, int32(*p.Count)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.count (4) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:count: ", p), err) }
+ }
return err
}
-func (p *TSPruneSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:path: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.Path)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.path (3) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:path: ", p), err) }
+func (p *TSQueryTemplateResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if p.IsSetMeasurements() {
+ if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:measurements: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Measurements {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(ctx); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:measurements: ", p), err) }
+ }
return err
}
-func (p *TSPruneSchemaTemplateReq) Equals(other *TSPruneSchemaTemplateReq) bool {
+func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
- if p.SessionId != other.SessionId { return false }
- if p.Name != other.Name { return false }
- if p.Path != other.Path { return false }
+ if !p.Status.Equals(other.Status) { return false }
+ if p.QueryType != other.QueryType { return false }
+ if p.Result_ != other.Result_ {
+ if p.Result_ == nil || other.Result_ == nil {
+ return false
+ }
+ if (*p.Result_) != (*other.Result_) { return false }
+ }
+ if p.Count != other.Count {
+ if p.Count == nil || other.Count == nil {
+ return false
+ }
+ if (*p.Count) != (*other.Count) { return false }
+ }
+ if len(p.Measurements) != len(other.Measurements) { return false }
+ for i, _tgt := range p.Measurements {
+ _src178 := other.Measurements[i]
+ if _tgt != _src178 { return false }
+ }
return true
}
-func (p *TSPruneSchemaTemplateReq) String() string {
+func (p *TSQueryTemplateResp) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSPruneSchemaTemplateReq(%+v)", *p)
+ return fmt.Sprintf("TSQueryTemplateResp(%+v)", *p)
}
// Attributes:
// - SessionId
-// - Name
-// - QueryType
-// - Measurement
-type TSQueryTemplateReq struct {
+// - PrefixPath
+// - TemplateName
+type TSUnsetSchemaTemplateReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- Name string `thrift:"name,2,required" db:"name" json:"name"`
- QueryType int32 `thrift:"queryType,3,required" db:"queryType" json:"queryType"`
- Measurement *string `thrift:"measurement,4" db:"measurement" json:"measurement,omitempty"`
+ PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
+ TemplateName string `thrift:"templateName,3,required" db:"templateName" json:"templateName"`
}
-func NewTSQueryTemplateReq() *TSQueryTemplateReq {
- return &TSQueryTemplateReq{}
+func NewTSUnsetSchemaTemplateReq() *TSUnsetSchemaTemplateReq {
+ return &TSUnsetSchemaTemplateReq{}
}
-func (p *TSQueryTemplateReq) GetSessionId() int64 {
+func (p *TSUnsetSchemaTemplateReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSQueryTemplateReq) GetName() string {
- return p.Name
+func (p *TSUnsetSchemaTemplateReq) GetPrefixPath() string {
+ return p.PrefixPath
}
-func (p *TSQueryTemplateReq) GetQueryType() int32 {
- return p.QueryType
-}
-var TSQueryTemplateReq_Measurement_DEFAULT string
-func (p *TSQueryTemplateReq) GetMeasurement() string {
- if !p.IsSetMeasurement() {
- return TSQueryTemplateReq_Measurement_DEFAULT
- }
-return *p.Measurement
-}
-func (p *TSQueryTemplateReq) IsSetMeasurement() bool {
- return p.Measurement != nil
+func (p *TSUnsetSchemaTemplateReq) GetTemplateName() string {
+ return p.TemplateName
}
-
-func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetName bool = false;
- var issetQueryType bool = false;
+ var issetPrefixPath bool = false;
+ var issetTemplateName bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -15066,28 +15935,18 @@ func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) e
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetName = true
+ issetPrefixPath = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 3:
- if fieldTypeId == thrift.I32 {
- if err := p.ReadField3(ctx, iprot); err != nil {
- return err
- }
- issetQueryType = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 4:
if fieldTypeId == thrift.STRING {
- if err := p.ReadField4(ctx, iprot); err != nil {
+ if err := p.ReadField3(ctx, iprot); err != nil {
return err
}
+ issetTemplateName = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -15108,16 +15967,16 @@ func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) e
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetName{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set"));
+ if !issetPrefixPath{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
}
- if !issetQueryType{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set"));
+ if !issetTemplateName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
}
return nil
}
-func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -15126,41 +15985,31 @@ func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProt
return nil
}
-func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSUnsetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
- p.Name = v
-}
- return nil
-}
-
-func (p *TSQueryTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
-} else {
- p.QueryType = v
+ p.PrefixPath = v
}
return nil
}
-func (p *TSQueryTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSUnsetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
+ return thrift.PrependError("error reading field 3: ", err)
} else {
- p.Measurement = &v
+ p.TemplateName = v
}
return nil
}
-func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateReq"); err != nil {
+func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSUnsetSchemaTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
if err := p.writeField3(ctx, oprot); err != nil { return err }
- if err := p.writeField4(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -15169,7 +16018,7 @@ func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol)
return nil
}
-func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -15179,134 +16028,72 @@ func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProt
return err
}
-func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.Name)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) }
+func (p *TSUnsetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
return err
}
-func (p *TSQueryTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queryType: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.queryType (3) field write error: ", p), err) }
+func (p *TSUnsetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:templateName: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.templateName (3) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queryType: ", p), err) }
- return err
-}
-
-func (p *TSQueryTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetMeasurement() {
- if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) }
- if err := oprot.WriteString(ctx, string(*p.Measurement)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) }
- }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:templateName: ", p), err) }
return err
}
-
-func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool {
- if p == other {
- return true
- } else if p == nil || other == nil {
- return false
- }
- if p.SessionId != other.SessionId { return false }
- if p.Name != other.Name { return false }
- if p.QueryType != other.QueryType { return false }
- if p.Measurement != other.Measurement {
- if p.Measurement == nil || other.Measurement == nil {
- return false
- }
- if (*p.Measurement) != (*other.Measurement) { return false }
- }
- return true
-}
-
-func (p *TSQueryTemplateReq) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("TSQueryTemplateReq(%+v)", *p)
-}
-
-// Attributes:
-// - Status
-// - QueryType
-// - Result_
-// - Count
-// - Measurements
-type TSQueryTemplateResp struct {
- Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"`
- QueryType int32 `thrift:"queryType,2,required" db:"queryType" json:"queryType"`
- Result_ *bool `thrift:"result,3" db:"result" json:"result,omitempty"`
- Count *int32 `thrift:"count,4" db:"count" json:"count,omitempty"`
- Measurements []string `thrift:"measurements,5" db:"measurements" json:"measurements,omitempty"`
-}
-
-func NewTSQueryTemplateResp() *TSQueryTemplateResp {
- return &TSQueryTemplateResp{}
-}
-
-var TSQueryTemplateResp_Status_DEFAULT *common.TSStatus
-func (p *TSQueryTemplateResp) GetStatus() *common.TSStatus {
- if !p.IsSetStatus() {
- return TSQueryTemplateResp_Status_DEFAULT
- }
-return p.Status
-}
-
-func (p *TSQueryTemplateResp) GetQueryType() int32 {
- return p.QueryType
-}
-var TSQueryTemplateResp_Result__DEFAULT bool
-func (p *TSQueryTemplateResp) GetResult_() bool {
- if !p.IsSetResult_() {
- return TSQueryTemplateResp_Result__DEFAULT
+
+func (p *TSUnsetSchemaTemplateReq) Equals(other *TSUnsetSchemaTemplateReq) bool {
+ if p == other {
+ return true
+ } else if p == nil || other == nil {
+ return false
}
-return *p.Result_
+ if p.SessionId != other.SessionId { return false }
+ if p.PrefixPath != other.PrefixPath { return false }
+ if p.TemplateName != other.TemplateName { return false }
+ return true
}
-var TSQueryTemplateResp_Count_DEFAULT int32
-func (p *TSQueryTemplateResp) GetCount() int32 {
- if !p.IsSetCount() {
- return TSQueryTemplateResp_Count_DEFAULT
+
+func (p *TSUnsetSchemaTemplateReq) String() string {
+ if p == nil {
+ return "<nil>"
}
-return *p.Count
+ return fmt.Sprintf("TSUnsetSchemaTemplateReq(%+v)", *p)
}
-var TSQueryTemplateResp_Measurements_DEFAULT []string
-func (p *TSQueryTemplateResp) GetMeasurements() []string {
- return p.Measurements
-}
-func (p *TSQueryTemplateResp) IsSetStatus() bool {
- return p.Status != nil
+// Attributes:
+// - SessionId
+// - TemplateName
+type TSDropSchemaTemplateReq struct {
+ SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
+ TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"`
}
-func (p *TSQueryTemplateResp) IsSetResult_() bool {
- return p.Result_ != nil
+func NewTSDropSchemaTemplateReq() *TSDropSchemaTemplateReq {
+ return &TSDropSchemaTemplateReq{}
}
-func (p *TSQueryTemplateResp) IsSetCount() bool {
- return p.Count != nil
-}
-func (p *TSQueryTemplateResp) IsSetMeasurements() bool {
- return p.Measurements != nil
+func (p *TSDropSchemaTemplateReq) GetSessionId() int64 {
+ return p.SessionId
}
-func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TSDropSchemaTemplateReq) GetTemplateName() string {
+ return p.TemplateName
+}
+func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
- var issetStatus bool = false;
- var issetQueryType bool = false;
+ var issetSessionId bool = false;
+ var issetTemplateName bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -15316,52 +16103,22 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol)
if fieldTypeId == thrift.STOP { break; }
switch fieldId {
case 1:
- if fieldTypeId == thrift.STRUCT {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField1(ctx, iprot); err != nil {
return err
}
- issetStatus = true
+ issetSessionId = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 2:
- if fieldTypeId == thrift.I32 {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetQueryType = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 3:
- if fieldTypeId == thrift.BOOL {
- if err := p.ReadField3(ctx, iprot); err != nil {
- return err
- }
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 4:
- if fieldTypeId == thrift.I32 {
- if err := p.ReadField4(ctx, iprot); err != nil {
- return err
- }
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 5:
- if fieldTypeId == thrift.LIST {
- if err := p.ReadField5(ctx, iprot); err != nil {
- return err
- }
+ issetTemplateName = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -15379,81 +16136,39 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol)
if err := iprot.ReadStructEnd(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
- if !issetStatus{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set"));
- }
- if !issetQueryType{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set"));
+ if !issetSessionId{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- return nil
-}
-
-func (p *TSQueryTemplateResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
- p.Status = &common.TSStatus{}
- if err := p.Status.Read(ctx, iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err)
+ if !issetTemplateName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
}
return nil
}
-func (p *TSQueryTemplateResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
-} else {
- p.QueryType = v
-}
- return nil
-}
-
-func (p *TSQueryTemplateResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
-} else {
- p.Result_ = &v
-}
- return nil
-}
-
-func (p *TSQueryTemplateResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(ctx); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
+func (p *TSDropSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
} else {
- p.Count = &v
+ p.SessionId = v
}
return nil
}
-func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin(ctx)
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]string, 0, size)
- p.Measurements = tSlice
- for i := 0; i < size; i ++ {
-var _elem183 string
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
+func (p *TSDropSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
} else {
- _elem183 = v
+ p.TemplateName = v
}
- p.Measurements = append(p.Measurements, _elem183)
- }
- if err := iprot.ReadListEnd(ctx); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
return nil
}
-func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateResp"); err != nil {
+func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TSDropSchemaTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
- if err := p.writeField3(ctx, oprot); err != nil { return err }
- if err := p.writeField4(ctx, oprot); err != nil { return err }
- if err := p.writeField5(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -15462,140 +16177,71 @@ func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol)
return nil
}
-func (p *TSQueryTemplateResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) }
- if err := p.Status.Write(ctx, oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err)
- }
+func (p *TSDropSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
+ if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) }
return err
}
-func (p *TSQueryTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryType: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.queryType (2) field write error: ", p), err) }
+func (p *TSDropSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) }
+ if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryType: ", p), err) }
- return err
-}
-
-func (p *TSQueryTemplateResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetResult_() {
- if err := oprot.WriteFieldBegin(ctx, "result", thrift.BOOL, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) }
- if err := oprot.WriteBool(ctx, bool(*p.Result_)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.result (3) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) }
- }
- return err
-}
-
-func (p *TSQueryTemplateResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetCount() {
- if err := oprot.WriteFieldBegin(ctx, "count", thrift.I32, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:count: ", p), err) }
- if err := oprot.WriteI32(ctx, int32(*p.Count)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.count (4) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:count: ", p), err) }
- }
- return err
-}
-
-func (p *TSQueryTemplateResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if p.IsSetMeasurements() {
- if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:measurements: ", p), err) }
- if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Measurements {
- if err := oprot.WriteString(ctx, string(v)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
- }
- if err := oprot.WriteListEnd(ctx); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:measurements: ", p), err) }
- }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) }
return err
}
-func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool {
+func (p *TSDropSchemaTemplateReq) Equals(other *TSDropSchemaTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
- if !p.Status.Equals(other.Status) { return false }
- if p.QueryType != other.QueryType { return false }
- if p.Result_ != other.Result_ {
- if p.Result_ == nil || other.Result_ == nil {
- return false
- }
- if (*p.Result_) != (*other.Result_) { return false }
- }
- if p.Count != other.Count {
- if p.Count == nil || other.Count == nil {
- return false
- }
- if (*p.Count) != (*other.Count) { return false }
- }
- if len(p.Measurements) != len(other.Measurements) { return false }
- for i, _tgt := range p.Measurements {
- _src184 := other.Measurements[i]
- if _tgt != _src184 { return false }
- }
+ if p.SessionId != other.SessionId { return false }
+ if p.TemplateName != other.TemplateName { return false }
return true
}
-func (p *TSQueryTemplateResp) String() string {
+func (p *TSDropSchemaTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSQueryTemplateResp(%+v)", *p)
+ return fmt.Sprintf("TSDropSchemaTemplateReq(%+v)", *p)
}
// Attributes:
// - SessionId
-// - PrefixPath
-// - TemplateName
-type TSUnsetSchemaTemplateReq struct {
+// - DevicePathList
+type TCreateTimeseriesUsingSchemaTemplateReq struct {
SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"`
- TemplateName string `thrift:"templateName,3,required" db:"templateName" json:"templateName"`
+ DevicePathList []string `thrift:"devicePathList,2,required" db:"devicePathList" json:"devicePathList"`
}
-func NewTSUnsetSchemaTemplateReq() *TSUnsetSchemaTemplateReq {
- return &TSUnsetSchemaTemplateReq{}
+func NewTCreateTimeseriesUsingSchemaTemplateReq() *TCreateTimeseriesUsingSchemaTemplateReq {
+ return &TCreateTimeseriesUsingSchemaTemplateReq{}
}
-func (p *TSUnsetSchemaTemplateReq) GetSessionId() int64 {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetSessionId() int64 {
return p.SessionId
}
-func (p *TSUnsetSchemaTemplateReq) GetPrefixPath() string {
- return p.PrefixPath
-}
-
-func (p *TSUnsetSchemaTemplateReq) GetTemplateName() string {
- return p.TemplateName
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetDevicePathList() []string {
+ return p.DevicePathList
}
-func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
var issetSessionId bool = false;
- var issetPrefixPath bool = false;
- var issetTemplateName bool = false;
+ var issetDevicePathList bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -15616,22 +16262,11 @@ func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto
}
}
case 2:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.LIST {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetPrefixPath = true
- } else {
- if err := iprot.Skip(ctx, fieldTypeId); err != nil {
- return err
- }
- }
- case 3:
- if fieldTypeId == thrift.STRING {
- if err := p.ReadField3(ctx, iprot); err != nil {
- return err
- }
- issetTemplateName = true
+ issetDevicePathList = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -15652,16 +16287,13 @@ func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto
if !issetSessionId{
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
}
- if !issetPrefixPath{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set"));
- }
- if !issetTemplateName{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
+ if !issetDevicePathList{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DevicePathList is not set"));
}
return nil
}
-func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
@@ -15670,31 +16302,34 @@ func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift
return nil
}
-func (p *TSUnsetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
-} else {
- p.PrefixPath = v
-}
- return nil
-}
-
-func (p *TSUnsetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin(ctx)
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]string, 0, size)
+ p.DevicePathList = tSlice
+ for i := 0; i < size; i ++ {
+var _elem179 string
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
} else {
- p.TemplateName = v
+ _elem179 = v
}
+ p.DevicePathList = append(p.DevicePathList, _elem179)
+ }
+ if err := iprot.ReadListEnd(ctx); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
return nil
}
-func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSUnsetSchemaTemplateReq"); err != nil {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin(ctx, "TCreateTimeseriesUsingSchemaTemplateReq"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
if p != nil {
if err := p.writeField1(ctx, oprot); err != nil { return err }
if err := p.writeField2(ctx, oprot); err != nil { return err }
- if err := p.writeField3(ctx, oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(ctx); err != nil {
return thrift.PrependError("write field stop error: ", err) }
@@ -15703,7 +16338,7 @@ func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProt
return nil
}
-func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) }
if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil {
@@ -15713,72 +16348,87 @@ func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift
return err
}
-func (p *TSUnsetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) }
- if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) }
- return err
-}
-
-func (p *TSUnsetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:templateName: ", p), err) }
- if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.templateName (3) field write error: ", p), err) }
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin(ctx, "devicePathList", thrift.LIST, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:devicePathList: ", p), err) }
+ if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DevicePathList)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.DevicePathList {
+ if err := oprot.WriteString(ctx, string(v)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
+ }
+ if err := oprot.WriteListEnd(ctx); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
if err := oprot.WriteFieldEnd(ctx); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:templateName: ", p), err) }
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:devicePathList: ", p), err) }
return err
}
-func (p *TSUnsetSchemaTemplateReq) Equals(other *TSUnsetSchemaTemplateReq) bool {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) Equals(other *TCreateTimeseriesUsingSchemaTemplateReq) bool {
if p == other {
return true
} else if p == nil || other == nil {
return false
}
if p.SessionId != other.SessionId { return false }
- if p.PrefixPath != other.PrefixPath { return false }
- if p.TemplateName != other.TemplateName { return false }
+ if len(p.DevicePathList) != len(other.DevicePathList) { return false }
+ for i, _tgt := range p.DevicePathList {
+ _src180 := other.DevicePathList[i]
+ if _tgt != _src180 { return false }
+ }
return true
}
-func (p *TSUnsetSchemaTemplateReq) String() string {
+func (p *TCreateTimeseriesUsingSchemaTemplateReq) String() string {
if p == nil {
return "<nil>"
}
- return fmt.Sprintf("TSUnsetSchemaTemplateReq(%+v)", *p)
+ return fmt.Sprintf("TCreateTimeseriesUsingSchemaTemplateReq(%+v)", *p)
}
// Attributes:
-// - SessionId
-// - TemplateName
-type TSDropSchemaTemplateReq struct {
- SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"`
- TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"`
+// - PipeName
+// - CreateTime
+// - Version
+// - Database
+type TSyncIdentityInfo struct {
+ PipeName string `thrift:"pipeName,1,required" db:"pipeName" json:"pipeName"`
+ CreateTime int64 `thrift:"createTime,2,required" db:"createTime" json:"createTime"`
+ Version string `thrift:"version,3,required" db:"version" json:"version"`
+ Database string `thrift:"database,4,required" db:"database" json:"database"`
}
-func NewTSDropSchemaTemplateReq() *TSDropSchemaTemplateReq {
- return &TSDropSchemaTemplateReq{}
+func NewTSyncIdentityInfo() *TSyncIdentityInfo {
+ return &TSyncIdentityInfo{}
}
-func (p *TSDropSchemaTemplateReq) GetSessionId() int64 {
- return p.SessionId
+func (p *TSyncIdentityInfo) GetPipeName() string {
+ return p.PipeName
}
-func (p *TSDropSchemaTemplateReq) GetTemplateName() string {
- return p.TemplateName
+func (p *TSyncIdentityInfo) GetCreateTime() int64 {
+ return p.CreateTime
}
-func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error {
+
+func (p *TSyncIdentityInfo) GetVersion() string {
+ return p.Version
+}
+
+func (p *TSyncIdentityInfo) GetDatabase() string {
+ return p.Database
+}
+func (p *TSyncIdentityInfo) Read(ctx context.Context, iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
}
- var issetSessionId bool = false;
- var issetTemplateName bool = false;
+ var issetPipeName bool = false;
+ var issetCreateTime bool = false;
+ var issetVersion bool = false;
+ var issetDatabase bool = false;
for {
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
@@ -15788,22 +16438,44 @@ func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoc
if fieldTypeId == thrift.STOP { break; }
switch fieldId {
case 1:
- if fieldTypeId == thrift.I64 {
+ if fieldTypeId == thrift.STRING {
if err := p.ReadField1(ctx, iprot); err != nil {
return err
}
- issetSessionId = true
+ issetPipeName = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
}
}
case 2:
- if fieldTypeId == thrift.STRING {
+ if fieldTypeId == thrift.I64 {
if err := p.ReadField2(ctx, iprot); err != nil {
return err
}
- issetTemplateName = true
+ issetCreateTime = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField3(ctx, iprot); err != nil {
+ return err
+ }
+ issetVersion = true
+ } else {
+ if err := iprot.Skip(ctx, fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField4(ctx, iprot); err != nil {
+ return err
+ }
+ issetDatabase = true
} else {
if err := iprot.Skip(ctx, fieldTypeId); err != nil {
return err
@@ -15821,39 +16493,65 @@ func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoc
if err := iprot.ReadStructEnd(ctx); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
}
- if !issetSessionId{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set"));
+ if !issetPipeName{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PipeName is not set"));
}
- if !issetTemplateName{
- return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set"));
+ if !issetCreateTime{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CreateTime is not set"));
+ }
+ if !issetVersion{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set"));
+ }
+ if !issetDatabase{
+ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Database is not set"));
}
return nil
}
-func (p *TSDropSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(ctx); err != nil {
+func (p *TSyncIdentityInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
- p.SessionId = v
+ p.PipeName = v
}
return nil
}
-func (p *TSDropSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(ctx); err != nil {
+func (p *TSyncIdentityInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(ctx); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
- p.TemplateName = v
+ p.CreateTime = v
}
return nil
}
-func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin(ctx, "TSDropSchemaTemplateReq"); err != nil {
+func (p *TSyncIdentityInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.Version = v
+}
+ return nil
+}
+
+func (p *TSyncIdentityInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(ctx); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
+} else {
+ p.Database = v
... 3706 lines suppressed ...