MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / Read

Method Read

rpc/client.go:31634–31680  ·  view source on GitHub ↗
(ctx context.Context, iprot thrift.TProtocol)

Source from the content-addressed store, hash-verified

31632 return p.StorageGroup
31633}
31634func (p *IClientRPCServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error {
31635 if _, err := iprot.ReadStructBegin(ctx); err != nil {
31636 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
31637 }
31638
31639
31640 for {
31641 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
31642 if err != nil {
31643 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
31644 }
31645 if fieldTypeId == thrift.STOP { break; }
31646 switch fieldId {
31647 case 1:
31648 if fieldTypeId == thrift.I64 {
31649 if err := p.ReadField1(ctx, iprot); err != nil {
31650 return err
31651 }
31652 } else {
31653 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
31654 return err
31655 }
31656 }
31657 case 2:
31658 if fieldTypeId == thrift.STRING {
31659 if err := p.ReadField2(ctx, iprot); err != nil {
31660 return err
31661 }
31662 } else {
31663 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
31664 return err
31665 }
31666 }
31667 default:
31668 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
31669 return err
31670 }
31671 }
31672 if err := iprot.ReadFieldEnd(ctx); err != nil {
31673 return err
31674 }
31675 }
31676 if err := iprot.ReadStructEnd(ctx); err != nil {
31677 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
31678 }
31679 return nil
31680}
31681
31682func (p *IClientRPCServiceSetStorageGroupArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
31683 if v, err := iprot.ReadI64(ctx); err != nil {

Callers 1

ProcessMethod · 0.95

Calls 2

ReadField1Method · 0.95
ReadField2Method · 0.95

Tested by

no test coverage detected