Skip to content

Commit 17f9c3b

Browse files
authored
chore: add iterate raw for multi (#25464)
1 parent 3077677 commit 17f9c3b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
6464
* (baseapp) [#24655](https://github.com/cosmos/cosmos-sdk/pull/24655) Add mutex locks for `state` and make `lastCommitInfo` atomic to prevent race conditions between `Commit` and `CreateQueryContext`.
6565
* (proto) [#24161](https://github.com/cosmos/cosmos-sdk/pull/24161) Remove unnecessary annotations from `x/staking` authz proto.
6666
* (x/bank) [#24660](https://github.com/cosmos/cosmos-sdk/pull/24660) Improve performance of the `GetAllBalances` and `GetAccountsBalances` keeper methods.
67+
* (collections) [#25464](https://github.com/cosmos/cosmos-sdk/pull/25464) Add `IterateRaw` method to `Multi` index type to satisfty query `Collection` interface.
6768

6869
### Bug Fixes
6970

collections/indexes/multi.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ func (m *Multi[ReferenceKey, PrimaryKey, Value]) Iterate(ctx context.Context, ra
119119
return (MultiIterator[ReferenceKey, PrimaryKey])(iter), err
120120
}
121121

122+
func (m *Multi[ReferenceKey, PrimaryKey, Value]) IterateRaw(
123+
ctx context.Context, start, end []byte, order collections.Order,
124+
) (collections.Iterator[collections.Pair[ReferenceKey, PrimaryKey], collections.NoValue], error) {
125+
return m.refKeys.IterateRaw(ctx, start, end, order)
126+
}
127+
122128
func (m *Multi[ReferenceKey, PrimaryKey, Value]) Walk(
123129
ctx context.Context,
124130
ranger collections.Ranger[collections.Pair[ReferenceKey, PrimaryKey]],

0 commit comments

Comments
 (0)