You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function signature should probably look something like:
impl<'a,K,T>Map<'a,K,T>whereT:Serialize + DeserializeOwned,K:PrimaryKey<'a>,{pubfnquery_all<Q:CustomQuery>(&self,querier:&QuerierWrapper<Q>,remote_contract:Addr,order:Order// Not sure this is required) -> StdResult<Vec<T>>{
...}}
The purpose of this function is to allow the querying of external contracts, and should function similarly to the existing Map::query.
The text was updated successfully, but these errors were encountered:
0xForerunner
changed the title
create Map<K, V>::query_all
create Map<K, T>::query_all
Jan 3, 2023
Nice idea.
I think a more generalized version with the semantics of range would be even more useful.
However, I don't think it is actually possible to implement this, since range internally depends on the range implementation provided by Storage and there is no equivalent for querying a range (WasmQuery::Raw only supports querying a single key)
The problem is, there is no "entire vec" there. It's all saved individually in storage under the map's key concatenated with the key you put the values into (plus some length-prefixing). So, to my knowledge, the only way to get all the values out is using range or if you know all the keys and query them individually.
function signature should probably look something like:
The purpose of this function is to allow the querying of external contracts, and should function similarly to the existing Map::query.
The text was updated successfully, but these errors were encountered: