Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Removing usages of deprecated table_key #675

Merged
merged 2 commits into from
Feb 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Documentation change
  • Loading branch information
Bradley Hart committed Feb 5, 2020
commit 1035c22084b3334b45ff527f601f7ff584ff82e5
4 changes: 2 additions & 2 deletions docs/how-to-guides/09_how-to-get-table-information.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Above we console log the response from the EOSIO network. An example of an expe
```

## Query By Secondary Index
Finally, the `lower_bound` parameter can be used in conjunction with the `table_key` parameter to query an index different from the primary key.
Finally, the `lower_bound` parameter can be used in conjunction with the `index_position` parameter to query an index different from the primary key.

In the example shown below, the `contract` smart contract's table `profiles` is queried with the scope `contract` for the rows with secondary index `age` equal to **21**. The `limit` is **1** which implies that only 1 row with the age **21** will be returned.
```javascript
Expand All @@ -80,7 +80,7 @@ In the example shown below, the `contract` smart contract's table `profiles` is
code: 'contract', // Contract that we target
scope: 'contract', // Account that owns the data
table: 'profiles', // Table name
table_key: 'age', // Table secondary key name
index_position: 2, // Table secondary index
lower_bound: 21, // Table secondary key value
limit: 1, // Here we limit to 1 to get only row
reverse: false, // Optional: Get reversed data
Expand Down