public method IO2GMessagesTable.getNextRowByMultiColumnValues
Brief
Gets the next row from IO2GMessagesTable based on the multiple columns values.
| Declaration | ||||
|
||||
| Parameters | |
columnCount |
Number of columns in which the search is to be performed. |
columnNames |
The array of column names in the Messages table. |
columnValues |
The array of values of the columns specified by the |
iterator |
The table iterator. |
row |
[out] The row fetched. |
Details
If the row is not found, the method returns false.
Example
Get messages by market conditions type of the message content from a specific sender [hide]
O2G2Ptr<IO2GMessagesTable> messagesTable = (IO2GMessagesTable *)tableManager->getTable(Messages);
bool found = false;
IO2GTableIterator iterator;
IO2GMessageTableRow *message = NULL;
const char *columnNames[] = {"Feature", "From"};
const void *columnValues[] = {(void *)"5", (void *)mLoginID};
while (messagesTable->getNextRowByMultiColumnValues(2, columnNames, columnValues, iterator, message))
{
found = true;
std::cout << "MessageID: " << message->getMsgID() <<
" From = " << message->getFrom() <<
" Text = " << message->getText() << std::endl;
message->release();
}
if (!found)
std::cout << "No messages found." << std::endl;
Note: The returned row contains the current columns 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 IO2GMessagesTable