Skip to content

Add soft delete to Deque #57

@Grinion

Description

@Grinion

Problem

We have a lot of records in ### Deque. We want to clear all records from Deque
In our cases we don't need to clear the data on the blockchain, we can overwrite it

Solution

I suggest adding a method clear for soft delete that sets Tail to 0.

OR

Change visibility methods from private to public

tail
head
set_tail
set_head

Temporary Solution

Now, I need to do it manually through the code

let full_key = namespaces_with_key(&["players".as_bytes()], b"t");
ctx.deps.storage.set(&full_key, &(0 as u32).to_be_bytes());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions