-bool WidgetDAOReadOnly::isTestWidget() const
-{
- Try {
- WRT_DB_SELECT(select, WidgetExtendedInfo, &WrtDatabase::interface())
- select->Where(Equals<WidgetExtendedInfo::app_id>(m_widgetHandle));
-
- WidgetExtendedInfo::Select::RowList rows = select->GetRowList();
- if (rows.empty()) {
- ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,
- "Cannot find widget. Handle: " << m_widgetHandle);
- }
-
- return static_cast<bool>(rows.front().Get_test_widget());
- }
- Catch(DPL::DB::SqlConnection::Exception::Base){
- ReThrowMsg(WidgetDAOReadOnly::Exception::DatabaseError,
- "Failed to check IsTestWidget");
- }
-}
-