Eos: Thre is no api to get a total row count for the multi_index table.

Created on 3 May 2018  路  8Comments  路  Source: EOSIO/eos

There is no way to get a total row count for the 'multi_index table'?

chain-api-v2 dev experience enhancement

Most helpful comment

You can query the number of rows (value in field "count") using "get scope" now. But you can't do it inside a smart contract. Please refer to https://github.com/EOSIO/eos/pull/5486

All 8 comments

Useful to have

Is there available function for this now?

Yes, this would a very nice improvement. There is no function for is @dominic-healid yet, just looked through the eosio source :(

+10
This would be extremely helpful. Perhaps a switch like --count
cleos -u https://api.eosnewyork.io get table eosio eosio voters --count

Still waiting for this very useful feature

+1 for reading items in reverse order

also opened an issue for this and the guy who responded said it's implemented but I don't see any reference to this inside the linked issue. https://github.com/EOSIO/eos/issues/5543

You can query the number of rows (value in field "count") using "get scope" now. But you can't do it inside a smart contract. Please refer to https://github.com/EOSIO/eos/pull/5486

Was this page helpful?
0 / 5 - 0 ratings