MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / Query

Method Query

decode_query.go:32–40  ·  view source on GitHub ↗

Query extracts data specified by the query from the msgpack stream skipping any other data. Query consists of map keys and array indexes separated with dot, e.g. key1.0.key2.

(query string)

Source from the content-addressed store, hash-verified

30// any other data. Query consists of map keys and array indexes separated with dot,
31// e.g. key1.0.key2.
32func (d *Decoder) Query(query string) ([]interface{}, error) {
33 res := queryResult{
34 query: query,
35 }
36 if err := d.query(&res); err != nil {
37 return nil, err
38 }
39 return res.values, nil
40}
41
42func (d *Decoder) query(q *queryResult) error {
43 q.nextKey()

Callers 2

BenchmarkQueryFunction · 0.95
ExampleDecoder_QueryFunction · 0.95

Calls 1

queryMethod · 0.95

Tested by 2

BenchmarkQueryFunction · 0.76
ExampleDecoder_QueryFunction · 0.76