2
"tables": [{
  "table": "account",
  "type": "account",
  "index_type": "i64",
  "key_names" : ["account"],
  "key_types" : ["name"]
}
]

In the abi file for the table, it has the key_names and key_types, I know it is relative to the index_type, but, when will the two field be used?

Sometimes I just set a uint32_t field as primary key, and the abi will include next fields, which I am afraid will have some impact on the primary key.

1 Answer 1

1

The key_names is a list of the primary key and all the secondary keys.

The key_types is the type of each of the respective keys.

In a simple table (only a primary key), the type is always uint64 or name, and they key_name is an element from the struct referenced by the type variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.