public method IO2GTradesTable.findRow
Brief
Finds a row in the IO2GTradesTable
by TradeID.
Declaration | ||||
|
Parameters | |
id |
The unique identification number of an open position. The number is unique within the same database
that stores the account the position is opened on. For example, |
row |
[out] The row fetched. |
Details
If the row is not found, the method returns false
.
Example
Find open position by TradeID [hide]
O2G2Ptr<IO2GTradesTable> tradesTable = (IO2GTradesTable *)tableManager->getTable(Trades); IO2GTradeTableRow *trade = NULL; if (tradesTable->findRow(mTradeID, trade)) { std::cout << "TradeID: " << trade->getTradeID() << " OfferID = " << trade->getOfferID() << " Amount = " << trade->getAmount() << std::endl; trade->release(); }
Note: The returned row contains the current values of fields. The values are not automatically updated. To monitor
changes, use IO2GTableListener.onChanged
.
The row interface is thread-safe. One can use the returned row in different threads without synchronization.
Declared in IO2GTradesTable