Questions tagged [primarykey]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
67 views

Use UUID as primary key in multi_index

How can I use a uuid as the primary. struct [[eosio::table]] blackboxdata { name user; std::string uuid; std::string hash; std::string sqlrequest; uint64_t ...
1
vote
1answer
260 views

How to create composite primary key?

I have a table of prices where I want to store 2 prices per cross defined like this: struct [[eosio::table]] _prices { symbol base; symbol quote; float value = 0.0; uint128_t ...
0
votes
1answer
35 views

why i get “uniqueness constraint was violated” on error on empty table?

i defined a table but i made a mistake putting the fields in wrong order within EOSLIB_SERIALIZE EOSLIB_SERIALIZE( tablename,(field1)(field4)(field3)(field2)); i did some insertions with emplace ...
0
votes
1answer
136 views

Can we typecast string to use it as a id in table?

I need to use a string as a id of table in my smart contract. Initially i found some answers that string can't be use as primary key. But i use string as a key in table as given below: //@abi table ...