liquid_feedback_frontend

view model/event_processed.lua @ 1559:7eda69e1d14f

Fixed layout of incoming delegations in vote view
author bsw
date Tue Nov 10 20:29:19 2020 +0100 (2020-11-10)
parents 32cc544d5a5b
children
line source
1 EventProcessed = mondelefant.new_class()
2 EventProcessed.table = 'event_processed'
4 function EventProcessed:get_last_id()
6 local event_processed = self:new_selector()
7 :optional_object_mode()
8 :for_update()
9 :exec()
11 local last_event_id = 0
12 if event_processed then
13 last_event_id = event_processed.event_id
14 end
16 return last_event_id
18 end
20 function EventProcessed:set_last_id(id)
21 db:query{ "INSERT INTO event_processed (event_id) VALUES (?) ON CONFLICT ((1)) DO UPDATE SET event_id = EXCLUDED.event_id", id }
22 end

Impressum / About Us