34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
|
|
|
|
[ how to use subset query ]
|
|
|
|
name of the muxrpc call: `paritalReplication.getSubset`
|
|
|
|
https://github.com/cryptoscope/ssb/blob/a781ad4ee51523df1d3858d9859c285d0eeb2fb1/sbot/manifest.go#L75-L76
|
|
|
|
subset query tests
|
|
|
|
https://github.com/cryptoscope/ssb/blob/a781ad4ee51523df1d3858d9859c285d0eeb2fb1/query/subsetquery_test.go
|
|
|
|
[ subset query args ]
|
|
|
|
get all msgs of type `foo`:
|
|
|
|
{"op":"type","string":"foo"}
|
|
|
|
get all msgs by author `feed`:
|
|
|
|
{"op":"author","feed":"@AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=.ed25519"}
|
|
|
|
get all msgs of type `foo` by author `feed`:
|
|
|
|
{"op":"and","args":[{"op":"author","feed":"@AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=.ed25519"},{"op":"type","string":"foo"}]}
|
|
|
|
get all msgs of type `foo` or `bar`:
|
|
|
|
{"op":"or","args":[{"op":"type","string":"foo"},{"op":"type","string":"bar"}]}
|
|
|
|
get all msgs of type `foo` and `bar` by author `feed`:
|
|
|
|
{"op":"and","args":[{"op":"author","feed":"@AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=.ed25519"},{"op":"or","args":[{"op":"type","string":"foo"},{"op":"type","string":"bar"}]}]}
|