Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
spec returned return value of clear_prefix version 3
  • Loading branch information
lamafab committed Nov 25, 2022
commit 53627ff5b113f1612c13f69faaf85ce3bdaed9e8
31 changes: 27 additions & 4 deletions ab_host-api/storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,33 @@ limit on how many keys should be deleted. No limit is applied if this is _None_.
Any keys created during the current block execution do not count towards the
limit.
* `maybe_cursor` a pointer-size (<<defn-runtime-pointer-size>>) to an _Option_
type (<<defn-option-type>>) containing an unsigned 32-bit integer indicating the
key at which or after which the clear operation should be applied. If the key
does not exist, then the clear operation starts at the next key matching the
`prefix` in lexicographic (<<defn-lexicographic-ordering>>) ordering.
type (<<defn-option-type>>) containing an byte array indicating the key
("cursor") at which or after which the clear operation should be applied. If the
key does not exist, then the clear operation starts at the next key matching the
`prefix` in lexicographic order (<<defn-lexicographic-ordering>>).
* `result`: a pointer-size (<<defn-runtime-pointer-size>>) returning a SCALE
encoded structure stem:[R] of the following format:
+
[stem]
++++
R = (C, s, u, l)
++++
+
where
+
* stem:[C] is a pointer-size (<<defn-runtime-pointer-size>>) to an _Option_ type
(<<defn-option-type>>) containing the byte array indicating the next cursor
which must be provided to a subsequent call to this function, which might be the
needed depending on the defined `limit`. This value is _None_ if all the matching
keys were deleted and no further subsequent calls are needed.
* stem:[s] is an unsigned 32-bit integer indicating the number of keys that were
deleted by the operation. Any deleted keys that were created during the current
block execution do not count towards this number.
* stem:[u] is an unsigned 32-bit integer indicating the number of keys that were
deleted by the operations. This does include the deleted keys that were created
during the current block execution.
* stem:[l] is an unsigned 32-bit integer indicating the number of keys that were
deleted from the state but were not created during the current block execution.

==== `ext_storage_append`

Expand Down