Questions tagged [persistence]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
1k views

How to store contract state as singleton?

What is the best way to store fields specific for contract, for example if contract has 3 fields (2 strings, 1 uint64_t) and they can be changed? Should I create new table for this, it would always be ...
1
vote
0answers
305 views

How do I add second and third indices to the multi_index object?

I have thoroughly read the documentation and isolated my problem down to a small set of sample code. I'm not sure where my problem is. I am trying to add multiple indices to a multi_index object so ...
8
votes
2answers
317 views

Best practice to handle table migrations?

What is the best practice for migrating table when a member of a struct is added? For some structs, I have had no problems adding members, but for others I have. I get this error message: $cleos get ...
2
votes
1answer
543 views

How to allow duplicates in an eosio::multi_index object?

How do I create a struct and multi_index table that allow for duplicate records? For example, I have the below struct and multi_index table that is populated via an emplace call that selects a ...