select 1 from acs_view_attribute_widgets where attribute_id = :attribute_id and object_view = :object_view update acs_view_attribute_widgets set required_p = :required_p, help_text = :help_text, widget = :widget where attribute_id = :attribute_id and object_view = :object_view insert into acs_view_attribute_widgets (object_view, attribute_id, widget, required_p, help_text) values (:object_view, :attribute_id, :widget, :required_p, :help_text) delete from acs_view_attribute_widgets where attribute_id = :attribute_id and object_view = :object_view select 1 where exists (select * from acs_view_attribute_widgets where object_view = :object_view and attribute_id = :attribute_id) select widget, required_p, help_text from acs_view_attribute_widgets where object_view = :object_view and attribute_id = :attribute_id delete from acs_view_attribute_widget_params where object_view = :object_view and attribute_id = :attribute_id and param_id = :param_id delete from acs_view_attribute_widget_params where object_view = :object_view and attribute_id = :attribute_id select 1 from acs_view_attribute_widget_params where object_view = :object_view and attribute_id = :attribute_id and param_id = :param_id update acs_view_attribute_widget_params set param_type = :param_type, param_source = :param_source, value = :value where object_view = :object_view and attribute_id = :attribute_id and param_id = :param_id insert into acs_view_attribute_widget_params (object_view, attribute_id, param_id, param_type, param_source, value) values (:object_view, :attribute_id, :param_id, :param_type, :param_source, :value)