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

Method writeField5

rpc/client.go:2839–2859  ·  view source on GitHub ↗
(ctx context.Context, oprot thrift.TProtocol)

Source from the content-addressed store, hash-verified

2837}
2838
2839func (p *TSOpenSessionReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
2840 if p.IsSetConfiguration() {
2841 if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 5); err != nil {
2842 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:configuration: ", p), err) }
2843 if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil {
2844 return thrift.PrependError("error writing map begin: ", err)
2845 }
2846 for k, v := range p.Configuration {
2847 if err := oprot.WriteString(ctx, string(k)); err != nil {
2848 return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
2849 if err := oprot.WriteString(ctx, string(v)); err != nil {
2850 return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
2851 }
2852 if err := oprot.WriteMapEnd(ctx); err != nil {
2853 return thrift.PrependError("error writing map end: ", err)
2854 }
2855 if err := oprot.WriteFieldEnd(ctx); err != nil {
2856 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:configuration: ", p), err) }
2857 }
2858 return err
2859}
2860
2861func (p *TSOpenSessionReq) Equals(other *TSOpenSessionReq) bool {
2862 if p == other {

Callers 1

WriteMethod · 0.95

Calls 1

IsSetConfigurationMethod · 0.95

Tested by

no test coverage detected