The QueryOptions interface is used by Log::QueryMessages() to determine which messages are retrieved from the log file. More...
#include <QueryOptions.hh>
Public Member Functions | |
virtual | ~QueryOptions ()=default |
Virtual destructor. | |
virtual std::vector< SqlStatement > | GenerateStatements (const Descriptor &_descriptor) const =0 |
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages. | |
Static Public Member Functions | |
static SqlStatement | StandardMessageQueryClose () |
Get a standard ending to a SQL statement that will instruct the queries to be ordered by the time the messages were received by the logger. It will also end the statement with a semicolon. | |
static SqlStatement | StandardMessageQueryPreamble () |
Get a standard SQL statement preamble, from the SELECT keyword up to (but not including) the WHERE keyword. This preamble will make sure that the statement is formatted in a way that MsgIter will have the information it needs. | |
Detailed Description
The QueryOptions interface is used by Log::QueryMessages() to determine which messages are retrieved from the log file.
Constructor & Destructor Documentation
◆ ~QueryOptions()
|
virtualdefault |
Virtual destructor.
Member Function Documentation
◆ GenerateStatements()
|
pure virtual |
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages.
- Parameters
-
[in] _descriptor A Descriptor to help form the SQL statements
- Returns
- One or more SQL statements.
Implemented in TopicList, TopicPattern, and AllTopics.
◆ StandardMessageQueryClose()
|
static |
Get a standard ending to a SQL statement that will instruct the queries to be ordered by the time the messages were received by the logger. It will also end the statement with a semicolon.
- Returns
- {" ORDER BY messages.time_recv;"}
◆ StandardMessageQueryPreamble()
|
static |
Get a standard SQL statement preamble, from the SELECT keyword up to (but not including) the WHERE keyword. This preamble will make sure that the statement is formatted in a way that MsgIter will have the information it needs.
Using this statement without modification will query all messages in the log, with no specified order (or fail to compile in the SQL interpreter if you neglect to add a semicolon to the end). Append the output of StandardMessageQueryClose() to ensure that the query output will be ordered by the time each message was received, and that the statement closes with a semicolon.
- Returns
- The initial clause of a standard QueryOptions SQL statement.
The documentation for this class was generated from the following file: