gz/transport/log/QueryOptions.hh
Go to the documentation of this file.
Query for all the topics.
Definition: gz/transport/log/QueryOptions.hh:261
std::vector< SqlStatement > GenerateStatements(const Descriptor &_descriptor) const override
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages.
AllTopics(const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime())
Query for all the topics over the specified time range (by default, all time).
The Descriptor class provides meta-information about what a log contains. This may be useful for dete...
Definition: gz/transport/log/Descriptor.hh:42
The QualifiedTimeRange class provides a pair of qualified times that represent a range....
Definition: gz/transport/log/QualifiedTime.hh:189
static QualifiedTimeRange AllTime()
Construct a time range that has no beginning or end.
The QueryOptions interface is used by Log::QueryMessages() to determine which messages are retrieved ...
Definition: gz/transport/log/QueryOptions.hh:42
static SqlStatement StandardMessageQueryClose()
Get a standard ending to a SQL statement that will instruct the queries to be ordered by the time the...
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 SqlStatement StandardMessageQueryPreamble()
Get a standard SQL statement preamble, from the SELECT keyword up to (but not including) the WHERE ke...
Base class which manages the time range settings for the native QueryOptions classes.
Definition: gz/transport/log/QueryOptions.hh:80
QualifiedTimeRange & TimeRange()
Chosen time range.
TimeRangeOption(TimeRangeOption &&_other)
Move constructor.
TimeRangeOption(const TimeRangeOption &_other)
Copy constructor.
const QualifiedTimeRange & TimeRange() const
Chosen time range.
TimeRangeOption(const QualifiedTimeRange &_timeRange)
Constructor that sets the initial time range option.
SqlStatement GenerateTimeConditions() const
Generate a SQL string to represent the time conditions. This should be appended to a SQL statement af...
Specify a list of topics to query.
Definition: gz/transport/log/QueryOptions.hh:133
std::vector< SqlStatement > GenerateStatements(const Descriptor &_descriptor) const override
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages.
TopicList(const std::string &_singleTopic, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime())
Query for a single topic over the specified time range (by default, all time).
TopicList(const std::set< std::string > &_topics={ }, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime())
Query for a list of topics over the specified time range (by default, all time).
std::set< std::string > & Topics()
Topics of this TopicList.
static TopicList Create(const Container &_topics, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime())
Factory function that accepts any container type that can be passed through a range-for loop....
const std::set< std::string > & Topics() const
Topics of this TopicList.
Specify a pattern of topics to query.
Definition: gz/transport/log/QueryOptions.hh:206
std::vector< SqlStatement > GenerateStatements(const Descriptor &_descriptor) const override
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages.
TopicPattern(const TopicPattern &_other)
Copy constructor.
const std::regex & Pattern() const
Pattern for this option.
TopicPattern(const std::regex &_pattern, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime())
Query for topics that match a pattern, over a specified time range (by default, all time).
TopicPattern(TopicPattern &&_other)
Move constructor.
Definition: gz/transport/log/Batch.hh:28
A statement for a SQL query. These are generated by the QueryOptions class to control how messages ge...
Definition: gz/transport/log/SqlStatement.hh:150