liquid_feedback_frontend

view model/ignored_area.lua @ 1638:39bf0af7f5e3

Silence compiler warnings regarding discarded const qualifier in mldap library
author jbe
date Tue Feb 09 16:59:01 2021 +0100 (2021-02-09)
parents 55132e0324a4
children
line source
1 IgnoredArea = mondelefant.new_class()
2 IgnoredArea.table = 'ignored_area'
3 IgnoredArea.primary_key = { "member_id", "area_id" }
5 function IgnoredArea:by_pk(member_id, area_id)
6 return self:new_selector()
7 :add_where{ "member_id = ?", member_id }
8 :add_where{ "area_id = ?", area_id }
9 :optional_object_mode()
10 :exec()
11 end
13 function IgnoredArea:destroy_by_member_id(member_id)
14 local ignored_areas = self:new_selector()
15 :add_where{ "member_id = ?", member_id }
16 :exec()
17 for i, ignored_area in ipairs(ignored_areas) do
18 ignored_area:destroy()
19 end
20 end

Impressum / About Us