2

I noticed that the lower_bound and upper_bound parameters do not exist anymore after the nodeos 1.6 version on the RPC api.

https://developers.eos.io/eosio-nodeos/v1.7.0/reference#get_table_rows
https://developers.eos.io/eosio-nodeos/v1.5.0/reference#get_table_rows

How can I get a subset of my elements using my primary index?

2

It was an error in the documentation. lower_bound and upper_bound do exist in the source code:

struct get_table_rows_params {
  bool        json = false;
  name        code;
  string      scope;
  name        table;
  string      table_key;
  string      lower_bound;
  string      upper_bound;
  uint32_t    limit = 10;
  string      key_type;  // type of key specified by index_position
  string      index_position; // 1 - primary (first), 2 - secondary index (in order defined by multi_index), 3 - third index, etc
  string      encode_type{"dec"}; //dec, hex , default=dec
  optional<bool>  reverse;
  optional<bool>  show_payer; // show RAM pyer
};

https://github.com/EOSIO/eos/blob/v1.7.4/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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