table

Retrieves the contents of a database table.

Positionals

contract TEXT - The contract who owns the table scope TEXT - The scope within the contract in which the table is found table TEXT - The name of the table as specified by the contract abi

Options

-b,--binary UINT - Return the value as BINARY rather than using abi to interpret as JSON -l,--limit UINT - The maximum number of rows to return -L,--lower TEXT - JSON representation of lower bound value of key, defaults to first --show-payer BOOLEAN - show RAM payer (default: false) -r,--reverse BOOLEAN - Iterate in reverse order (default: false) -U,--upper TEXT - JSON representation of upper bound value value of key, defaults to last --index TEXT - Index number, 1 - primary (first), 2 - secondary index (in order defined by multi_index), 3 - third index, etc. Number or name of index can be specified, e.g. 'secondary' or '2'. --key-type TEXT - The key type of --index, primary only supports (i64), all others support (i64, i128, i256, float64, float128, sha256). Special type 'name' indicates an account name.

Usage

Find the bid name with the lowest bid

daobet-cli get table eosio eosio namebids --key-type i64 --index 2 -r -l 1

Result:

{
"rows": [{
"newname": "com",
"high_bidder": "a123",
"high_bid": 100000,
"last_bid_time": "1541667021500000"
}
],
"more": true
}

Or to show all name bids from high to low, including the RAM payer information

daobet-cli get table eosio eosio namebids --key-type i64 --index 2 -r --show-payer

Result

{
"rows": [{
"data": {
"newname": "com",
"high_bidder": "a123",
"high_bid": 100000,
"last_bid_time": "1541667021500000"
},
"payer": "a123"
},{
"data": {
"newname": "abc",
"high_bidder": "a123",
"high_bid": 110000,
"last_bid_time": "1541667021500000"
},
"payer": "a123"
},{
"data": {
"newname": "ddd",
"high_bidder": "a123",
"high_bid": 120000,
"last_bid_time": "1541667021500000"
},
"payer": "a123"
},{
"data": {
"newname": "zoo",
"high_bidder": "a123",
"high_bid": 9990000,
"last_bid_time": "1541667022000000"
},
"payer": "a123"
}
],
"more": false
}