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

Method writeField4

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

Source from the content-addressed store, hash-verified

2517}
2518
2519func (p *TSOpenSessionResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
2520 if p.IsSetConfiguration() {
2521 if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 4); err != nil {
2522 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:configuration: ", p), err) }
2523 if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil {
2524 return thrift.PrependError("error writing map begin: ", err)
2525 }
2526 for k, v := range p.Configuration {
2527 if err := oprot.WriteString(ctx, string(k)); err != nil {
2528 return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
2529 if err := oprot.WriteString(ctx, string(v)); err != nil {
2530 return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
2531 }
2532 if err := oprot.WriteMapEnd(ctx); err != nil {
2533 return thrift.PrependError("error writing map end: ", err)
2534 }
2535 if err := oprot.WriteFieldEnd(ctx); err != nil {
2536 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:configuration: ", p), err) }
2537 }
2538 return err
2539}
2540
2541func (p *TSOpenSessionResp) Equals(other *TSOpenSessionResp) bool {
2542 if p == other {

Callers 1

WriteMethod · 0.95

Calls 1

IsSetConfigurationMethod · 0.95

Tested by

no test coverage detected