MXS-1502: Add have_session_commands helper function
The function conveys the meaning of the call better than using session_command_count to check whether there are session commands to be executed.
This commit is contained in:
@ -87,12 +87,22 @@ public:
|
||||
uint64_t complete_session_command();
|
||||
|
||||
/**
|
||||
* @brief Check if backend has session commands
|
||||
* @brief Get number of session commands
|
||||
*
|
||||
* @return Number of session commands
|
||||
*/
|
||||
size_t session_command_count() const;
|
||||
|
||||
/**
|
||||
* @brief Check if there are session commands waiting to be executed
|
||||
*
|
||||
* @return True if there are session commands waiting to be executed
|
||||
*/
|
||||
inline bool have_session_commands() const
|
||||
{
|
||||
return !m_session_commands.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the first session command
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user