// ToRow returns []interface{} for the row data of "show processlist" and "select * from infoschema.processlist".
552331
func (pi *ProcessInfo) ToRow(full bool) []interface{} {
	var info string
	if full {
		info = pi.Info
	} else {
		info = fmt.Sprintf("%.100v", pi.Info)
	}
	t := uint64(time.Since(pi.Time) / time.Second)
	return []interface{}{
		pi.ID,
		pi.User,
		pi.Host,
		pi.DB,
		mysql.Command2Str[pi.Command],
		t,
		fmt.Sprintf("%d", pi.State),
		info,
	}
}
839047
func (m *ServerVariable) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if len(m.Enum) != 0 {
		info = append(info, yaml.MapItem{Key: "enum", Value: m.Enum})
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "default", Value: m.Default})
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
421910
func (obj *GenericObject) GetListObjectDataRaw(ctx context.Context, path string, pages interface{}) (json.RawMessage, error) {
	result := &struct {
		DataPages json.RawMessage	`json:"qDataPages"`
	} {}
	err := obj.rpc(ctx, "GetListObjectData", result, ensureEncodable(path), ensureEncodable(pages))
	return result.DataPages, err 
}
1174345
func (m *Response) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.XRef != "" {
		info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef})
	}
	return info
}
514297
func (m *Resource) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Methods != nil {
		info = append(info, yaml.MapItem{Key: "methods", Value: m.Methods.ToRawInfo()})
	}
	// &{Name:methods Type:Methods StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Resources != nil {
		info = append(info, yaml.MapItem{Key: "resources", Value: m.Resources.ToRawInfo()})
	}
	// &{Name:resources Type:Resources StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	return info
}
366225
func (m *Operation) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if len(m.Tags) != 0 {
		info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags})
	}
	if m.Summary != "" {
		info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary})
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.ExternalDocs != nil {
		info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()})
	}
	// &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.OperationId != "" {
		info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId})
	}
	if len(m.Produces) != 0 {
		info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces})
	}
	if len(m.Consumes) != 0 {
		info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes})
	}
	if len(m.Parameters) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Parameters {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "parameters", Value: items})
	}
	// &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()})
	// &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.Schemes) != 0 {
		info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes})
	}
	if m.Deprecated != false {
		info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated})
	}
	if len(m.Security) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Security {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "security", Value: items})
	}
	// &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if m.VendorExtension != nil {
		for _, item := range m.VendorExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
655627
func (h *Handle) LinkList() ([]Link, error) {
	// NOTE(vish): This duplicates functionality in net/iface_linux.go, but we need
	//             to get the message ourselves to parse link type.
	req := h.newNetlinkRequest(unix.RTM_GETLINK, unix.NLM_F_DUMP)

	msg := nl.NewIfInfomsg(unix.AF_UNSPEC)
	req.AddData(msg)
	attr := nl.NewRtAttr(unix.IFLA_EXT_MASK, nl.Uint32Attr(nl.RTEXT_FILTER_VF))
	req.AddData(attr)

	msgs, err := req.Execute(unix.NETLINK_ROUTE, unix.RTM_NEWLINK)
	if err != nil {
		return nil, err
	}

	var res []Link
	for _, m := range msgs {
		link, err := LinkDeserialize(nil, m)
		if err != nil {
			return nil, err
		}
		res = append(res, link)
	}

	return res, nil
}
1056062
func (m *ExampleOrReference) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// ExampleOrReference
	// {Name:example Type:Example StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetExample()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
1273104
func (m *Components) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Schemas != nil {
		info = append(info, yaml.MapItem{Key: "schemas", Value: m.Schemas.ToRawInfo()})
	}
	// &{Name:schemas Type:SchemasOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Responses != nil {
		info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()})
	}
	// &{Name:responses Type:ResponsesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Parameters != nil {
		info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()})
	}
	// &{Name:parameters Type:ParametersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Examples != nil {
		info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()})
	}
	// &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.RequestBodies != nil {
		info = append(info, yaml.MapItem{Key: "requestBodies", Value: m.RequestBodies.ToRawInfo()})
	}
	// &{Name:requestBodies Type:RequestBodiesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Headers != nil {
		info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()})
	}
	// &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SecuritySchemes != nil {
		info = append(info, yaml.MapItem{Key: "securitySchemes", Value: m.SecuritySchemes.ToRawInfo()})
	}
	// &{Name:securitySchemes Type:SecuritySchemesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Links != nil {
		info = append(info, yaml.MapItem{Key: "links", Value: m.Links.ToRawInfo()})
	}
	// &{Name:links Type:LinksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Callbacks != nil {
		info = append(info, yaml.MapItem{Key: "callbacks", Value: m.Callbacks.ToRawInfo()})
	}
	// &{Name:callbacks Type:CallbacksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
1152149
func (m *ResponseValue) ToRawInfo() interface{} {
	// ONE OF WRAPPER
	// ResponseValue
	// {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v0 := m.GetResponse()
	if v0 != nil {
		return v0.ToRawInfo()
	}
	// {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	v1 := m.GetJsonReference()
	if v1 != nil {
		return v1.ToRawInfo()
	}
	return nil
}
1261560
func RowsToProto3(rows [][]Value) []*querypb.Row {
	if len(rows) == 0 {
		return nil
	}

	result := make([]*querypb.Row, len(rows))
	for i, r := range rows {
		result[i] = RowToProto3(r)
	}
	return result
}
607365
func (uriFlow *URIFlow) Proc(actionmap map[string]Action) {
	var err error

	for _, queryflow := range uriFlow.QueryFlows {
		queryflow.Proc(actionmap, uriFlow.URI)

		if queryflow.ActionName == "" {
			continue
		}
		action := myAction(queryflow.ActionName, actionmap)
		queryflow.ResultsList, err = action(queryflow.ResultsList, -1)
		if err != nil {
			fmt.Println(err)
			return
		}
	}
}
590029
func (ql *QueryList) GetQueryzRows() []QueryDetailzRow {
	ql.mu.Lock()
	rows := []QueryDetailzRow{}
	for _, qd := range ql.queryDetails {
		row := QueryDetailzRow{
			Query:       qd.conn.Current(),
			ContextHTML: callinfo.HTMLFromContext(qd.ctx),
			Start:       qd.start,
			Duration:    time.Since(qd.start),
			ConnID:      qd.connID,
		}
		rows = append(rows, row)
	}
	ql.mu.Unlock()
	sort.Sort(byStartTime(rows))
	return rows
}
391069
func parseRow(r *tdsBuffer, columns []columnStruct, row []interface{}) {
	for i, column := range columns {
		row[i] = column.ti.Reader(&column.ti, r)
	}
}
1226095
func (r *Request) DoRaw() ([]byte, error) {
	r.tryThrottle()

	var result Result
	err := r.request(func(req *http.Request, resp *http.Response) {
		result.body, result.err = ioutil.ReadAll(resp.Body)
	})
	if err != nil {
		return nil, err
	}
	return result.body, result.err
}
264871
func (s *Server) ShowProcessList() map[uint64]util.ProcessInfo {
	s.rwlock.RLock()
	rs := make(map[uint64]util.ProcessInfo, len(s.clients))
	for _, client := range s.clients {
		if atomic.LoadInt32(&client.status) == connStatusWaitShutdown {
			continue
		}
		pi := client.ctx.ShowProcess()
		rs[pi.ID] = pi
	}
	s.rwlock.RUnlock()
	return rs
}
1362177
func (m *ParametersOrReferences) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.AdditionalProperties != nil {
		for _, item := range m.AdditionalProperties {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:additionalProperties Type:NamedParameterOrReference StringEnumValues:[] MapType:ParameterOrReference Repeated:true Pattern: Implicit:true Description:}
	return info
}