eosio.cdt icon indicating copy to clipboard operation
eosio.cdt copied to clipboard

Allow multi_index primary key to be a name

Open nathanielhourt opened this issue 4 years ago • 0 comments

Change Description

Using a name as a primary key in a table is such a common use case that even the core contracts do it extensively. Adding first class support for this use case to the multi_index template is trivial, and allows contract code to be more expressive.

API Changes

  • [x] API Changes

The multi_index API now supports usage of a name as a table primary key, and implicitly casts it down to an int for indexing.

Documentation Additions

  • [ ] Documentation Additions

nathanielhourt avatar Jan 22 '22 17:01 nathanielhourt