Problem Say I have a table with the following structure.
int value | asset tokenType
4 | 0 bitcoin
7 | 0 altcoin.
Now I also have this function where I pass in an asset and i want to retrieve the value. Pretend I pass in bitcoin as coinType.
I know I can say
auto iterator = table.find(coinType.symbol.raw());
and iterator will be that row or be at the end if nothing is found.
HOWEVER, what I am trying to accomplish is selecting this 7. Something like "SELECT But how can I SELECT value ( which would be 7), like I would in sql. ( I know this isn't sql btw )
But this is my table structure
TABLE items{
int id;
asset value ;
asset tokenType;
std:: string note;
//Primary key is symbol of tokenType
uint64_t primary_key() const {return tokenType.symbol.raw();}
};