Closed maoueh closed 5 months ago
@maoueh i propose to change the method name to has_at
since it has essentially the same signature as get_at
will be implementing has_at
, has_first
and has_last
to mirror the get_
methods
done on unstable
Today we have
StoreGet
with the following definition:And then some specialized implementation of this trait like
StoreGetProto
that will automatically process the output and decode it to the specified proto message.However, in some cases, we only care if a specific key is present like when implementing "dynamic data source" pattern on Ethereum. In those cases, we often don't need the actual data and we only want to determine if we should process the output of not.
This task is about adding
fn has<K: AsRef<str>>(&self, ord: u64, key: K) -> bool
support inStoreGet
and for all concrete implementations. The method should only check if the key exists and avoid all decoding related to it.has
method onStoreGet
(Add proper Rust documentation on the methodhas
on the trait!).substreams-uniswap-v3
to make use of this where it make sense.substreams
CHANGELOG so this change is more discoverable