public method IO2GAccountsTable.getNextRowByColumnValue
Brief
Gets the next row from IO2GAccountsTable
based on the column value.
Declaration | ||||
|
Parameters | |
columnID |
The name of a column in the Accounts table. For example, |
columnValueAsVariant |
The value of the column specified by the |
iterator |
The table iterator. |
row |
[out] The row fetched. |
Details
This method allows finding all rows that contain the specified column value.
If the row is not found, the method returns false
.
Example
Get trading accounts from the Accounts table [hide]
O2G2Ptr<IO2GAccountsTable> accountsTable = (IO2GAccountsTable *)tableManager->getTable(Accounts); bool found = false; IO2GTableIterator iterator; IO2GAccountTableRow *account = NULL; while(accountsTable->getNextRowByColumnValue("AccountKind", "32", iterator, account)) { found = true; std::cout << "AccountID: " << account->getAccountID() << " Equity = " << account->getEquity() << " UsableMargin = " << account->getUsableMargin() << std::endl; account->release(); } if (!found) std::cout << "You don't have any trading accounts." << std::endl;
Note: The returned row contains the current column values. The values are not automatically updated. To monitor
changes, use IO2GTableListener.onChanged
.
The row interface is thread-safe. The returned row can be used in different threads without synchronization.
Declared in IO2GAccountsTable