4 votes
Accepted

How to create composite primary key?

the problem is that the primary key index cannot be 128 bits long. it must be 64 bits. but other indexes can be 128 bits so my solution was to implement an auto-generated monotonic primary key and ...
ekkis's user avatar
  • 515
2 votes
Accepted

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

You need to delete all instances of the old database structure before you can mutate it, I believe an instance still exists in the ether despite it not showing up anymore. If you're just on a local ...
John Williamson's user avatar
1 vote
Accepted

can avaliable_primary_key() re-utilize deleted smaller primary_keys?

No. available_primary_key() returns (the primary key of the last item) + 1.
conr2d's user avatar
  • 2,320
1 vote

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

eosio::name is uint64_t internally and encodes string with BASE32. If you are sure that your tableid will contain chars in range of [.1-5a-z] and its length won't exceed 12 (or 13th-char only can have ...
conr2d's user avatar
  • 2,320

Only top scored, non community-wiki answers of a minimum length are eligible